aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-09-26 13:40:55 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-28 19:22:12 +1000
commit754f611774e4b9357a944f5b703dd291c85161cf (patch)
treee53c35afe57a2b5bc7567fdb16140f4a95800da6 /arch/powerpc/include/asm
parentpowerpc/64: asm use consistent global variable declaration and access (diff)
downloadlinux-dev-754f611774e4b9357a944f5b703dd291c85161cf.tar.xz
linux-dev-754f611774e4b9357a944f5b703dd291c85161cf.zip
powerpc/64: switch asm helpers from GOT to TOC relative addressing
There is no need to use GOT addressing within the kernel. 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-4-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index eeb7dc8cd45f..9972f3e90c9d 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -337,7 +337,8 @@ n:
rldimi reg, tmp, 32, 0
#define LOAD_REG_ADDR(reg,name) \
- ld reg,name@got(r2)
+ addis reg,r2,name@toc@ha; \
+ addi reg,reg,name@toc@l
#define LOAD_REG_ADDRBASE(reg,name) LOAD_REG_ADDR(reg,name)
#define ADDROFF(name) 0