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/tx4938/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/tx4938/common/irq.c')
-rw-r--r-- | arch/mips/tx4938/common/irq.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c index 4f90d7faf634..873805178d8e 100644 --- a/arch/mips/tx4938/common/irq.c +++ b/arch/mips/tx4938/common/irq.c | |||
@@ -392,11 +392,8 @@ tx4938_irq_pic_end(unsigned int irq) | |||
392 | void __init | 392 | void __init |
393 | tx4938_irq_init(void) | 393 | tx4938_irq_init(void) |
394 | { | 394 | { |
395 | extern asmlinkage void tx4938_irq_handler(void); | ||
396 | |||
397 | tx4938_irq_cp0_init(); | 395 | tx4938_irq_cp0_init(); |
398 | tx4938_irq_pic_init(); | 396 | tx4938_irq_pic_init(); |
399 | set_except_vector(0, tx4938_irq_handler); | ||
400 | 397 | ||
401 | return; | 398 | return; |
402 | } | 399 | } |
@@ -422,3 +419,21 @@ tx4938_irq_nested(void) | |||
422 | wbflush(); | 419 | wbflush(); |
423 | return (sw_irq); | 420 | return (sw_irq); |
424 | } | 421 | } |
422 | |||
423 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | ||
424 | { | ||
425 | unsigned int pending = read_c0_cause() & read_c0_status(); | ||
426 | |||
427 | if (pending & STATUSF_IP7) | ||
428 | do_IRQ(TX4938_IRQ_CPU_TIMER, regs); | ||
429 | else if (pending & STATUSF_IP2) { | ||
430 | int irq = tx4938_irq_nested(); | ||
431 | if (irq) | ||
432 | do_IRQ(irq, regs); | ||
433 | else | ||
434 | spurious_interrupt(regs); | ||
435 | } else if (pending & STATUSF_IP1) | ||
436 | do_IRQ(TX4938_IRQ_USER1, regs); | ||
437 | else if (pending & STATUSF_IP0) | ||
438 | do_IRQ(TX4938_IRQ_USER0, regs); | ||
439 | } | ||