diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-02-17 13:01:56 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-07 14:05:00 +0100 |
commit | 9bdb2eec3dde4d66b71cb4bbaebde0caed2cf0e3 (patch) | |
tree | a20345580d6257a21f4dc7c4be35564ae11ab4fb /arch/powerpc/kernel | |
parent | selftest/powerpc: Add PAPR sysfs attributes sniff test (diff) | |
download | linux-9bdb2eec3dde4d66b71cb4bbaebde0caed2cf0e3.tar.xz linux-9bdb2eec3dde4d66b71cb4bbaebde0caed2cf0e3.zip |
powerpc/ftrace: Don't use lmw/stmw in ftrace_regs_caller()
For the same reason as commit a85c728cb5e1 ("powerpc/32: Don't use
lmw/stmw for saving/restoring non volatile regs"), don't use
lmw/stmw in ftrace_regs_caller().
Use the same macros for PPC32 and PPC64.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ec286d2cc6989668a96f14543275437d2f3f0e3a.1645099283.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/trace/ftrace_mprofile.S | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/trace/ftrace_mprofile.S b/arch/powerpc/kernel/trace/ftrace_mprofile.S index 89639e64acd1..76dab07fd8fd 100644 --- a/arch/powerpc/kernel/trace/ftrace_mprofile.S +++ b/arch/powerpc/kernel/trace/ftrace_mprofile.S @@ -43,18 +43,16 @@ _GLOBAL(ftrace_regs_caller) /* Save all gprs to pt_regs */ SAVE_GPR(0, r1) -#ifdef CONFIG_PPC64 SAVE_GPRS(2, 11, r1) +#ifdef CONFIG_PPC64 /* Ok to continue? */ lbz r3, PACA_FTRACE_ENABLED(r13) cmpdi r3, 0 beq ftrace_no_trace +#endif SAVE_GPRS(12, 31, r1) -#else - stmw r2, GPR2(r1) -#endif /* Save previous stack pointer (r1) */ addi r8, r1, SWITCH_FRAME_SIZE @@ -120,11 +118,7 @@ ftrace_regs_call: #endif /* Restore gprs */ -#ifdef CONFIG_PPC64 REST_GPRS(2, 31, r1) -#else - lmw r2, GPR2(r1) -#endif /* Restore possibly modified LR */ PPC_LL r0, _LINK(r1) |