aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-10-28 14:24:02 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-11-29 22:49:29 +1100
commit88670fdb26800228606c078ba4a018e9522a75a8 (patch)
treeb2f867c64cb7256fbbd394dc09af63eb8875a148 /arch/powerpc/kernel/trace/ftrace.c
parentab85a273957eadfcf7906bcd8a0adf5909d802ee (diff)
powerpc/ftrace: No need to read LR from stack in _mcount()
All functions calling _mcount do it exactly the same way, with the following sequence of instructions: c07de788: 7c 08 02 a6 mflr r0 c07de78c: 90 01 00 04 stw r0,4(r1) c07de790: 4b 84 13 65 bl c001faf4 <_mcount> Allthough LR is pushed on stack, it is still in r0 while entering _mcount(). Function arguments are in r3-r10, so r11 and r12 are still available at that point. Do like PPC64 and use r12 to move LR into CTR, so that r0 is preserved and doesn't need to be restored from the stack. While at it, bring back the EXPORT_SYMBOL at the end of _mcount. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/24a3ba7db388537c44a038026f926d885372e6d3.1635423081.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/trace/ftrace.c')
0 files changed, 0 insertions, 0 deletions