diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2017-04-19 18:22:23 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-23 20:32:24 +1000 |
commit | 700e64377c2c8e2406e9c4c1632e2eabdb3a95a1 (patch) | |
tree | 81366b9ea46323f532a7d74565899b013fa7d58d | |
parent | d08f8a28bcc8c2004a7186839148fc9aadd5cc6f (diff) | |
download | op-kernel-dev-700e64377c2c8e2406e9c4c1632e2eabdb3a95a1.zip op-kernel-dev-700e64377c2c8e2406e9c4c1632e2eabdb3a95a1.tar.gz |
powerpc/ftrace: Move stack setup and teardown code into ftrace_graph_caller()
Move the stack setup and teardown code into ftrace_graph_caller(). This way, we
don't incur the cost of setting it up unless function graph is enabled for this
function.
Also, remove the extraneous LR restore code after the function graph stub. LR
has previously been restored and neither livepatch_handler() nor
ftrace_graph_caller() return back here.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
[mpe: Drop bad change to non-mprofile-kernel version of ftrace_graph_caller]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 6432d4b..cb3fb98 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -1313,16 +1313,12 @@ ftrace_call: #endif #ifdef CONFIG_FUNCTION_GRAPH_TRACER - stdu r1, -112(r1) .globl ftrace_graph_call ftrace_graph_call: b ftrace_graph_stub _GLOBAL(ftrace_graph_stub) - addi r1, r1, 112 #endif - ld r0,LRSAVE(r1) /* restore callee's lr at _mcount site */ - mtlr r0 bctr /* jump after _mcount site */ #endif /* CC_USING_MPROFILE_KERNEL */ @@ -1471,6 +1467,7 @@ _GLOBAL(ftrace_graph_caller) #else /* CC_USING_MPROFILE_KERNEL */ _GLOBAL(ftrace_graph_caller) + stdu r1, -112(r1) /* with -mprofile-kernel, parameter regs are still alive at _mcount */ std r10, 104(r1) std r9, 96(r1) |