summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Thierry <julien.thierry@arm.com>2017-11-03 11:44:16 +0000
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-11-19 16:26:17 +0900
commit0ca0b513b52d45dfc9b52af9523840e15b3743d0 (patch)
treedbe50307818a15d778fca2c98479c6da9be9cf9e
parent50bf80beb282c0588da028c5bb97e9aa319fe102 (diff)
downloadlinux-4.9-exynos9110-0ca0b513b52d45dfc9b52af9523840e15b3743d0.tar.gz
linux-4.9-exynos9110-0ca0b513b52d45dfc9b52af9523840e15b3743d0.tar.bz2
linux-4.9-exynos9110-0ca0b513b52d45dfc9b52af9523840e15b3743d0.zip
arm64: Fix static use of function graph
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. Signed-off-by: Julien Thierry <julien.thierry@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> [sw0312.kim: cherry-pick mainline commit d125bffcefb2 to fix function_graph without CONFIG_DYNAMIC_TRACE] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I7eddd61e45ed2f459bd70785126eaf551ee7a3d2
-rw-r--r--arch/arm64/kernel/entry-ftrace.S12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S
index e1be42e11ff5..1175f5827ae1 100644
--- a/arch/arm64/kernel/entry-ftrace.S
+++ b/arch/arm64/kernel/entry-ftrace.S
@@ -108,13 +108,8 @@ ENTRY(_mcount)
mcount_get_lr x1 // function's lr (= parent's pc)
blr x2 // (*ftrace_trace_function)(pc, lr);
-#ifndef CONFIG_FUNCTION_GRAPH_TRACER
-skip_ftrace_call: // return;
- mcount_exit // }
-#else
- mcount_exit // return;
- // }
-skip_ftrace_call:
+skip_ftrace_call: // }
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
ldr_l x2, ftrace_graph_return
cmp x0, x2 // if ((ftrace_graph_return
b.ne ftrace_graph_caller // != ftrace_stub)
@@ -123,9 +118,8 @@ skip_ftrace_call:
adr_l x0, ftrace_graph_entry_stub // != ftrace_graph_entry_stub))
cmp x0, x2
b.ne ftrace_graph_caller // ftrace_graph_caller();
-
- mcount_exit
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
+ mcount_exit
ENDPROC(_mcount)
#else /* CONFIG_DYNAMIC_FTRACE */