1#include <asm/asm.h> 2#include <asm/mipsregs.h> 3#include <asm/regdef.h> 4#include <asm/stackframe.h> 5 6 .text 7 .set macro 8 .set noat 9 .align 5 10 11NESTED(it8172_IRQ, PT_SIZE, sp) 12 SAVE_ALL 13 CLI # Important: mark KERNEL mode ! 14 15 /* We're working with 'reorder' set at this point. */ 16 /* 17 * Get pending interrupts 18 */ 19 20 mfc0 t0,CP0_CAUSE # get pending interrupts 21 mfc0 t1,CP0_STATUS # get enabled interrupts 22 and t0,t1 # isolate allowed ones 23 24 andi t0,0xff00 # isolate pending bits 25 beqz t0, 3f # spurious interrupt 26 27 andi a0, t0, CAUSEF_IP7 28 beq a0, zero, 1f 29 move a0, sp 30 jal local_timer_interrupt 31 j ret_from_irq 32 nop 33 341: 35 andi a0, t0, CAUSEF_IP2 # the only int we expect at this time 36 beq a0, zero, 3f 37 move a0,sp 38 jal it8172_hw0_irqdispatch 39 40 mfc0 t0,CP0_STATUS # disable interrupts 41 ori t0,1 42 xori t0,1 43 mtc0 t0,CP0_STATUS 44 nop 45 nop 46 nop 47 48 la a1, ret_from_irq 49 jr a1 50 nop 51 523: 53 move a0, sp 54 jal mips_spurious_interrupt 55 nop 56 la a1, ret_from_irq 57 jr a1 58 nop 59 60END(it8172_IRQ) 61 62