1 // SPDX-License-Identifier: GPL-2.0-or-later
5 #include <linux/kernel.h>
6 #include <linux/printk.h>
7 #include <linux/ptrace.h>
11 int machine_check_8xx(struct pt_regs *regs)
13 unsigned long reason = regs->msr;
15 pr_err("Machine check in kernel mode.\n");
16 pr_err("Caused by (from SRR1=%lx): ", reason);
17 if (reason & 0x40000000)
18 pr_cont("Fetch error at address %lx\n", regs->nip);
20 pr_cont("Data access error at address %lx\n", regs->dar);
23 /* the qspan pci read routines can cause machine checks -- Cort
25 * yuck !!! that totally needs to go away ! There are better ways
26 * to deal with that than having a wart in the mcheck handler.
29 bad_page_fault(regs, SIGBUS);