Skip to contentSkip to conversation

arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y

PATCH Applied James Clark 3 participants 3 messages Jan 9, 2023 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y

commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang") fixed the build with the above combination by splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for Clang and GCC.

commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the GCC only check "-fpatchable-function-entry=2" back in unconditionally which breaks the build.

Remove the unconditional check, because the conditional ones were also updated to _ARGS in the above commit, so they work correctly on their own.

Fixes 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS")
---
 arch/arm64/Kconfig | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/Kconfig +0 -2
index cf6d1cd8b6dc..c5ccca26a408 100644
@@ -184,8 +184,6 @@ config ARM64
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_DMA_CONTIGUOUS
 	select HAVE_DYNAMIC_FTRACE
-	select HAVE_DYNAMIC_FTRACE_WITH_ARGS \
-		if $(cc-option,-fpatchable-function-entry=2)
 	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
 		if DYNAMIC_FTRACE_WITH_ARGS
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS

base-commit: 5db568e748f6fb7d0d2e1bff4c2698ad4f50b982

Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 10 lines · James Clark

commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang") fixed the build with the above combination by splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for Clang and GCC.

commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the GCC only check "-fpatchable-function-entry=2" back in unconditionally which breaks the build.

[...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y

      https://git.kernel.org/arm64/c/68a63a412d18

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Reviewed-by on v1 1/1
#2 lore raw
In reply to James Clark
Quoted 9 lines · James Clark

commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang") fixed the build with the above combination by splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for Clang and GCC.

commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the GCC only check "-fpatchable-function-entry=2" back in unconditionally which breaks the build.

Quoted 6 lines

Remove the unconditional check, because the conditional ones were also updated to _ARGS in the above commit, so they work correctly on their own.

Fixes 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS")

Just for posterity, since I see it was already applied:

Quoted 22 lines
---
 arch/arm64/Kconfig | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/Kconfig +0 -2
index cf6d1cd8b6dc..c5ccca26a408 100644
@@ -184,8 +184,6 @@ config ARM64
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_DMA_CONTIGUOUS
 	select HAVE_DYNAMIC_FTRACE
-	select HAVE_DYNAMIC_FTRACE_WITH_ARGS \
-		if $(cc-option,-fpatchable-function-entry=2)
 	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
 		if DYNAMIC_FTRACE_WITH_ARGS
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS

base-commit: 5db568e748f6fb7d0d2e1bff4c2698ad4f50b982

Signature · 1 line
2.25.1