Message ID | 20241106140414.760b502c@canb.auug.org.au (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | linux-next: build failure after merge of the ftrace tree | expand |
On Wed, 6 Nov 2024 14:04:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > Hi all, > > After merging the ftrace tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > In file included from include/linux/ftrace.h:23, > from include/linux/kvm_host.h:32, > from arch/powerpc/include/asm/kvm_ppc.h:19, > from arch/powerpc/include/asm/dbell.h:17, > from arch/powerpc/kernel/asm-offsets.c:36: > arch/powerpc/include/asm/ftrace.h: In function 'arch_ftrace_set_direct_caller': > arch/powerpc/include/asm/ftrace.h:141:38: error: invalid use of undefined type 'struct ftrace_regs' > 141 | struct pt_regs *regs = &fregs->regs; > | ^~ > > Caused by commit > > 7888af4166d4 ("ftrace: Make ftrace_regs abstract from direct use") > > interacting with commit > > a52f6043a223 ("powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS") > > from the powerpc tree. > > I have applied the following merge fix patch for today. > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 6 Nov 2024 13:33:53 +1100 > Subject: [PATCH] fix up for "ftrace: Make ftrace_regs abstract from direct use" > > from the ftrace tree interacting with "powerpc/ftrace: Add support for > DYNAMIC_FTRACE_WITH_DIRECT_CALLS" from the powerpc tree > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > arch/powerpc/include/asm/ftrace.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h > index bb2c90997618..db481b336bca 100644 > --- a/arch/powerpc/include/asm/ftrace.h > +++ b/arch/powerpc/include/asm/ftrace.h > @@ -138,7 +138,7 @@ unsigned long ftrace_call_adjust(unsigned long addr); > */ > static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr) > { > - struct pt_regs *regs = &fregs->regs; > + struct pt_regs *regs = &arch_ftrace_regs(fregs)->regs; > This fix looks fine to me. How should we handle this when we send our pull requests to Linus? I may forgot about this issue, and it also matters who's tree goes first. -- Steve > regs->orig_gpr3 = addr; > }
On Wed, 6 Nov 2024 at 05:02, Steven Rostedt <rostedt@goodmis.org> wrote: > > This fix looks fine to me. How should we handle this when we send our pull > requests to Linus? I may forgot about this issue, and it also matters who's > tree goes first. So just mention the issue in the pull request - preferably on both sides. Particularly for something like this that won't show up as an actual conflict, and that I won't catch in my build test because it's ppc-specific, I'd really like both trees to note this, so that regardless of ordering I'll be aware. And hey, sometimes people forget, and we'll see this issue (again) in mainline. It happens. Particularly with these kinds of semantic conflicts that are so easy to miss. I've seen this report, of course, but I will have lots of pull requests the next merge window, so the likelihood of me forgetting this detail is probably higher than the likelihood of individual maintainers forgetting about it when they generate their one (or few) pull request. Linus
Hi all, On Wed, 6 Nov 2024 14:04:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > After merging the ftrace tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > In file included from include/linux/ftrace.h:23, > from include/linux/kvm_host.h:32, > from arch/powerpc/include/asm/kvm_ppc.h:19, > from arch/powerpc/include/asm/dbell.h:17, > from arch/powerpc/kernel/asm-offsets.c:36: > arch/powerpc/include/asm/ftrace.h: In function 'arch_ftrace_set_direct_caller': > arch/powerpc/include/asm/ftrace.h:141:38: error: invalid use of undefined type 'struct ftrace_regs' > 141 | struct pt_regs *regs = &fregs->regs; > | ^~ > > Caused by commit > > 7888af4166d4 ("ftrace: Make ftrace_regs abstract from direct use") > > interacting with commit > > a52f6043a223 ("powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS") > > from the powerpc tree. > > I have applied the following merge fix patch for today. > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Wed, 6 Nov 2024 13:33:53 +1100 > Subject: [PATCH] fix up for "ftrace: Make ftrace_regs abstract from direct use" > > from the ftrace tree interacting with "powerpc/ftrace: Add support for > DYNAMIC_FTRACE_WITH_DIRECT_CALLS" from the powerpc tree > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > arch/powerpc/include/asm/ftrace.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h > index bb2c90997618..db481b336bca 100644 > --- a/arch/powerpc/include/asm/ftrace.h > +++ b/arch/powerpc/include/asm/ftrace.h > @@ -138,7 +138,7 @@ unsigned long ftrace_call_adjust(unsigned long addr); > */ > static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr) > { > - struct pt_regs *regs = &fregs->regs; > + struct pt_regs *regs = &arch_ftrace_regs(fregs)->regs; > > regs->orig_gpr3 = addr; > } This patch is now needed when the powerpc tree is merged with Linus' tree.
diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h index bb2c90997618..db481b336bca 100644 --- a/arch/powerpc/include/asm/ftrace.h +++ b/arch/powerpc/include/asm/ftrace.h @@ -138,7 +138,7 @@ unsigned long ftrace_call_adjust(unsigned long addr); */ static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, unsigned long addr) { - struct pt_regs *regs = &fregs->regs; + struct pt_regs *regs = &arch_ftrace_regs(fregs)->regs; regs->orig_gpr3 = addr; }