/* This is called when we want to synchronize with interrupts. We may for example tell a device to stop sending interrupts: but to make sure there are no interrupts that are executing on another CPU we need to call this function.  */
void unexpected_irq(int irq, void *dev_id, struct pt_regs *regs)
/* This is called when we want to synchronize with interrupts. We may for example tell a device to stop sending interrupts: but to make sure there are no interrupts that are executing on another CPU we need to call this function.  */
void unexpected_irq(int irq, void *dev_id, struct pt_regs *regs)
{
        int i;
	struct irqaction * action;
	unsigned int cpu_irq;
	cpu_irq = irq & (NR_IRQS - 1);
	action = sparc_irq[cpu_irq].action;
        printk("IO device interrupt, irq = %d\n", irq);
        printk("PC = %08lx NPC = %08lx FP=%08lx\n", regs->pc, 
		    regs->npc, regs->u_regs[14]);
	if (action) {
		printk("Expecting: ");
        	for (i = 0; i < 16; i++)
                	if (action->handler)
                        	printk("[%s:%d:0x%x] ", action->name,
				       (int) i, (unsigned int) action->handler);
	}
        printk("AIEEE\n");
	panic("bogus interrupt received");
}