/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/kernel.h> #include <linux/printk.h> #include <linux/ptrace.h> #include <asm/reg.h>
int machine_check_440A(struct pt_regs *regs) { unsigned long reason = regs->dsisr; printk("Machine check in kernel mode.\n"); if (reason & ESR_IMCP){ printk("Instruction Synchronous Machine Check exception\n"); mtspr(SPRN_ESR, reason & ~ESR_IMCP); } else { u32 mcsr = mfspr(SPRN_MCSR); if (mcsr & MCSR_IB) printk("Instruction Read PLB Error\n"); if (mcsr & MCSR_DRB) printk("Data Read PLB Error\n"); if (mcsr & MCSR_DWB) printk("Data Write PLB Error\n"); if (mcsr & MCSR_TLBP) printk("TLB Parity Error\n"); if (mcsr & MCSR_ICP){ flush_instruction_cache(); printk("I-Cache Parity Error\n"); } if (mcsr & MCSR_DCSP) printk("D-Cache Search Parity Error\n"); if (mcsr & MCSR_DCFP) printk("D-Cache Flush Parity Error\n"); if (mcsr & MCSR_IMPE) printk("Machine Check exception is imprecise\n"); /* Clear MCSR */ mtspr(SPRN_MCSR, mcsr); } return 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 161 | 100.00% | 1 | 100.00% |
Total | 161 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 185 | 100.00% | 1 | 100.00% |
Total | 185 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 365 | 100.00% | 1 | 100.00% |
Total | 365 | 100.00% | 1 | 100.00% |