diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-26 07:37:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-02 05:56:10 -0400 |
commit | 8dfe7ac96fedd4f5219879f63a8a546a33609daf (patch) | |
tree | c723c0845d9f2080d9a0517bd2a94014870d7134 /arch/arm | |
parent | d9600c99c549732a501cb727157800623a06175d (diff) |
ARM: entry: prefetch abort: tail-call the main prefetch abort handler
Tail-call the main C prefetch abort handler code from the per-CPU
helper code. Also note that the helper function becomes ABI
compliant in terms of the registers preserved.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 8 | ||||
-rw-r--r-- | arch/arm/mm/pabort-legacy.S | 9 | ||||
-rw-r--r-- | arch/arm/mm/pabort-v6.S | 9 | ||||
-rw-r--r-- | arch/arm/mm/pabort-v7.S | 11 |
4 files changed, 19 insertions, 18 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index b17e57949d3b..af2fba7a4cae 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -45,7 +45,7 @@ | |||
45 | .endm | 45 | .endm |
46 | 46 | ||
47 | .macro pabt_helper | 47 | .macro pabt_helper |
48 | @ PABORT handler takes fault address in r4 | 48 | @ PABORT handler takes pt_regs in r2, fault address in r4 and psr in r5 |
49 | #ifdef MULTI_PABORT | 49 | #ifdef MULTI_PABORT |
50 | ldr ip, .LCprocfns | 50 | ldr ip, .LCprocfns |
51 | mov lr, pc | 51 | mov lr, pc |
@@ -306,9 +306,8 @@ ENDPROC(__und_svc) | |||
306 | .align 5 | 306 | .align 5 |
307 | __pabt_svc: | 307 | __pabt_svc: |
308 | svc_entry | 308 | svc_entry |
309 | pabt_helper | ||
310 | mov r2, sp @ regs | 309 | mov r2, sp @ regs |
311 | bl do_PrefetchAbort @ call abort handler | 310 | pabt_helper |
312 | 311 | ||
313 | @ | 312 | @ |
314 | @ IRQs off again before pulling preserved data off the stack | 313 | @ IRQs off again before pulling preserved data off the stack |
@@ -653,9 +652,8 @@ ENDPROC(__und_usr_unknown) | |||
653 | .align 5 | 652 | .align 5 |
654 | __pabt_usr: | 653 | __pabt_usr: |
655 | usr_entry | 654 | usr_entry |
656 | pabt_helper | ||
657 | mov r2, sp @ regs | 655 | mov r2, sp @ regs |
658 | bl do_PrefetchAbort @ call abort handler | 656 | pabt_helper |
659 | UNWIND(.fnend ) | 657 | UNWIND(.fnend ) |
660 | /* fall through */ | 658 | /* fall through */ |
661 | /* | 659 | /* |
diff --git a/arch/arm/mm/pabort-legacy.S b/arch/arm/mm/pabort-legacy.S index 8a5d8aaf2d5e..8bbff025269a 100644 --- a/arch/arm/mm/pabort-legacy.S +++ b/arch/arm/mm/pabort-legacy.S | |||
@@ -4,10 +4,11 @@ | |||
4 | /* | 4 | /* |
5 | * Function: legacy_pabort | 5 | * Function: legacy_pabort |
6 | * | 6 | * |
7 | * Params : r4 = address of aborted instruction | 7 | * Params : r2 = pt_regs |
8 | * : r4 = address of aborted instruction | ||
9 | * : r5 = psr for parent context | ||
8 | * | 10 | * |
9 | * Returns : r0 = address of abort | 11 | * Returns : r4 - r11, r13 preserved |
10 | * : r1 = Simulated IFSR with section translation fault status | ||
11 | * | 12 | * |
12 | * Purpose : obtain information about current prefetch abort. | 13 | * Purpose : obtain information about current prefetch abort. |
13 | */ | 14 | */ |
@@ -16,5 +17,5 @@ | |||
16 | ENTRY(legacy_pabort) | 17 | ENTRY(legacy_pabort) |
17 | mov r0, r4 | 18 | mov r0, r4 |
18 | mov r1, #5 | 19 | mov r1, #5 |
19 | mov pc, lr | 20 | b do_PrefetchAbort |
20 | ENDPROC(legacy_pabort) | 21 | ENDPROC(legacy_pabort) |
diff --git a/arch/arm/mm/pabort-v6.S b/arch/arm/mm/pabort-v6.S index eaac1cb7c4cc..9627646ce783 100644 --- a/arch/arm/mm/pabort-v6.S +++ b/arch/arm/mm/pabort-v6.S | |||
@@ -4,10 +4,11 @@ | |||
4 | /* | 4 | /* |
5 | * Function: v6_pabort | 5 | * Function: v6_pabort |
6 | * | 6 | * |
7 | * Params : r4 = address of aborted instruction | 7 | * Params : r2 = pt_regs |
8 | * : r4 = address of aborted instruction | ||
9 | * : r5 = psr for parent context | ||
8 | * | 10 | * |
9 | * Returns : r0 = address of abort | 11 | * Returns : r4 - r11, r13 preserved |
10 | * : r1 = IFSR | ||
11 | * | 12 | * |
12 | * Purpose : obtain information about current prefetch abort. | 13 | * Purpose : obtain information about current prefetch abort. |
13 | */ | 14 | */ |
@@ -16,5 +17,5 @@ | |||
16 | ENTRY(v6_pabort) | 17 | ENTRY(v6_pabort) |
17 | mov r0, r4 | 18 | mov r0, r4 |
18 | mrc p15, 0, r1, c5, c0, 1 @ get IFSR | 19 | mrc p15, 0, r1, c5, c0, 1 @ get IFSR |
19 | mov pc, lr | 20 | b do_PrefetchAbort |
20 | ENDPROC(v6_pabort) | 21 | ENDPROC(v6_pabort) |
diff --git a/arch/arm/mm/pabort-v7.S b/arch/arm/mm/pabort-v7.S index b515e0b059b3..875761f44f3b 100644 --- a/arch/arm/mm/pabort-v7.S +++ b/arch/arm/mm/pabort-v7.S | |||
@@ -2,12 +2,13 @@ | |||
2 | #include <asm/assembler.h> | 2 | #include <asm/assembler.h> |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Function: v6_pabort | 5 | * Function: v7_pabort |
6 | * | 6 | * |
7 | * Params : r4 = address of aborted instruction | 7 | * Params : r2 = pt_regs |
8 | * : r4 = address of aborted instruction | ||
9 | * : r5 = psr for parent context | ||
8 | * | 10 | * |
9 | * Returns : r0 = address of abort | 11 | * Returns : r4 - r11, r13 preserved |
10 | * : r1 = IFSR | ||
11 | * | 12 | * |
12 | * Purpose : obtain information about current prefetch abort. | 13 | * Purpose : obtain information about current prefetch abort. |
13 | */ | 14 | */ |
@@ -16,5 +17,5 @@ | |||
16 | ENTRY(v7_pabort) | 17 | ENTRY(v7_pabort) |
17 | mrc p15, 0, r0, c6, c0, 2 @ get IFAR | 18 | mrc p15, 0, r0, c6, c0, 2 @ get IFAR |
18 | mrc p15, 0, r1, c5, c0, 1 @ get IFSR | 19 | mrc p15, 0, r1, c5, c0, 1 @ get IFSR |
19 | mov pc, lr | 20 | b do_PrefetchAbort |
20 | ENDPROC(v7_pabort) | 21 | ENDPROC(v7_pabort) |