mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y
@ 2023-01-09 12:27 James Clark
  2023-01-09 17:45 ` Will Deacon
  2023-01-09 17:50 ` Nathan Chancellor
  0 siblings, 2 replies; 3+ messages in thread
From: James Clark @ 2023-01-09 12:27 UTC (permalink / raw)
  To: linux-arm-kernel, mark.rutland
  Cc: James Clark, Catalin Marinas, Will Deacon, Nathan Chancellor,
	Nick Desaulniers, Tom Rix, Steven Rostedt (Google),
	Florent Revest, Masami Hiramatsu (Google),
	linux-kernel, llvm

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")
Signed-off-by: James Clark <james.clark@arm.com>
---
 arch/arm64/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index cf6d1cd8b6dc..c5ccca26a408 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -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
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y
  2023-01-09 12:27 [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y James Clark
@ 2023-01-09 17:45 ` Will Deacon
  2023-01-09 17:50 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2023-01-09 17:45 UTC (permalink / raw)
  To: James Clark, linux-arm-kernel, mark.rutland
  Cc: catalin.marinas, kernel-team, Will Deacon, Tom Rix,
	Florent Revest, Nick Desaulniers, Masami Hiramatsu (Google),
	Steven Rostedt (Google),
	linux-kernel, Nathan Chancellor, llvm

On Mon, 9 Jan 2023 12:27:43 +0000, James Clark wrote:
> 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,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y
  2023-01-09 12:27 [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y James Clark
  2023-01-09 17:45 ` Will Deacon
@ 2023-01-09 17:50 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2023-01-09 17:50 UTC (permalink / raw)
  To: James Clark
  Cc: linux-arm-kernel, mark.rutland, Catalin Marinas, Will Deacon,
	Nick Desaulniers, Tom Rix, Steven Rostedt (Google),
	Florent Revest, Masami Hiramatsu (Google),
	linux-kernel, llvm

On Mon, Jan 09, 2023 at 12:27:43PM +0000, James Clark wrote:
> 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")
> Signed-off-by: James Clark <james.clark@arm.com>

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

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  arch/arm64/Kconfig | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index cf6d1cd8b6dc..c5ccca26a408 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -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
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-09 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 12:27 [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y James Clark
2023-01-09 17:45 ` Will Deacon
2023-01-09 17:50 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®