forked from Minki/linux
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:
parent
dab3b8f4fd
commit
754f611774
@ -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; \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user