Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / arc / kernel / entry-compact.S
index 59f52035b4ea34a582b50b80e5db48893c1dc7bf..0cb0abaa0479e53ab1ea7ef8e45ab0cd42d2e965 100644 (file)
@@ -142,16 +142,12 @@ int1_saved_reg:
        .zero 4
 
 /* Each Interrupt level needs its own scratch */
-#ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS
-
 ARCFP_DATA int2_saved_reg
        .type   int2_saved_reg, @object
        .size   int2_saved_reg, 4
 int2_saved_reg:
        .zero 4
 
-#endif
-
 ; ---------------------------------------------
        .section .text, "ax",@progbits
 
@@ -215,6 +211,31 @@ END(handle_interrupt_level2)
 
 #endif
 
+; ---------------------------------------------
+; User Mode Memory Bus Error Interrupt Handler
+; (Kernel mode memory errors handled via seperate exception vectors)
+; ---------------------------------------------
+ENTRY(mem_service)
+
+       INTERRUPT_PROLOGUE 2
+
+       mov r0, ilink2
+       mov r1, sp
+
+       ; User process needs to be killed with SIGBUS, but first need to get
+       ; out of the L2 interrupt context (drop to pure kernel mode) and jump
+       ; off to "C" code where SIGBUS in enqueued
+       lr  r3, [status32]
+       bclr r3, r3, STATUS_A2_BIT
+       or  r3, r3, (STATUS_E1_MASK|STATUS_E2_MASK)
+       sr  r3, [status32_l2]
+       mov ilink2, 1f
+       rtie
+1:
+       bl  do_memory_error
+       b   ret_from_exception
+END(mem_service)
+
 ; ---------------------------------------------
 ;  Level 1 ISR
 ; ---------------------------------------------
@@ -320,6 +341,9 @@ END(call_do_page_fault)
 
 .Lrestore_regs:
 
+       # Interrpts are actually disabled from this point on, but will get
+       # reenabled after we return from interrupt/exception.
+       # But irq tracer needs to be told now...
        TRACE_ASM_IRQ_ENABLE
 
        lr      r10, [status32]
This page took 0.026115 seconds and 5 git commands to generate.