linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n
@ 2023-06-23 15:21 Arnd Bergmann
  2023-06-23 15:35 ` Florent Revest
  2023-06-30 16:02 ` Catalin Marinas
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-06-23 15:21 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Steven Rostedt (Google),
	Mark Rutland, Donglin Peng
  Cc: Arnd Bergmann, Florent Revest, linux-arm-kernel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

It appears that a merge conflict ended up hiding a newly added constant
in some configurations:

arch/arm64/kernel/entry-ftrace.S: Assembler messages:
arch/arm64/kernel/entry-ftrace.S:59: Error: undefined symbol FTRACE_OPS_DIRECT_CALL used as an immediate value

FTRACE_OPS_DIRECT_CALL is still used when CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
is enabled, even if CONFIG_FUNCTION_GRAPH_TRACER is disabled, so change the
ifdef accordingly.

Fixes: 3646970322464 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/kernel/asm-offsets.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
index 757d01a68ffd0..5ff1942b04fcf 100644
--- a/arch/arm64/kernel/asm-offsets.c
+++ b/arch/arm64/kernel/asm-offsets.c
@@ -213,9 +213,9 @@ int main(void)
   DEFINE(FGRET_REGS_X7,			offsetof(struct fgraph_ret_regs, regs[7]));
   DEFINE(FGRET_REGS_FP,			offsetof(struct fgraph_ret_regs, fp));
   DEFINE(FGRET_REGS_SIZE,		sizeof(struct fgraph_ret_regs));
+#endif
 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
   DEFINE(FTRACE_OPS_DIRECT_CALL,	offsetof(struct ftrace_ops, direct_call));
-#endif
 #endif
   return 0;
 }
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n
  2023-06-23 15:21 [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n Arnd Bergmann
@ 2023-06-23 15:35 ` Florent Revest
  2023-06-29  0:04   ` Randy Dunlap
  2023-06-30 16:02 ` Catalin Marinas
  1 sibling, 1 reply; 5+ messages in thread
From: Florent Revest @ 2023-06-23 15:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Catalin Marinas, Will Deacon, Steven Rostedt (Google),
	Mark Rutland, Donglin Peng, Arnd Bergmann, linux-arm-kernel,
	linux-kernel

On Fri, Jun 23, 2023 at 5:22 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> It appears that a merge conflict ended up hiding a newly added constant
> in some configurations:
>
> arch/arm64/kernel/entry-ftrace.S: Assembler messages:
> arch/arm64/kernel/entry-ftrace.S:59: Error: undefined symbol FTRACE_OPS_DIRECT_CALL used as an immediate value
>
> FTRACE_OPS_DIRECT_CALL is still used when CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> is enabled, even if CONFIG_FUNCTION_GRAPH_TRACER is disabled, so change the
> ifdef accordingly.
>
> Fixes: 3646970322464 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm64/kernel/asm-offsets.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> index 757d01a68ffd0..5ff1942b04fcf 100644
> --- a/arch/arm64/kernel/asm-offsets.c
> +++ b/arch/arm64/kernel/asm-offsets.c
> @@ -213,9 +213,9 @@ int main(void)
>    DEFINE(FGRET_REGS_X7,                        offsetof(struct fgraph_ret_regs, regs[7]));
>    DEFINE(FGRET_REGS_FP,                        offsetof(struct fgraph_ret_regs, fp));
>    DEFINE(FGRET_REGS_SIZE,              sizeof(struct fgraph_ret_regs));
> +#endif
>  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
>    DEFINE(FTRACE_OPS_DIRECT_CALL,       offsetof(struct ftrace_ops, direct_call));
> -#endif
>  #endif
>    return 0;
>  }
> --
> 2.39.2
>

Acked-by: Florent Revest <revest@chromium.org>

Good catch, thank you Arnd!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n
  2023-06-23 15:35 ` Florent Revest
@ 2023-06-29  0:04   ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2023-06-29  0:04 UTC (permalink / raw)
  To: Florent Revest, Arnd Bergmann
  Cc: Catalin Marinas, Will Deacon, Steven Rostedt (Google),
	Mark Rutland, Donglin Peng, Arnd Bergmann, linux-arm-kernel,
	linux-kernel



On 6/23/23 08:35, Florent Revest wrote:
> On Fri, Jun 23, 2023 at 5:22 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> It appears that a merge conflict ended up hiding a newly added constant
>> in some configurations:
>>
>> arch/arm64/kernel/entry-ftrace.S: Assembler messages:
>> arch/arm64/kernel/entry-ftrace.S:59: Error: undefined symbol FTRACE_OPS_DIRECT_CALL used as an immediate value
>>
>> FTRACE_OPS_DIRECT_CALL is still used when CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
>> is enabled, even if CONFIG_FUNCTION_GRAPH_TRACER is disabled, so change the
>> ifdef accordingly.
>>
>> Fixes: 3646970322464 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  arch/arm64/kernel/asm-offsets.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
>> index 757d01a68ffd0..5ff1942b04fcf 100644
>> --- a/arch/arm64/kernel/asm-offsets.c
>> +++ b/arch/arm64/kernel/asm-offsets.c
>> @@ -213,9 +213,9 @@ int main(void)
>>    DEFINE(FGRET_REGS_X7,                        offsetof(struct fgraph_ret_regs, regs[7]));
>>    DEFINE(FGRET_REGS_FP,                        offsetof(struct fgraph_ret_regs, fp));
>>    DEFINE(FGRET_REGS_SIZE,              sizeof(struct fgraph_ret_regs));
>> +#endif
>>  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
>>    DEFINE(FTRACE_OPS_DIRECT_CALL,       offsetof(struct ftrace_ops, direct_call));
>> -#endif
>>  #endif
>>    return 0;
>>  }
>> --
>> 2.39.2
>>
> 
> Acked-by: Florent Revest <revest@chromium.org>
> 
> Good catch, thank you Arnd!


Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n
  2023-06-23 15:21 [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n Arnd Bergmann
  2023-06-23 15:35 ` Florent Revest
@ 2023-06-30 16:02 ` Catalin Marinas
  2023-07-04 13:59   ` Steven Rostedt
  1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2023-06-30 16:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Will Deacon, Steven Rostedt (Google), Mark Rutland, Donglin Peng,
	Arnd Bergmann, Florent Revest, linux-arm-kernel, linux-kernel

On Fri, Jun 23, 2023 at 05:21:55PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> It appears that a merge conflict ended up hiding a newly added constant
> in some configurations:
> 
> arch/arm64/kernel/entry-ftrace.S: Assembler messages:
> arch/arm64/kernel/entry-ftrace.S:59: Error: undefined symbol FTRACE_OPS_DIRECT_CALL used as an immediate value
> 
> FTRACE_OPS_DIRECT_CALL is still used when CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> is enabled, even if CONFIG_FUNCTION_GRAPH_TRACER is disabled, so change the
> ifdef accordingly.
> 
> Fixes: 3646970322464 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm64/kernel/asm-offsets.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> index 757d01a68ffd0..5ff1942b04fcf 100644
> --- a/arch/arm64/kernel/asm-offsets.c
> +++ b/arch/arm64/kernel/asm-offsets.c
> @@ -213,9 +213,9 @@ int main(void)
>    DEFINE(FGRET_REGS_X7,			offsetof(struct fgraph_ret_regs, regs[7]));
>    DEFINE(FGRET_REGS_FP,			offsetof(struct fgraph_ret_regs, fp));
>    DEFINE(FGRET_REGS_SIZE,		sizeof(struct fgraph_ret_regs));
> +#endif
>  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
>    DEFINE(FTRACE_OPS_DIRECT_CALL,	offsetof(struct ftrace_ops, direct_call));
> -#endif
>  #endif
>    return 0;
>  }

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

Steven, since the fixed commit went in via your tree, could you please
pick this up as well for -rc1? Otherwise I'll queue it for -rc2 once the
ftrace changes turn up in -rc1.

Thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n
  2023-06-30 16:02 ` Catalin Marinas
@ 2023-07-04 13:59   ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2023-07-04 13:59 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Arnd Bergmann, Will Deacon, Mark Rutland, Donglin Peng,
	Arnd Bergmann, Florent Revest, linux-arm-kernel, linux-kernel

On Fri, 30 Jun 2023 17:02:39 +0100
Catalin Marinas <catalin.marinas@arm.com> wrote:
> > diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> > index 757d01a68ffd0..5ff1942b04fcf 100644
> > --- a/arch/arm64/kernel/asm-offsets.c
> > +++ b/arch/arm64/kernel/asm-offsets.c
> > @@ -213,9 +213,9 @@ int main(void)
> >    DEFINE(FGRET_REGS_X7,			offsetof(struct fgraph_ret_regs, regs[7]));
> >    DEFINE(FGRET_REGS_FP,			offsetof(struct fgraph_ret_regs, fp));
> >    DEFINE(FGRET_REGS_SIZE,		sizeof(struct fgraph_ret_regs));
> > +#endif
> >  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> >    DEFINE(FTRACE_OPS_DIRECT_CALL,	offsetof(struct ftrace_ops, direct_call));
> > -#endif
> >  #endif
> >    return 0;
> >  }  
> 
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> Steven, since the fixed commit went in via your tree, could you please
> pick this up as well for -rc1? Otherwise I'll queue it for -rc2 once the
> ftrace changes turn up in -rc1.

I'm working on a fixes pull request for Linus. I'll apply this to it
and start my testing on it. I should have a pull request to Linus
before the end of the week.

-- Steve


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-07-04 14:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 15:21 [PATCH] arm64: ftrace: fix build error with CONFIG_FUNCTION_GRAPH_TRACER=n Arnd Bergmann
2023-06-23 15:35 ` Florent Revest
2023-06-29  0:04   ` Randy Dunlap
2023-06-30 16:02 ` Catalin Marinas
2023-07-04 13:59   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).