/* * Handle a machine check. * * Note that on Power 4 and beyond Firmware Non-Maskable Interrupts (fwnmi) * should be present. If so the handler which called us tells us if the * error was recovered (never true if RI=0). * * On hardware prior to Power 4 these exceptions were asynchronous which * means we can't tell exactly where it occurred and so we can't recover. */ int pSeries_machine_check_exception(struct pt_regs *regs) { struct rtas_error_log *errp; if (fwnmi_active) { errp = fwnmi_get_errinfo(regs); fwnmi_release_errinfo(); if (errp && recover_mce(regs, errp)) return 1; } return 0; }
/* * Handle a machine check. * * Note that on Power 4 and beyond Firmware Non-Maskable Interrupts (fwnmi) * should be present. If so the handler which called us tells us if the * error was recovered (never true if RI=0). * * On hardware prior to Power 4 these exceptions were asynchronous which * means we can't tell exactly where it occurred and so we can't recover. */ void MachineCheckException(struct pt_regs *regs) { #ifdef CONFIG_PPC_PSERIES struct rtas_error_log err, *errp; if (fwnmi_active) { errp = FWNMI_get_errinfo(regs); if (errp) err = *errp; FWNMI_release_errinfo(); /* frees errp */ if (errp && recover_mce(regs, err)) return; } #endif if (debugger_fault_handler(regs)) return; die("Machine check", regs, 0); /* Must die if the interrupt is not recoverable */ if (!(regs->msr & MSR_RI)) panic("Unrecoverable Machine check"); }