diff options
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-irq.c')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-irq.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 2854ac4c9be1..2e643d2f51cb 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -130,7 +130,7 @@ static int ms1bit(unsigned long x) | |||
130 | * Kanoj 05.13.00 | 130 | * Kanoj 05.13.00 |
131 | */ | 131 | */ |
132 | 132 | ||
133 | void ip27_do_irq_mask0(struct pt_regs *regs) | 133 | static void ip27_do_irq_mask0(struct pt_regs *regs) |
134 | { | 134 | { |
135 | int irq, swlevel; | 135 | int irq, swlevel; |
136 | hubreg_t pend0, mask0; | 136 | hubreg_t pend0, mask0; |
@@ -171,7 +171,7 @@ void ip27_do_irq_mask0(struct pt_regs *regs) | |||
171 | LOCAL_HUB_L(PI_INT_PEND0); | 171 | LOCAL_HUB_L(PI_INT_PEND0); |
172 | } | 172 | } |
173 | 173 | ||
174 | void ip27_do_irq_mask1(struct pt_regs *regs) | 174 | static void ip27_do_irq_mask1(struct pt_regs *regs) |
175 | { | 175 | { |
176 | int irq, swlevel; | 176 | int irq, swlevel; |
177 | hubreg_t pend1, mask1; | 177 | hubreg_t pend1, mask1; |
@@ -196,12 +196,12 @@ void ip27_do_irq_mask1(struct pt_regs *regs) | |||
196 | LOCAL_HUB_L(PI_INT_PEND1); | 196 | LOCAL_HUB_L(PI_INT_PEND1); |
197 | } | 197 | } |
198 | 198 | ||
199 | void ip27_prof_timer(struct pt_regs *regs) | 199 | static void ip27_prof_timer(struct pt_regs *regs) |
200 | { | 200 | { |
201 | panic("CPU %d got a profiling interrupt", smp_processor_id()); | 201 | panic("CPU %d got a profiling interrupt", smp_processor_id()); |
202 | } | 202 | } |
203 | 203 | ||
204 | void ip27_hub_error(struct pt_regs *regs) | 204 | static void ip27_hub_error(struct pt_regs *regs) |
205 | { | 205 | { |
206 | panic("CPU %d got a hub error interrupt", smp_processor_id()); | 206 | panic("CPU %d got a hub error interrupt", smp_processor_id()); |
207 | } | 207 | } |
@@ -421,9 +421,26 @@ int __devinit request_bridge_irq(struct bridge_controller *bc) | |||
421 | return irq; | 421 | return irq; |
422 | } | 422 | } |
423 | 423 | ||
424 | extern void ip27_rt_timer_interrupt(struct pt_regs *regs); | ||
425 | |||
426 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | ||
427 | { | ||
428 | unsigned long pending = read_c0_cause() & read_c0_status(); | ||
429 | |||
430 | if (pending & CAUSEF_IP4) | ||
431 | ip27_rt_timer_interrupt(regs); | ||
432 | else if (pending & CAUSEF_IP2) /* PI_INT_PEND_0 or CC_PEND_{A|B} */ | ||
433 | ip27_do_irq_mask0(regs); | ||
434 | else if (pending & CAUSEF_IP3) /* PI_INT_PEND_1 */ | ||
435 | ip27_do_irq_mask1(regs); | ||
436 | else if (pending & CAUSEF_IP5) | ||
437 | ip27_prof_timer(regs); | ||
438 | else if (pending & CAUSEF_IP6) | ||
439 | ip27_hub_error(regs); | ||
440 | } | ||
441 | |||
424 | void __init arch_init_irq(void) | 442 | void __init arch_init_irq(void) |
425 | { | 443 | { |
426 | set_except_vector(0, ip27_irq); | ||
427 | } | 444 | } |
428 | 445 | ||
429 | void install_ipi(void) | 446 | void install_ipi(void) |