diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-04-03 12:56:36 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-04-18 22:14:21 -0400 |
commit | e4ac58afdfac792c0583af30dbd9eae53e24c78b (patch) | |
tree | 7517bef2c515fc630e4d3d238867b91cde96f558 /arch/mips/au1000/common/irq.c | |
parent | d35d473c25d43d7db3e5e18b66d558d2a631cca8 (diff) |
[MIPS] Rewrite all the assembler interrupt handlers to C.
Saves like 1,600 lines of code, is way easier to debug, compilers
frequently do a better job than the cut and paste type of handlers many
boards had. And finally having all the stuff done in a single place
also means alot of bug potencial for the MT ASE is gone.
The only surviving handler in assembler is the DECstation one; I hope
Maciej will rewrite it.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000/common/irq.c')
-rw-r--r-- | arch/mips/au1000/common/irq.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c index 1339a0979f66..da61de776154 100644 --- a/arch/mips/au1000/common/irq.c +++ b/arch/mips/au1000/common/irq.c | |||
@@ -66,7 +66,6 @@ | |||
66 | #define EXT_INTC1_REQ1 5 /* IP 5 */ | 66 | #define EXT_INTC1_REQ1 5 /* IP 5 */ |
67 | #define MIPS_TIMER_IP 7 /* IP 7 */ | 67 | #define MIPS_TIMER_IP 7 /* IP 7 */ |
68 | 68 | ||
69 | extern asmlinkage void au1000_IRQ(void); | ||
70 | extern void set_debug_traps(void); | 69 | extern void set_debug_traps(void); |
71 | extern irq_cpustat_t irq_stat [NR_CPUS]; | 70 | extern irq_cpustat_t irq_stat [NR_CPUS]; |
72 | 71 | ||
@@ -446,7 +445,6 @@ void __init arch_init_irq(void) | |||
446 | extern int au1xxx_ic0_nr_irqs; | 445 | extern int au1xxx_ic0_nr_irqs; |
447 | 446 | ||
448 | cp0_status = read_c0_status(); | 447 | cp0_status = read_c0_status(); |
449 | set_except_vector(0, au1000_IRQ); | ||
450 | 448 | ||
451 | /* Initialize interrupt controllers to a safe state. | 449 | /* Initialize interrupt controllers to a safe state. |
452 | */ | 450 | */ |
@@ -661,3 +659,21 @@ restore_au1xxx_intctl(void) | |||
661 | au_writel(sleep_intctl_mask[0], IC0_MASKSET); au_sync(); | 659 | au_writel(sleep_intctl_mask[0], IC0_MASKSET); au_sync(); |
662 | } | 660 | } |
663 | #endif /* CONFIG_PM */ | 661 | #endif /* CONFIG_PM */ |
662 | |||
663 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | ||
664 | { | ||
665 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; | ||
666 | |||
667 | if (pending & CAUSEF_IP7) | ||
668 | mips_timer_interrupt(regs); | ||
669 | else if (pending & CAUSEF_IP2) | ||
670 | intc0_req0_irqdispatch(regs); | ||
671 | else if (pending & CAUSEF_IP3) | ||
672 | intc0_req1_irqdispatch(regs); | ||
673 | else if (pending & CAUSEF_IP4) | ||
674 | intc1_req0_irqdispatch(regs); | ||
675 | else if (pending & CAUSEF_IP5) | ||
676 | intc1_req1_irqdispatch(regs); | ||
677 | else | ||
678 | spurious_interrupt(regs); | ||
679 | } | ||