[MIPS] Rewrite spurious_interrupt from assembler to C.
authorRalf Baechle <ralf@linux-mips.org>
Sat, 1 Apr 2006 20:17:45 +0000 (21:17 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 19 Apr 2006 02:14:18 +0000 (04:14 +0200)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 files changed:
arch/mips/au1000/common/int-handler.S
arch/mips/ddb5xxx/ddb5476/int-handler.S
arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c
arch/mips/ddb5xxx/ddb5477/int-handler.S
arch/mips/dec/int-handler.S
arch/mips/galileo-boards/ev96100/int-handler.S
arch/mips/gt64120/ev64120/int-handler.S
arch/mips/jazz/int-handler.S
arch/mips/kernel/entry.S
arch/mips/kernel/irq.c
arch/mips/mips-boards/generic/mipsIRQ.S
arch/mips/mips-boards/sim/sim_irq.S
arch/mips/momentum/ocelot_3/int-handler.S
arch/mips/momentum/ocelot_c/int-handler.S
arch/mips/philips/pnx8550/common/mipsIRQ.S
arch/mips/tx4927/common/tx4927_irq_handler.S
arch/mips/vr41xx/common/int-handler.S
include/asm-mips/irq.h

index 1c4ca883321ec52e83fb505708d29ff018f1d6ce..65baa8a8c522bb56ebc84c1d7d57a27421950b5f 100644 (file)
@@ -64,5 +64,6 @@ NESTED(au1000_IRQ, PT_SIZE, sp)
 
 5:
        move    a0, sp
-       j       spurious_interrupt
+       jal     spurious_interrupt
+       j       ret_from_irq
 END(au1000_IRQ)
index 12c292e189ba95489df172abd2eab84c4b3d4555..0c2bdae96bb11bca666163606a1ed39d4fb6f934 100644 (file)
@@ -54,7 +54,8 @@
        .set    reorder
 
        /* wrong alarm or masked ... */
-       // j    spurious_interrupt
+       // jal  spurious_interrupt
+       // j    ret_from_irq
        move    a0, sp
        jal     vrc5476_irq_dispatch
        j       ret_from_irq
index f66fe5b5863660b4014c953ba8726f8b1fe6c87e..581eabad5f825b2ed918fa85be40074ed7006eb4 100644 (file)
@@ -80,8 +80,6 @@ vrc5476_irq_init(u32 base)
 asmlinkage void
 vrc5476_irq_dispatch(struct pt_regs *regs)
 {
-       extern void spurious_interrupt(void);
-
        u32 mask;
        int nile4_irq;
 
@@ -107,5 +105,5 @@ vrc5476_irq_dispatch(struct pt_regs *regs)
                        return;
                }
        }
-       spurious_interrupt();
+       spurious_interrupt(regs);
 }
index a2502a14400e005499e9a95da1e6cd959bb0e1da..9884874dbeb50f9e2834044d0a0dc11756cb1eef 100644 (file)
@@ -44,8 +44,8 @@
        .set    reorder
 
        /* wrong alarm or masked ... */
-       j       spurious_interrupt
-       nop
+       jal     spurious_interrupt
+       j       ret_from_irq
        END(ddb5477_handle_int)
 
        .align  5
index 41fa372007bf07889f2facffc6edfd76f8287ff9..5bafd585ac3e8b3e43f9b8e59eb818e02cd614df 100644 (file)
@@ -282,7 +282,9 @@ fpu:
 #endif
 
 spurious:
-               j       spurious_interrupt
+               jal     spurious_interrupt
+                nop
+               j       ret_from_irq
                 nop
                END(decstation_handle_int)
 
index ff4d10a388597e50d0a08652f874237919aa80f9..0edf1fec2905f92173bcb9ee1dfcecee0072d49a 100644 (file)
@@ -29,5 +29,6 @@ NESTED(ev96100IRQ, PT_SIZE, sp)
        jal     ev96100_cpu_irq
        j       ret_from_irq
 
-3:     j       spurious_interrupt
+3:     jal     spurious_interrupt
+       j       ret_from_irq
        END(ev96100IRQ)
index 752435faf2dee6c0337e13652cc2d8199dbd3d67..9dda5b449522d82fef447bd44e1ef559f4502930 100644 (file)
@@ -39,8 +39,9 @@
                nop
 
     /* wrong alarm or masked ... */
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
                END(galileo_handle_int)
 
 
index dc752c67b528c2962344fec31352c808e11eba47..e35f5fcd3f900c3c50f3bde73a7cb7023e6c0ae7 100644 (file)
@@ -263,7 +263,8 @@ loc_call:   /*
 /*
  * "Jump extender" to reach spurious_interrupt
  */
-3:             j       spurious_interrupt
+3:             jal     spurious_interrupt
+               j       ret_from_irq
 
 /*
  * Vectors for interrupts generated by local devices
index 83c87fe4ee4f0b631cb5be82dfd9783d15c3541d..371571f4f280b01628460f28ff33ef1eaa09cb0a 100644 (file)
@@ -119,29 +119,3 @@ syscall_exit_work:
        li      a1, 1
        jal     do_syscall_trace
        b       resume_userspace
-
-/*
- * Common spurious interrupt handler.
- */
-LEAF(spurious_interrupt)
-       /*
-        * Someone tried to fool us by sending an interrupt but we
-        * couldn't find a cause for it.
-        */
-       PTR_LA  t1, irq_err_count
-#ifdef CONFIG_SMP
-1:     ll      t0, (t1)
-       addiu   t0, 1
-       sc      t0, (t1)
-#if R10000_LLSC_WAR
-       beqzl   t0, 1b
-#else
-       beqz    t0, 1b
-#endif
-#else
-       lw      t0, (t1)
-       addiu   t0, 1
-       sw      t0, (t1)
-#endif
-       j       ret_from_irq
-       END(spurious_interrupt)
index 3dd76b3d296778c1f81596a8888da5bf96fc4ab3..e0efc4f2f93e23c05d9d6500553309fbfbf776f6 100644 (file)
@@ -101,6 +101,11 @@ skip:
        return 0;
 }
 
+asmlinkage void spurious_interrupt(struct pt_regs *regs)
+{
+       atomic_inc(&irq_err_count);
+}
+
 #ifdef CONFIG_KGDB
 extern void breakpoint(void);
 extern void set_debug_traps(void);
index ddd5c73a29719c2cbfb1a2187c373d9e0f7d3ac7..973e10aaacd5c70b1dbb48565999a1631669ea09 100644 (file)
 
 
 spurious:
-       j       spurious_interrupt
+       jal     spurious_interrupt
+        nop
+       j       ret_from_irq
         nop
        END(mipsIRQ)
index da52297a221635b839b9537c8ef6a5ad4c8d70c6..d16cf38220763f34f7ef1a52da91cc4be21076b7 100644 (file)
@@ -94,6 +94,8 @@
 
 
 spurious:
-       j       spurious_interrupt
+       jal     spurious_interrupt
+        nop
+       j       ret_from_irq
         nop
        END(simIRQ)
index 4522f09ed769d627eb26cc350b0d1bda04b9da5b..b1207262984a23b0b61e8e14daa838417f0bf33f 100644 (file)
                .set    reorder
 
                /* wrong alarm or masked ... */
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
+                nop
                END(ocelot3_handle_int)
 
                .align  5
index 52349d9bf1be8f5b3d3a1238a8145ae90721a5dc..f77834193c3cba9ce5be0788b6fa22079935b3eb 100644 (file)
@@ -52,8 +52,9 @@
                .set    reorder
 
                /* wrong alarm or masked ... */
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
                END(ocelot_handle_int)
 
                .align  5
index 338bffda3fab438829f150d2764ef66c596d37e3..e049a719f83d7bdaa964941ac9ca6fcf4600829e 100644 (file)
@@ -46,8 +46,9 @@
 
                /* wrong alarm or masked ... */
 
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
                END(cp0_irqdispatch)
 
                .align  5
index dd3ceda9d712f84cc6e828bd446556c9a76913b9..0b2ea02574f28ff7f20fd3b06f5eeb7db343767a 100644 (file)
@@ -63,8 +63,9 @@
                .set    reorder
 
                /* wrong alarm or masked ... */
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
                END(tx4927_irq_handler)
 
                .align  5
index 2b6043f16d098f0f125e99970747b6842e9b13c0..e8652348fef1fa174f2218f6070d0ecf85b79d8d 100644 (file)
                bnez    t1, handle_irq
                li      a0, 1
 
-               j       spurious_interrupt
+               jal     spurious_interrupt
                nop
+               j       ret_from_irq
+                nop
 
 handle_int:
                jal     irq_dispatch
index 8a342ccb34a80e34c3c52835759d675744162142..d7aecca3b95f35a6f905ba29cae94074dca817d0 100644 (file)
@@ -46,5 +46,6 @@ do {                                                                  \
 #endif
 
 extern void arch_init_irq(void);
+extern void spurious_interrupt(struct pt_regs *regs);
 
 #endif /* _ASM_IRQ_H */