summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/opal-wrappers.S
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-09-26 06:40:56 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-28 12:22:12 +0300
commit8e93fb33c84f68db20c0bc2821334a4c54c3e251 (patch)
tree4059b8f1c36243441e504873b443362531e6a5f7 /arch/powerpc/platforms/powernv/opal-wrappers.S
parent754f611774e4b9357a944f5b703dd291c85161cf (diff)
downloadlinux-8e93fb33c84f68db20c0bc2821334a4c54c3e251.tar.xz
powerpc/64: provide a helper macro to load r2 with the kernel TOC
A later change stops the kernel using r2 and loads it with a poison value. Provide a PACATOC loading abstraction which can hide this detail. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220926034057.2360083-5-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-wrappers.S')
-rw-r--r--arch/powerpc/platforms/powernv/opal-wrappers.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index e5acc33b3b20..0ed95f753416 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -57,7 +57,7 @@ opal_return:
.long 0xa64b7b7d /* mthsrr1 r11 */
.long 0x2402004c /* hrfid */
#endif
- ld r2,PACATOC(r13)
+ LOAD_PACA_TOC()
ld r0,PPC_LR_STKOFF(r1)
mtlr r0
blr