Commit 93373ed4d87fb02554ce020d929388ac16913664

Authored by Ralf Baechle
1 parent c9e321e095

[MIPS] Rewrite spurious_interrupt from assembler to C.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Showing 18 changed files with 40 additions and 44 deletions Side-by-side Diff

arch/mips/au1000/common/int-handler.S
... ... @@ -64,6 +64,7 @@
64 64  
65 65 5:
66 66 move a0, sp
67   - j spurious_interrupt
  67 + jal spurious_interrupt
  68 + j ret_from_irq
68 69 END(au1000_IRQ)
arch/mips/ddb5xxx/ddb5476/int-handler.S
... ... @@ -54,7 +54,8 @@
54 54 .set reorder
55 55  
56 56 /* wrong alarm or masked ... */
57   - // j spurious_interrupt
  57 + // jal spurious_interrupt
  58 + // j ret_from_irq
58 59 move a0, sp
59 60 jal vrc5476_irq_dispatch
60 61 j ret_from_irq
arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c
... ... @@ -80,8 +80,6 @@
80 80 asmlinkage void
81 81 vrc5476_irq_dispatch(struct pt_regs *regs)
82 82 {
83   - extern void spurious_interrupt(void);
84   -
85 83 u32 mask;
86 84 int nile4_irq;
87 85  
... ... @@ -107,6 +105,6 @@
107 105 return;
108 106 }
109 107 }
110   - spurious_interrupt();
  108 + spurious_interrupt(regs);
111 109 }
arch/mips/ddb5xxx/ddb5477/int-handler.S
... ... @@ -44,8 +44,8 @@
44 44 .set reorder
45 45  
46 46 /* wrong alarm or masked ... */
47   - j spurious_interrupt
48   - nop
  47 + jal spurious_interrupt
  48 + j ret_from_irq
49 49 END(ddb5477_handle_int)
50 50  
51 51 .align 5
arch/mips/dec/int-handler.S
... ... @@ -282,7 +282,9 @@
282 282 #endif
283 283  
284 284 spurious:
285   - j spurious_interrupt
  285 + jal spurious_interrupt
  286 + nop
  287 + j ret_from_irq
286 288 nop
287 289 END(decstation_handle_int)
288 290  
arch/mips/galileo-boards/ev96100/int-handler.S
... ... @@ -29,6 +29,7 @@
29 29 jal ev96100_cpu_irq
30 30 j ret_from_irq
31 31  
32   -3: j spurious_interrupt
  32 +3: jal spurious_interrupt
  33 + j ret_from_irq
33 34 END(ev96100IRQ)
arch/mips/gt64120/ev64120/int-handler.S
... ... @@ -39,8 +39,9 @@
39 39 nop
40 40  
41 41 /* wrong alarm or masked ... */
42   - j spurious_interrupt
  42 + jal spurious_interrupt
43 43 nop
  44 + j ret_from_irq
44 45 END(galileo_handle_int)
45 46  
46 47  
arch/mips/jazz/int-handler.S
... ... @@ -263,7 +263,8 @@
263 263 /*
264 264 * "Jump extender" to reach spurious_interrupt
265 265 */
266   -3: j spurious_interrupt
  266 +3: jal spurious_interrupt
  267 + j ret_from_irq
267 268  
268 269 /*
269 270 * Vectors for interrupts generated by local devices
arch/mips/kernel/entry.S
... ... @@ -119,30 +119,4 @@
119 119 li a1, 1
120 120 jal do_syscall_trace
121 121 b resume_userspace
122   -
123   -/*
124   - * Common spurious interrupt handler.
125   - */
126   -LEAF(spurious_interrupt)
127   - /*
128   - * Someone tried to fool us by sending an interrupt but we
129   - * couldn't find a cause for it.
130   - */
131   - PTR_LA t1, irq_err_count
132   -#ifdef CONFIG_SMP
133   -1: ll t0, (t1)
134   - addiu t0, 1
135   - sc t0, (t1)
136   -#if R10000_LLSC_WAR
137   - beqzl t0, 1b
138   -#else
139   - beqz t0, 1b
140   -#endif
141   -#else
142   - lw t0, (t1)
143   - addiu t0, 1
144   - sw t0, (t1)
145   -#endif
146   - j ret_from_irq
147   - END(spurious_interrupt)
arch/mips/kernel/irq.c
... ... @@ -101,6 +101,11 @@
101 101 return 0;
102 102 }
103 103  
  104 +asmlinkage void spurious_interrupt(struct pt_regs *regs)
  105 +{
  106 + atomic_inc(&irq_err_count);
  107 +}
  108 +
104 109 #ifdef CONFIG_KGDB
105 110 extern void breakpoint(void);
106 111 extern void set_debug_traps(void);
arch/mips/mips-boards/generic/mipsIRQ.S
... ... @@ -150,7 +150,9 @@
150 150  
151 151  
152 152 spurious:
153   - j spurious_interrupt
  153 + jal spurious_interrupt
  154 + nop
  155 + j ret_from_irq
154 156 nop
155 157 END(mipsIRQ)
arch/mips/mips-boards/sim/sim_irq.S
... ... @@ -94,7 +94,9 @@
94 94  
95 95  
96 96 spurious:
97   - j spurious_interrupt
  97 + jal spurious_interrupt
  98 + nop
  99 + j ret_from_irq
98 100 nop
99 101 END(simIRQ)
arch/mips/momentum/ocelot_3/int-handler.S
... ... @@ -78,8 +78,10 @@
78 78 .set reorder
79 79  
80 80 /* wrong alarm or masked ... */
81   - j spurious_interrupt
  81 + jal spurious_interrupt
82 82 nop
  83 + j ret_from_irq
  84 + nop
83 85 END(ocelot3_handle_int)
84 86  
85 87 .align 5
arch/mips/momentum/ocelot_c/int-handler.S
... ... @@ -52,8 +52,9 @@
52 52 .set reorder
53 53  
54 54 /* wrong alarm or masked ... */
55   - j spurious_interrupt
  55 + jal spurious_interrupt
56 56 nop
  57 + j ret_from_irq
57 58 END(ocelot_handle_int)
58 59  
59 60 .align 5
arch/mips/philips/pnx8550/common/mipsIRQ.S
... ... @@ -46,8 +46,9 @@
46 46  
47 47 /* wrong alarm or masked ... */
48 48  
49   - j spurious_interrupt
  49 + jal spurious_interrupt
50 50 nop
  51 + j ret_from_irq
51 52 END(cp0_irqdispatch)
52 53  
53 54 .align 5
arch/mips/tx4927/common/tx4927_irq_handler.S
... ... @@ -63,8 +63,9 @@
63 63 .set reorder
64 64  
65 65 /* wrong alarm or masked ... */
66   - j spurious_interrupt
  66 + jal spurious_interrupt
67 67 nop
  68 + j ret_from_irq
68 69 END(tx4927_irq_handler)
69 70  
70 71 .align 5
arch/mips/vr41xx/common/int-handler.S
... ... @@ -98,8 +98,10 @@
98 98 bnez t1, handle_irq
99 99 li a0, 1
100 100  
101   - j spurious_interrupt
  101 + jal spurious_interrupt
102 102 nop
  103 + j ret_from_irq
  104 + nop
103 105  
104 106 handle_int:
105 107 jal irq_dispatch
include/asm-mips/irq.h
... ... @@ -46,6 +46,7 @@
46 46 #endif
47 47  
48 48 extern void arch_init_irq(void);
  49 +extern void spurious_interrupt(struct pt_regs *regs);
49 50  
50 51 #endif /* _ASM_IRQ_H */