[MIPS] Rewrite spurious_interrupt from assembler to C.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
c9e321e095
commit
93373ed4d8
|
@ -64,5 +64,6 @@ NESTED(au1000_IRQ, PT_SIZE, sp)
|
||||||
|
|
||||||
5:
|
5:
|
||||||
move a0, sp
|
move a0, sp
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
|
j ret_from_irq
|
||||||
END(au1000_IRQ)
|
END(au1000_IRQ)
|
||||||
|
|
|
@ -54,7 +54,8 @@
|
||||||
.set reorder
|
.set reorder
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
// j spurious_interrupt
|
// jal spurious_interrupt
|
||||||
|
// j ret_from_irq
|
||||||
move a0, sp
|
move a0, sp
|
||||||
jal vrc5476_irq_dispatch
|
jal vrc5476_irq_dispatch
|
||||||
j ret_from_irq
|
j ret_from_irq
|
||||||
|
|
|
@ -80,8 +80,6 @@ vrc5476_irq_init(u32 base)
|
||||||
asmlinkage void
|
asmlinkage void
|
||||||
vrc5476_irq_dispatch(struct pt_regs *regs)
|
vrc5476_irq_dispatch(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
extern void spurious_interrupt(void);
|
|
||||||
|
|
||||||
u32 mask;
|
u32 mask;
|
||||||
int nile4_irq;
|
int nile4_irq;
|
||||||
|
|
||||||
|
@ -107,5 +105,5 @@ vrc5476_irq_dispatch(struct pt_regs *regs)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spurious_interrupt();
|
spurious_interrupt(regs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
.set reorder
|
.set reorder
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
j ret_from_irq
|
||||||
END(ddb5477_handle_int)
|
END(ddb5477_handle_int)
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
|
|
|
@ -282,7 +282,9 @@ fpu:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spurious:
|
spurious:
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
|
nop
|
||||||
|
j ret_from_irq
|
||||||
nop
|
nop
|
||||||
END(decstation_handle_int)
|
END(decstation_handle_int)
|
||||||
|
|
||||||
|
|
|
@ -29,5 +29,6 @@ NESTED(ev96100IRQ, PT_SIZE, sp)
|
||||||
jal ev96100_cpu_irq
|
jal ev96100_cpu_irq
|
||||||
j ret_from_irq
|
j ret_from_irq
|
||||||
|
|
||||||
3: j spurious_interrupt
|
3: jal spurious_interrupt
|
||||||
|
j ret_from_irq
|
||||||
END(ev96100IRQ)
|
END(ev96100IRQ)
|
||||||
|
|
|
@ -39,8 +39,9 @@
|
||||||
nop
|
nop
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
END(galileo_handle_int)
|
END(galileo_handle_int)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,8 @@ loc_call: /*
|
||||||
/*
|
/*
|
||||||
* "Jump extender" to reach spurious_interrupt
|
* "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
|
* Vectors for interrupts generated by local devices
|
||||||
|
|
|
@ -119,29 +119,3 @@ syscall_exit_work:
|
||||||
li a1, 1
|
li a1, 1
|
||||||
jal do_syscall_trace
|
jal do_syscall_trace
|
||||||
b resume_userspace
|
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)
|
|
||||||
|
|
|
@ -101,6 +101,11 @@ skip:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asmlinkage void spurious_interrupt(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
atomic_inc(&irq_err_count);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_KGDB
|
#ifdef CONFIG_KGDB
|
||||||
extern void breakpoint(void);
|
extern void breakpoint(void);
|
||||||
extern void set_debug_traps(void);
|
extern void set_debug_traps(void);
|
||||||
|
|
|
@ -150,6 +150,8 @@
|
||||||
|
|
||||||
|
|
||||||
spurious:
|
spurious:
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
|
nop
|
||||||
|
j ret_from_irq
|
||||||
nop
|
nop
|
||||||
END(mipsIRQ)
|
END(mipsIRQ)
|
||||||
|
|
|
@ -94,6 +94,8 @@
|
||||||
|
|
||||||
|
|
||||||
spurious:
|
spurious:
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
|
nop
|
||||||
|
j ret_from_irq
|
||||||
nop
|
nop
|
||||||
END(simIRQ)
|
END(simIRQ)
|
||||||
|
|
|
@ -78,8 +78,10 @@
|
||||||
.set reorder
|
.set reorder
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
|
nop
|
||||||
END(ocelot3_handle_int)
|
END(ocelot3_handle_int)
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
|
|
|
@ -52,8 +52,9 @@
|
||||||
.set reorder
|
.set reorder
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
END(ocelot_handle_int)
|
END(ocelot_handle_int)
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
|
|
|
@ -46,8 +46,9 @@
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
|
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
END(cp0_irqdispatch)
|
END(cp0_irqdispatch)
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
|
|
|
@ -63,8 +63,9 @@
|
||||||
.set reorder
|
.set reorder
|
||||||
|
|
||||||
/* wrong alarm or masked ... */
|
/* wrong alarm or masked ... */
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
END(tx4927_irq_handler)
|
END(tx4927_irq_handler)
|
||||||
|
|
||||||
.align 5
|
.align 5
|
||||||
|
|
|
@ -98,8 +98,10 @@
|
||||||
bnez t1, handle_irq
|
bnez t1, handle_irq
|
||||||
li a0, 1
|
li a0, 1
|
||||||
|
|
||||||
j spurious_interrupt
|
jal spurious_interrupt
|
||||||
nop
|
nop
|
||||||
|
j ret_from_irq
|
||||||
|
nop
|
||||||
|
|
||||||
handle_int:
|
handle_int:
|
||||||
jal irq_dispatch
|
jal irq_dispatch
|
||||||
|
|
|
@ -46,5 +46,6 @@ do { \
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void arch_init_irq(void);
|
extern void arch_init_irq(void);
|
||||||
|
extern void spurious_interrupt(struct pt_regs *regs);
|
||||||
|
|
||||||
#endif /* _ASM_IRQ_H */
|
#endif /* _ASM_IRQ_H */
|
||||||
|
|
Loading…
Reference in New Issue