aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-02-17 13:01:59 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2022-03-08 00:05:01 +1100
commit2ca48dbb210767b9e7166d7d47febc8fcd1da6e1 (patch)
tree3b804ed9a517ab5a117db809a29209e748ef52f7
parentpowerpc/ftrace: Regroup PPC64 specific operations in ftrace_mprofile.S (diff)
downloadlinux-dev-2ca48dbb210767b9e7166d7d47febc8fcd1da6e1.tar.xz
linux-dev-2ca48dbb210767b9e7166d7d47febc8fcd1da6e1.zip
powerpc/ftrace: Use STK_GOT in ftrace_mprofile.S
Instead of open coding offset value 24, use STK_GOT when accessing got register in stack. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/9042bb30fa972056715fe5b6598a7c8049681293.1645099283.git.christophe.leroy@csgroup.eu
-rw-r--r--arch/powerpc/kernel/trace/ftrace_mprofile.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/trace/ftrace_mprofile.S b/arch/powerpc/kernel/trace/ftrace_mprofile.S
index f5d31c458e6b..4fa23e260cab 100644
--- a/arch/powerpc/kernel/trace/ftrace_mprofile.S
+++ b/arch/powerpc/kernel/trace/ftrace_mprofile.S
@@ -82,7 +82,7 @@
#ifdef CONFIG_PPC64
/* Save callee's TOC in the ABI compliant location */
- std r2, 24(r1)
+ std r2, STK_GOT(r1)
ld r2,PACATOC(r13) /* get kernel TOC in r2 */
addis r3,r2,function_trace_op@toc@ha
@@ -140,7 +140,7 @@
#ifdef CONFIG_PPC64
/* Restore callee's TOC */
- ld r2, 24(r1)
+ ld r2, STK_GOT(r1)
#endif
/* Pop our stack frame */