/* All interrupts go via intc at some point.  */
asmlinkage void do_IRQ(int level, struct pt_regs *regs)
/* All interrupts go via intc at some point.  */
asmlinkage void do_IRQ(int level, struct pt_regs *regs)
{
	struct irq_desc *desc;
	struct pt_regs *old_regs;
	unsigned int irq;
	unsigned long status_reg;
	local_irq_disable();
	old_regs = set_irq_regs(regs);
	irq_enter();
	irq = intc_readl(&intc0, INTCAUSE0 - 4 * level);
	desc = irq_desc + irq;
	desc->handle_irq(irq, desc);
	status_reg = sysreg_read(SR);
	status_reg &= ~(SYSREG_BIT(I0M) | SYSREG_BIT(I1M)
			| SYSREG_BIT(I2M) | SYSREG_BIT(I3M));
	sysreg_write(SR, status_reg);
	irq_exit();
	set_irq_regs(old_regs);
}