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 */ 7 8 #include <linux/kernel.h> 9 #include <linux/printk.h> 10 #include <linux/ptrace.h> 11 12 #include <asm/reg.h> 13 14 int machine_check_4xx(struct pt_regs *regs) 15 { 16 unsigned long reason = regs->dsisr; 17 18 if (reason & ESR_IMCP) { 19 printk("Instruction"); 20 mtspr(SPRN_ESR, reason & ~ESR_IMCP); 21 } else 22 printk("Data"); 23 printk(" machine check in kernel mode.\n"); 24 25 return 0; 26 } 27