arch: add missing prepare_ftrace_return() prototypes
authorArnd Bergmann <arnd@arndb.de>
Wed, 9 Aug 2023 10:07:56 +0000 (12:07 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 23 Nov 2023 10:32:32 +0000 (11:32 +0100)
The prototype for prepare_ftrace_return() is architecture specific and
can't be in a global header. Since it's normally called from assembly,
it doesn't really need a prototype, but we get a warning if it's missing:

arch/csky/kernel/ftrace.c:147:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes]
arch/microblaze/kernel/ftrace.c:22:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes]
arch/mips/kernel/ftrace.c:305:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes]

Add the prototypes for the three architectures that don't already have
one in asm/ftrace.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/csky/include/asm/ftrace.h
arch/microblaze/include/asm/ftrace.h
arch/mips/include/asm/ftrace.h

index 9b86341731b69f7776e9bf977f6bfc2fdda92820..fd215c38ef27750d4dfa27c85418179926d96d54 100644 (file)
@@ -26,5 +26,9 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
 
 struct dyn_arch_ftrace {
 };
+
+void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
+                          unsigned long frame_pointer);
+
 #endif /* !__ASSEMBLY__ */
 #endif /* __ASM_CSKY_FTRACE_H */
index 6a92bed37794ce1aeec2ed411056e4a71b10c1ca..4ca38b92a3a20992165bb1069e6217aa520b6c2c 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 extern void _mcount(void);
 extern void ftrace_call_graph(void);
+void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
 #endif
 
 #ifdef CONFIG_DYNAMIC_FTRACE
index db497a8167da299d64005b5789136d82ce6c8106..dc025888f6d28923b22193f8dcf7eb2b626730b6 100644 (file)
@@ -85,6 +85,10 @@ struct dyn_arch_ftrace {
 };
 
 #endif /*  CONFIG_DYNAMIC_FTRACE */
+
+void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
+                          unsigned long fp);
+
 #endif /* __ASSEMBLY__ */
 #endif /* CONFIG_FUNCTION_TRACER */
 #endif /* _ASM_MIPS_FTRACE_H */