function_graph: Place ftrace_graph_entry_stub() prototype in include/linux/ftrace.h
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 24 Apr 2019 16:34:46 +0000 (12:34 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 29 Apr 2019 21:17:22 +0000 (17:17 -0400)
ftrace_graph_entry_stub() is defined in generic code, its prototype should
be in the generic header and not defined throughout architecture specific
code in order to use it.

Cc: Greentime Hu <green.hu@gmail.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/nds32/kernel/ftrace.c
arch/parisc/kernel/ftrace.c
include/linux/ftrace.h

index 8a41372551ff3cbca4bcf0a94e1bea400dcb4c01..fd2a54b8cd5733f8ce64455bdf8762bd8a3a8251 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef CONFIG_DYNAMIC_FTRACE
 extern void (*ftrace_trace_function)(unsigned long, unsigned long,
                                     struct ftrace_ops*, struct pt_regs*);
-extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
 extern void ftrace_graph_caller(void);
 
 noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,
index e46a4157a8948862697755439496a16e5acb29f4..a28f915993b1b7b9684ee5761287b1bb6f60ab9b 100644 (file)
@@ -51,7 +51,6 @@ void notrace __hot ftrace_function_trampoline(unsigned long parent,
                                unsigned long org_sp_gr3)
 {
        extern ftrace_func_t ftrace_trace_function;  /* depends on CONFIG_DYNAMIC_FTRACE */
-       extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
 
        if (ftrace_trace_function != ftrace_stub) {
                /* struct ftrace_ops *op, struct pt_regs *regs); */
index 730876187344a2904896dfa2bbf6b8459736c177..9b28fce436ca5bf72cdd07f1c726722210bd6a6a 100644 (file)
@@ -751,6 +751,8 @@ struct ftrace_graph_ret {
 typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
 typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
 
+extern int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace);
+
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 
 struct fgraph_ops {