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
This commit is contained in:
Nicholas Piggin 2022-09-26 13:40:55 +10:00 committed by Michael Ellerman
parent dab3b8f4fd
commit 754f611774
2 changed files with 4 additions and 2 deletions

View File

@ -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; \

View File

@ -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