@@ -68,7 +68,13 @@
ldr r2, [r0]
adr r0, .Lftrace_stub
cmp r0, r2
- bne 1f
+ beq 1f
+
+ mcount_get_lr r1 @ lr of instrumented func
+ mcount_adjust_addr r0, lr @ instrumented function
+ badr lr, 1f
+ mov pc, r2
+1:
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
ldr r1, =ftrace_graph_return
@@ -84,12 +90,6 @@
#endif
mcount_exit
-
-1: mcount_get_lr r1 @ lr of instrumented func
- mcount_adjust_addr r0, lr @ instrumented function
- badr lr, 2f
- mov pc, r2
-2: mcount_exit
.endm
#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
Function graph does not work currently when CONFIG_DYNAMIC_TRACE is not set. This is because ftrace_function_trace is not always set to ftrace_stub when function_graph is in use. Do not skip checking of graph tracer functions when ftrace_function_trace is set. Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Julien Thierry <julien.thierry@arm.com> Cc: Russell King <linux@armlinux.org.uk> --- arch/arm/kernel/entry-ftrace.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Takahiro's patch was not signed-off, let me know if I need to change the Suggested-by into a Signed-off-by. -- 1.9.1