]>
git.proxmox.com Git - mirror_ubuntu-kernels.git/blob - arch/powerpc/platforms/44x/machine_check.c
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.
8 #include <linux/kernel.h>
9 #include <linux/printk.h>
10 #include <linux/ptrace.h>
14 int machine_check_440A(struct pt_regs
*regs
)
16 unsigned long reason
= regs
->dsisr
;
18 printk("Machine check in kernel mode.\n");
19 if (reason
& ESR_IMCP
){
20 printk("Instruction Synchronous Machine Check exception\n");
21 mtspr(SPRN_ESR
, reason
& ~ESR_IMCP
);
24 u32 mcsr
= mfspr(SPRN_MCSR
);
26 printk("Instruction Read PLB Error\n");
28 printk("Data Read PLB Error\n");
30 printk("Data Write PLB Error\n");
32 printk("TLB Parity Error\n");
34 flush_instruction_cache();
35 printk("I-Cache Parity Error\n");
38 printk("D-Cache Search Parity Error\n");
40 printk("D-Cache Flush Parity Error\n");
42 printk("Machine Check exception is imprecise\n");
45 mtspr(SPRN_MCSR
, mcsr
);
51 int machine_check_47x(struct pt_regs
*regs
)
53 unsigned long reason
= regs
->dsisr
;
56 printk(KERN_ERR
"Machine check in kernel mode.\n");
57 if (reason
& ESR_IMCP
) {
58 printk(KERN_ERR
"Instruction Synchronous Machine Check exception\n");
59 mtspr(SPRN_ESR
, reason
& ~ESR_IMCP
);
62 mcsr
= mfspr(SPRN_MCSR
);
64 printk(KERN_ERR
"Instruction Read PLB Error\n");
66 printk(KERN_ERR
"Data Read PLB Error\n");
68 printk(KERN_ERR
"Data Write PLB Error\n");
70 printk(KERN_ERR
"TLB Parity Error\n");
71 if (mcsr
& MCSR_ICP
) {
72 flush_instruction_cache();
73 printk(KERN_ERR
"I-Cache Parity Error\n");
76 printk(KERN_ERR
"D-Cache Search Parity Error\n");
77 if (mcsr
& PPC47x_MCSR_GPR
)
78 printk(KERN_ERR
"GPR Parity Error\n");
79 if (mcsr
& PPC47x_MCSR_FPR
)
80 printk(KERN_ERR
"FPR Parity Error\n");
81 if (mcsr
& PPC47x_MCSR_IPR
)
82 printk(KERN_ERR
"Machine Check exception is imprecise\n");
85 mtspr(SPRN_MCSR
, mcsr
);
89 #endif /* CONFIG_PPC_47x */