summaryrefslogtreecommitdiff
path: root/arch/powerpc/boot/ppc_asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/ppc_asm.h')
-rw-r--r--arch/powerpc/boot/ppc_asm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ppc_asm.h b/arch/powerpc/boot/ppc_asm.h
index 192b97523b05..2824a3e32aab 100644
--- a/arch/powerpc/boot/ppc_asm.h
+++ b/arch/powerpc/boot/ppc_asm.h
@@ -84,4 +84,13 @@
#define MFTBU(dest) mfspr dest, SPRN_TBRU
#endif
+#ifdef CONFIG_PPC64_BOOT_WRAPPER
+#define LOAD_REG_ADDR(reg,name) \
+ ld reg,name@got(r2)
+#else
+#define LOAD_REG_ADDR(reg,name) \
+ lis reg,name@ha; \
+ addi reg,reg,name@l
+#endif
+
#endif /* _PPC64_PPC_ASM_H */