[PATCH 15/15] ARM: l2c: replace open coded VA->PA calculation

Ard Biesheuvel ard.biesheuvel at linaro.org
Sat Aug 5 13:52:22 PDT 2017


This replaces an open coded calculation to obtain the physical
address of a far symbol with a call to the new adr_l macro.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
---
 arch/arm/mm/l2c-l2x0-resume.S | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/mm/l2c-l2x0-resume.S b/arch/arm/mm/l2c-l2x0-resume.S
index fda415e4ca8f..3e75aa8c1aff 100644
--- a/arch/arm/mm/l2c-l2x0-resume.S
+++ b/arch/arm/mm/l2c-l2x0-resume.S
@@ -12,9 +12,7 @@
 	.text
 
 ENTRY(l2c310_early_resume)
-	adr	r0, 1f
-	ldr	r2, [r0]
-	add	r0, r2, r0
+	adr_l	r0, l2x0_saved_regs
 
 	ldmia	r0, {r1, r2, r3, r4, r5, r6, r7, r8}
 	@ r1 = phys address of L2C-310 controller
@@ -54,6 +52,3 @@ ENTRY(l2c310_early_resume)
 	str	r9, [r1, #L2X0_CTRL]
 	ret	lr
 ENDPROC(l2c310_early_resume)
-
-	.align
-1:	.long	l2x0_saved_regs - .
-- 
2.11.0




More information about the linux-arm-kernel mailing list