Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <asm/asm.h> |
| 2 | #include <asm/mipsregs.h> |
| 3 | #include <asm/regdef.h> |
| 4 | #include <asm/stackframe.h> |
| 5 | |
| 6 | .set noat |
| 7 | .align 5 |
| 8 | |
| 9 | NESTED(ev96100IRQ, PT_SIZE, sp) |
| 10 | SAVE_ALL |
| 11 | CLI # Important: mark KERNEL mode ! |
| 12 | |
| 13 | mfc0 t0, CP0_CAUSE # get pending interrupts |
| 14 | mfc0 t1, CP0_STATUS # get enabled interrupts |
| 15 | and t0, t1 # isolate allowed ones |
| 16 | |
| 17 | # FIX ME add R7000 extensions |
| 18 | andi t0,0xff00 # isolate pending bits |
| 19 | andi a0, t0, CAUSEF_IP7 |
| 20 | beq a0, zero, 1f |
| 21 | move a0, sp |
| 22 | jal mips_timer_interrupt |
| 23 | j ret_from_irq |
| 24 | |
| 25 | 1: beqz t0, 3f # spurious interrupt |
| 26 | |
| 27 | move a0, t0 |
| 28 | move a1, sp |
| 29 | jal ev96100_cpu_irq |
| 30 | j ret_from_irq |
| 31 | |
| 32 | 3: j spurious_interrupt |
| 33 | END(ev96100IRQ) |