Thread (4 messages) 4 messages, 3 authors, 2024-11-20

Re: linux-next: build failure after merge of the ftrace tree

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2024-11-06 15:02:32
Also in: linux-next, lkml

On Wed, 6 Nov 2024 14:04:14 +1100
Stephen Rothwell [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
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 <redacted>
---
 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;
 }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help