Commit 8b418616 authored by Russell King's avatar Russell King

ARM: entry: prefetch abort helper: pass aborted pc in r4 rather than r0

This avoids unnecessary instructions for CPUs which implement the IFAR
(instruction fault address register).
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b059bdc3
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
.endm .endm
.macro pabt_helper .macro pabt_helper
mov r0, r4 @ pass address of aborted instruction. @ PABORT handler takes fault address in r4
#ifdef MULTI_PABORT #ifdef MULTI_PABORT
ldr ip, .LCprocfns ldr ip, .LCprocfns
mov lr, pc mov lr, pc
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* /*
* Function: legacy_pabort * Function: legacy_pabort
* *
* Params : r0 = address of aborted instruction * Params : r4 = address of aborted instruction
* *
* Returns : r0 = address of abort * Returns : r0 = address of abort
* : r1 = Simulated IFSR with section translation fault status * : r1 = Simulated IFSR with section translation fault status
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
.align 5 .align 5
ENTRY(legacy_pabort) ENTRY(legacy_pabort)
mov r0, r4
mov r1, #5 mov r1, #5
mov pc, lr mov pc, lr
ENDPROC(legacy_pabort) ENDPROC(legacy_pabort)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* /*
* Function: v6_pabort * Function: v6_pabort
* *
* Params : r0 = address of aborted instruction * Params : r4 = address of aborted instruction
* *
* Returns : r0 = address of abort * Returns : r0 = address of abort
* : r1 = IFSR * : r1 = IFSR
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
.align 5 .align 5
ENTRY(v6_pabort) ENTRY(v6_pabort)
mov r0, r4
mrc p15, 0, r1, c5, c0, 1 @ get IFSR mrc p15, 0, r1, c5, c0, 1 @ get IFSR
mov pc, lr mov pc, lr
ENDPROC(v6_pabort) ENDPROC(v6_pabort)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* /*
* Function: v6_pabort * Function: v6_pabort
* *
* Params : r0 = address of aborted instruction * Params : r4 = address of aborted instruction
* *
* Returns : r0 = address of abort * Returns : r0 = address of abort
* : r1 = IFSR * : r1 = IFSR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment