From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 12 Oct 2005 07:44:55 +0000 (+1000)
Subject: powerpc: create 32 bit LOADADDR macro
X-Git-Tag: firefly_0821_release~39876^2~236
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7062018687da3d5d4966f58d6f0a58528b1e331b;p=firefly-linux-kernel-4.4.55.git

powerpc: create 32 bit LOADADDR macro

and use it in misc_32.S

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index fa8c20ffec78..27274108116f 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -43,8 +43,7 @@ _GLOBAL(reloc_offset)
 	mflr	r0
 	bl	1f
 1:	mflr	r3
-	lis	r4,1b@ha
-	addi	r4,r4,1b@l
+	LOADADDR(r4,1b)
 	subf	r3,r4,r3
 	mtlr	r0
 	blr
@@ -56,8 +55,7 @@ _GLOBAL(add_reloc_offset)
 	mflr	r0
 	bl	1f
 1:	mflr	r5
-	lis	r4,1b@ha
-	addi	r4,r4,1b@l
+	LOADADDR(r4,1b)
 	subf	r5,r4,r5
 	add	r3,r3,r5
 	mtlr	r0
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index e4350e406d2a..6aae414a161b 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -193,6 +193,10 @@ n:
 #define CMPI	cmpdi
 
 #else /* 32-bit */
+#define LOADADDR(rn,name) \
+	lis	rn,name@ha	\
+	addi	rn,rn,name@l
+
 #define LOADBASE(rn,name)	\
 	lis	rn,name@ha