summaryrefslogtreecommitdiff
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-09-26 06:40:55 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-28 12:22:12 +0300
commit754f611774e4b9357a944f5b703dd291c85161cf (patch)
treee53c35afe57a2b5bc7567fdb16140f4a95800da6 /arch/powerpc/boot
parentdab3b8f4fd09c22e8dbb2d9608194c7d52252f33 (diff)
downloadlinux-754f611774e4b9357a944f5b703dd291c85161cf.tar.xz
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/boot')
-rw-r--r--arch/powerpc/boot/ppc_asm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/boot/ppc_asm.h b/arch/powerpc/boot/ppc_asm.h
index 2824a3e32aab..a66cfd76fa4d 100644
--- a/arch/powerpc/boot/ppc_asm.h
+++ b/arch/powerpc/boot/ppc_asm.h
@@ -86,7 +86,8 @@
#ifdef CONFIG_PPC64_BOOT_WRAPPER
#define LOAD_REG_ADDR(reg,name) \
- ld reg,name@got(r2)
+ addis reg,r2,name@toc@ha; \
+ addi reg,reg,name@toc@l
#else
#define LOAD_REG_ADDR(reg,name) \
lis reg,name@ha; \