diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-07-23 16:37:51 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-08-03 02:56:57 -0400 |
commit | d562aca37a543cc3de85be6a6946771a27d50c6a (patch) | |
tree | 1b42c983b0af031d9fe970a6a253b111c570d441 /arch/parisc | |
parent | dcb8cfbd8fe9e62c7d64e82288d3ffe2502b7371 (diff) |
parisc/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
Pass ftrace_ops to ftrace functions to ftrace_trace_function().
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/ftrace.h | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/ftrace.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/parisc/include/asm/ftrace.h b/arch/parisc/include/asm/ftrace.h index 958c0aa5dbb2..a7cf0d05ccf4 100644 --- a/arch/parisc/include/asm/ftrace.h +++ b/arch/parisc/include/asm/ftrace.h | |||
@@ -8,6 +8,7 @@ extern void mcount(void); | |||
8 | #define MCOUNT_ADDR ((unsigned long)mcount) | 8 | #define MCOUNT_ADDR ((unsigned long)mcount) |
9 | #define MCOUNT_INSN_SIZE 4 | 9 | #define MCOUNT_INSN_SIZE 4 |
10 | #define CC_USING_NOP_MCOUNT | 10 | #define CC_USING_NOP_MCOUNT |
11 | #define ARCH_SUPPORTS_FTRACE_OPS 1 | ||
11 | extern unsigned long sys_call_table[]; | 12 | extern unsigned long sys_call_table[]; |
12 | 13 | ||
13 | extern unsigned long return_address(unsigned int); | 14 | extern unsigned long return_address(unsigned int); |
diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c index b6fb30f2e4bf..23ce416787ac 100644 --- a/arch/parisc/kernel/ftrace.c +++ b/arch/parisc/kernel/ftrace.c | |||
@@ -53,8 +53,12 @@ void notrace __hot ftrace_function_trampoline(unsigned long parent, | |||
53 | #ifndef CONFIG_DYNAMIC_FTRACE | 53 | #ifndef CONFIG_DYNAMIC_FTRACE |
54 | extern ftrace_func_t ftrace_trace_function; | 54 | extern ftrace_func_t ftrace_trace_function; |
55 | #endif | 55 | #endif |
56 | if (ftrace_trace_function != ftrace_stub) | 56 | extern struct ftrace_ops *function_trace_op; |
57 | ftrace_trace_function(self_addr, parent, NULL, NULL); | 57 | |
58 | if (function_trace_op->flags & FTRACE_OPS_FL_ENABLED && | ||
59 | ftrace_trace_function != ftrace_stub) | ||
60 | ftrace_trace_function(self_addr, parent, | ||
61 | function_trace_op, NULL); | ||
58 | 62 | ||
59 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 63 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
60 | if (ftrace_graph_return != (trace_func_graph_ret_t) ftrace_stub || | 64 | if (ftrace_graph_return != (trace_func_graph_ret_t) ftrace_stub || |