Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / powerpc / platforms / 8xx / machine_check.c
blob402016705a39f7aa4e0857e3e49350cd0110d0d2
1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 */
8 #include <linux/kernel.h>
9 #include <linux/printk.h>
10 #include <linux/ptrace.h>
12 #include <asm/reg.h>
14 int machine_check_8xx(struct pt_regs *regs)
16 unsigned long reason = regs->msr;
18 pr_err("Machine check in kernel mode.\n");
19 pr_err("Caused by (from SRR1=%lx): ", reason);
20 if (reason & 0x40000000)
21 pr_err("Fetch error at address %lx\n", regs->nip);
22 else
23 pr_err("Data access error at address %lx\n", regs->dar);
25 #ifdef CONFIG_PCI
26 /* the qspan pci read routines can cause machine checks -- Cort
28 * yuck !!! that totally needs to go away ! There are better ways
29 * to deal with that than having a wart in the mcheck handler.
30 * -- BenH
32 bad_page_fault(regs, regs->dar, SIGBUS);
33 return 1;
34 #else
35 return 0;
36 #endif