Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  */
0004 
0005 #include <linux/kernel.h>
0006 #include <linux/printk.h>
0007 #include <linux/ptrace.h>
0008 
0009 #include <asm/reg.h>
0010 
0011 int machine_check_4xx(struct pt_regs *regs)
0012 {
0013     unsigned long reason = regs->esr;
0014 
0015     if (reason & ESR_IMCP) {
0016         printk("Instruction");
0017         mtspr(SPRN_ESR, reason & ~ESR_IMCP);
0018     } else
0019         printk("Data");
0020     printk(" machine check in kernel mode.\n");
0021 
0022     return 0;
0023 }