--- linux-2.6.22.14/arch/mips/rb/cr/IRQ.S 1970-01-01 03:00:00.000000000 +0300 +++ linux/arch/mips/rb/cr/IRQ.S 2008-01-15 11:01:09.000000000 +0200 @@ -0,0 +1,58 @@ +/* + * Copyright 2001 MontaVista Software Inc. + * Author: stevel@mvista.com + * + * Interrupt dispatcher for CR board. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#define __ASSEMBLY__ 1 + +#include +#include +#include +#include +#include + + .text + .set noreorder + .set noat + .align 5 + NESTED(cr_IRQ, PT_SIZE, sp) + SAVE_ALL + CLI + TRACE_IRQS_OFF + LONG_L s0, TI_REGS($28) + LONG_S sp, TI_REGS($28) + PTR_LA ra, ret_from_irq + + .set at + + /* Get the pending interrupts */ + mfc0 t0, CP0_CAUSE + nop + + /* Isolate the allowed ones by anding the irq mask */ + mfc0 t2, CP0_STATUS + nop + andi t0, CAUSEF_IP + and t0, t2 + + /* check for r4k counter/timer IRQ. */ + + andi t1, t0, CAUSEF_IP7 + beqz t1, 1f + nop + + j ll_timer_interrupt + li a0, 7 + +1: + j cr_irqdispatch + move a0, t0 + + END(cr_IRQ)