diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2009-09-25 08:39:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-02 17:34:32 -0400 |
commit | 4fb2847437d871fe579f820ceb18031db3359901 (patch) | |
tree | e2015dbc54178dd114eb0c41fa5a29d89dd15b41 /arch/arm/kernel/entry-armv.S | |
parent | 6806bfe18fca92e2001538b84cab5f63c5ea4bed (diff) |
ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
Instruction fault status register, IFSR, was introduced on ARMv6 to
provide status information about the last insturction fault. It
needed for proper prefetch abort handling.
Now we have three prefetch abort model:
* legacy - for CPUs before ARMv6. They doesn't provide neither
IFSR nor IFAR. We simulate IFSR with section translation fault
status for them to generalize code;
* ARMv6 - provides IFSR, but not IFAR;
* ARMv7 - provides both IFSR and IFAR.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-armv.S')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 0a2ba51cf35d..322410be573c 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -311,22 +311,16 @@ __pabt_svc: | |||
311 | tst r3, #PSR_I_BIT | 311 | tst r3, #PSR_I_BIT |
312 | biceq r9, r9, #PSR_I_BIT | 312 | biceq r9, r9, #PSR_I_BIT |
313 | 313 | ||
314 | @ | ||
315 | @ set args, then call main handler | ||
316 | @ | ||
317 | @ r0 - address of faulting instruction | ||
318 | @ r1 - pointer to registers on stack | ||
319 | @ | ||
320 | #ifdef MULTI_PABORT | ||
321 | mov r0, r2 @ pass address of aborted instruction. | 314 | mov r0, r2 @ pass address of aborted instruction. |
315 | #ifdef MULTI_PABORT | ||
322 | ldr r4, .LCprocfns | 316 | ldr r4, .LCprocfns |
323 | mov lr, pc | 317 | mov lr, pc |
324 | ldr pc, [r4, #PROCESSOR_PABT_FUNC] | 318 | ldr pc, [r4, #PROCESSOR_PABT_FUNC] |
325 | #else | 319 | #else |
326 | CPU_PABORT_HANDLER(r0, r2) | 320 | bl CPU_PABORT_HANDLER |
327 | #endif | 321 | #endif |
328 | msr cpsr_c, r9 @ Maybe enable interrupts | 322 | msr cpsr_c, r9 @ Maybe enable interrupts |
329 | mov r1, sp @ regs | 323 | mov r2, sp @ regs |
330 | bl do_PrefetchAbort @ call abort handler | 324 | bl do_PrefetchAbort @ call abort handler |
331 | 325 | ||
332 | @ | 326 | @ |
@@ -701,16 +695,16 @@ ENDPROC(__und_usr_unknown) | |||
701 | __pabt_usr: | 695 | __pabt_usr: |
702 | usr_entry | 696 | usr_entry |
703 | 697 | ||
704 | #ifdef MULTI_PABORT | ||
705 | mov r0, r2 @ pass address of aborted instruction. | 698 | mov r0, r2 @ pass address of aborted instruction. |
699 | #ifdef MULTI_PABORT | ||
706 | ldr r4, .LCprocfns | 700 | ldr r4, .LCprocfns |
707 | mov lr, pc | 701 | mov lr, pc |
708 | ldr pc, [r4, #PROCESSOR_PABT_FUNC] | 702 | ldr pc, [r4, #PROCESSOR_PABT_FUNC] |
709 | #else | 703 | #else |
710 | CPU_PABORT_HANDLER(r0, r2) | 704 | bl CPU_PABORT_HANDLER |
711 | #endif | 705 | #endif |
712 | enable_irq @ Enable interrupts | 706 | enable_irq @ Enable interrupts |
713 | mov r1, sp @ regs | 707 | mov r2, sp @ regs |
714 | bl do_PrefetchAbort @ call abort handler | 708 | bl do_PrefetchAbort @ call abort handler |
715 | UNWIND(.fnend ) | 709 | UNWIND(.fnend ) |
716 | /* fall through */ | 710 | /* fall through */ |