Skip to content

Commit

Permalink
ARM: entry: prefetch abort helper: pass aborted pc in r4 rather than r0
Browse files Browse the repository at this point in the history
This avoids unnecessary instructions for CPUs which implement the IFAR
(instruction fault address register).

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jun 30, 2011
1 parent b059bdc commit 8b41861
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
.endm

.macro pabt_helper
mov r0, r4 @ pass address of aborted instruction.
@ PABORT handler takes fault address in r4
#ifdef MULTI_PABORT
ldr ip, .LCprocfns
mov lr, pc
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mm/pabort-legacy.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* Function: legacy_pabort
*
* Params : r0 = address of aborted instruction
* Params : r4 = address of aborted instruction
*
* Returns : r0 = address of abort
* : r1 = Simulated IFSR with section translation fault status
Expand All @@ -14,6 +14,7 @@

.align 5
ENTRY(legacy_pabort)
mov r0, r4
mov r1, #5
mov pc, lr
ENDPROC(legacy_pabort)
3 changes: 2 additions & 1 deletion arch/arm/mm/pabort-v6.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* Function: v6_pabort
*
* Params : r0 = address of aborted instruction
* Params : r4 = address of aborted instruction
*
* Returns : r0 = address of abort
* : r1 = IFSR
Expand All @@ -14,6 +14,7 @@

.align 5
ENTRY(v6_pabort)
mov r0, r4
mrc p15, 0, r1, c5, c0, 1 @ get IFSR
mov pc, lr
ENDPROC(v6_pabort)
2 changes: 1 addition & 1 deletion arch/arm/mm/pabort-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
* Function: v6_pabort
*
* Params : r0 = address of aborted instruction
* Params : r4 = address of aborted instruction
*
* Returns : r0 = address of abort
* : r1 = IFSR
Expand Down

0 comments on commit 8b41861

Please sign in to comment.