Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0402bece authored by Russell King's avatar Russell King
Browse files

ARM: entry: prefetch/data abort helpers: avoid corrupting r4



Replace r4 with ip for calling abort helpers - ip is allowed to be
corrupted by called functions in the ABI, so it makes more sense to
use such a register.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ac8b9c1c
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -47,9 +47,9 @@
	.macro	pabt_helper
	.macro	pabt_helper
	mov	r0, r2			@ pass address of aborted instruction.
	mov	r0, r2			@ pass address of aborted instruction.
#ifdef MULTI_PABORT
#ifdef MULTI_PABORT
	ldr	r4, .LCprocfns
	ldr	ip, .LCprocfns
	mov	lr, pc
	mov	lr, pc
	ldr	pc, [r4, #PROCESSOR_PABT_FUNC]
	ldr	pc, [ip, #PROCESSOR_PABT_FUNC]
#else
#else
	bl	CPU_PABORT_HANDLER
	bl	CPU_PABORT_HANDLER
#endif
#endif
@@ -67,9 +67,9 @@
	@ the fault status register in r1.  r9 must be preserved.
	@ the fault status register in r1.  r9 must be preserved.
	@
	@
#ifdef MULTI_DABORT
#ifdef MULTI_DABORT
	ldr	r4, .LCprocfns
	ldr	ip, .LCprocfns
	mov	lr, pc
	mov	lr, pc
	ldr	pc, [r4, #PROCESSOR_DABT_FUNC]
	ldr	pc, [ip, #PROCESSOR_DABT_FUNC]
#else
#else
	bl	CPU_DABORT_HANDLER
	bl	CPU_DABORT_HANDLER
#endif
#endif