aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/mcount_64.S
diff options
context:
space:
mode:
authorTony Lu <zlu@ezchip.com>2015-03-27 14:46:38 -0400
committerChris Metcalf <cmetcalf@ezchip.com>2015-04-17 14:01:38 -0400
commit437d3e124d25daaa671bfecfd4015ecd2503a955 (patch)
treeddc6e9491b9a14a09c6476d0543e9f4896dfd77d /arch/tile/kernel/mcount_64.S
parenttile: map data region shadow of kernel as R/W (diff)
downloadlinux-dev-437d3e124d25daaa671bfecfd4015ecd2503a955.tar.xz
linux-dev-437d3e124d25daaa671bfecfd4015ecd2503a955.zip
tile: ftrace: fix function_graph tracer issues
- Add support for ARCH_SUPPORTS_FTRACE_OPS - Replace the instruction in ftrace_call with the bundle {move r10, lr; jal ftrace_stub}, so that the lr contains the right value after returning from ftrace_stub. An alternative fix might be to leave the instruction in ftrace_call alone when it is being updated with ftrace_stub. Signed-off-by: Tony Lu <zlu@ezchip.com> Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to '')
-rw-r--r--arch/tile/kernel/mcount_64.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/tile/kernel/mcount_64.S b/arch/tile/kernel/mcount_64.S
index 3c2b8d5e1d1a..6c6702451962 100644
--- a/arch/tile/kernel/mcount_64.S
+++ b/arch/tile/kernel/mcount_64.S
@@ -81,7 +81,12 @@ STD_ENTRY(ftrace_caller)
/* arg1: self return address */
/* arg2: parent's return address */
- { move r0, lr; move r1, r10 }
+ /* arg3: ftrace_ops */
+ /* arg4: regs (but make it NULL) */
+ { move r0, lr; moveli r2, hw2_last(function_trace_op) }
+ { move r1, r10; shl16insli r2, r2, hw1(function_trace_op) }
+ { movei r3, 0; shl16insli r2, r2, hw0(function_trace_op) }
+ ld r2,r2
.global ftrace_call
ftrace_call: