/* MC sends an interrupt whenever bus or parity errors occur. In addition, if the error happened during a CPU read, it also asserts the bus error pin on the R4K. Code in bus error handler save the MC bus error registers and then clear the interrupt when this happens.  */
void ip22_be_interrupt(int irq)
/* MC sends an interrupt whenever bus or parity errors occur. In addition, if the error happened during a CPU read, it also asserts the bus error pin on the R4K. Code in bus error handler save the MC bus error registers and then clear the interrupt when this happens.  */
void ip22_be_interrupt(int irq)
{
	const int field = 2 * sizeof(unsigned long);
	const struct pt_regs *regs = get_irq_regs();
	save_and_clear_buserr();
	print_buserr();
	printk(KERN_ALERT "%s bus error, epc == %0*lx, ra == %0*lx\n",
	       (regs->cp0_cause & 4) ? "Data" : "Instruction",
	       field, regs->cp0_epc, field, regs->regs[31]);
	die_if_kernel("Oops", regs);
	force_sig(SIGBUS, current);
}