Skip to content

Commit a13d588

Browse files
committed
csky/ftrace: Fixup error when disable CONFIG_DYNAMIC_FTRACE
When CONFIG_DYNAMIC_FTRACE is enabled, static ftrace will fail to boot up and compile. It's a carelessness when developing "dynamic ftrace" and "ftrace with regs". Signed-off-by: Guo Ren <[email protected]>
1 parent 2ef96a5 commit a13d588

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

arch/csky/abiv2/mcount.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ ENTRY(_mcount)
103103
mov a0, lr
104104
subi a0, 4
105105
ldw a1, (sp, 24)
106+
lrw a2, function_trace_op
107+
ldw a2, (a2, 0)
106108

107109
jsr r26
108110

arch/csky/kernel/ftrace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ int ftrace_disable_ftrace_graph_caller(void)
202202
#endif /* CONFIG_DYNAMIC_FTRACE */
203203
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
204204

205+
#ifdef CONFIG_DYNAMIC_FTRACE
205206
#ifndef CONFIG_CPU_HAS_ICACHE_INS
206207
struct ftrace_modify_param {
207208
int command;
@@ -231,6 +232,7 @@ void arch_ftrace_update_code(int command)
231232
stop_machine(__ftrace_modify_code, &param, cpu_online_mask);
232233
}
233234
#endif
235+
#endif /* CONFIG_DYNAMIC_FTRACE */
234236

235237
/* _mcount is defined in abi's mcount.S */
236238
EXPORT_SYMBOL(_mcount);

0 commit comments

Comments
 (0)