diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/powerpc/include/asm/cputable.h | 1 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/cputable.c | 10 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/misc.c | 17 |
4 files changed, 26 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index a0395ccbbe9e..d05f0c28e515 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
| @@ -44,6 +44,7 @@ extern int machine_check_e500(struct pt_regs *regs); | |||
| 44 | extern int machine_check_e200(struct pt_regs *regs); | 44 | extern int machine_check_e200(struct pt_regs *regs); |
| 45 | extern int machine_check_47x(struct pt_regs *regs); | 45 | extern int machine_check_47x(struct pt_regs *regs); |
| 46 | int machine_check_8xx(struct pt_regs *regs); | 46 | int machine_check_8xx(struct pt_regs *regs); |
| 47 | int machine_check_83xx(struct pt_regs *regs); | ||
| 47 | 48 | ||
| 48 | extern void cpu_down_flush_e500v2(void); | 49 | extern void cpu_down_flush_e500v2(void); |
| 49 | extern void cpu_down_flush_e500mc(void); | 50 | extern void cpu_down_flush_e500mc(void); |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 0d2139a0d5b9..1c98ef1f2d5b 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
| @@ -769,6 +769,8 @@ | |||
| 769 | #define SRR1_PROGTRAP 0x00020000 /* Trap */ | 769 | #define SRR1_PROGTRAP 0x00020000 /* Trap */ |
| 770 | #define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */ | 770 | #define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */ |
| 771 | 771 | ||
| 772 | #define SRR1_MCE_MCP 0x00080000 /* Machine check signal caused interrupt */ | ||
| 773 | |||
| 772 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ | 774 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ |
| 773 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ | 775 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ |
| 774 | #define HSRR1_DENORM 0x00100000 /* Denorm exception */ | 776 | #define HSRR1_DENORM 0x00100000 /* Denorm exception */ |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 2da01340c84c..1eab54bc6ee9 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
| @@ -1141,6 +1141,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1141 | .machine_check = machine_check_generic, | 1141 | .machine_check = machine_check_generic, |
| 1142 | .platform = "ppc603", | 1142 | .platform = "ppc603", |
| 1143 | }, | 1143 | }, |
| 1144 | #ifdef CONFIG_PPC_83xx | ||
| 1144 | { /* e300c1 (a 603e core, plus some) on 83xx */ | 1145 | { /* e300c1 (a 603e core, plus some) on 83xx */ |
| 1145 | .pvr_mask = 0x7fff0000, | 1146 | .pvr_mask = 0x7fff0000, |
| 1146 | .pvr_value = 0x00830000, | 1147 | .pvr_value = 0x00830000, |
| @@ -1151,7 +1152,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1151 | .icache_bsize = 32, | 1152 | .icache_bsize = 32, |
| 1152 | .dcache_bsize = 32, | 1153 | .dcache_bsize = 32, |
| 1153 | .cpu_setup = __setup_cpu_603, | 1154 | .cpu_setup = __setup_cpu_603, |
| 1154 | .machine_check = machine_check_generic, | 1155 | .machine_check = machine_check_83xx, |
| 1155 | .platform = "ppc603", | 1156 | .platform = "ppc603", |
| 1156 | }, | 1157 | }, |
| 1157 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ | 1158 | { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ |
| @@ -1165,7 +1166,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1165 | .icache_bsize = 32, | 1166 | .icache_bsize = 32, |
| 1166 | .dcache_bsize = 32, | 1167 | .dcache_bsize = 32, |
| 1167 | .cpu_setup = __setup_cpu_603, | 1168 | .cpu_setup = __setup_cpu_603, |
| 1168 | .machine_check = machine_check_generic, | 1169 | .machine_check = machine_check_83xx, |
| 1169 | .platform = "ppc603", | 1170 | .platform = "ppc603", |
| 1170 | }, | 1171 | }, |
| 1171 | { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */ | 1172 | { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */ |
| @@ -1179,7 +1180,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1179 | .icache_bsize = 32, | 1180 | .icache_bsize = 32, |
| 1180 | .dcache_bsize = 32, | 1181 | .dcache_bsize = 32, |
| 1181 | .cpu_setup = __setup_cpu_603, | 1182 | .cpu_setup = __setup_cpu_603, |
| 1182 | .machine_check = machine_check_generic, | 1183 | .machine_check = machine_check_83xx, |
| 1183 | .num_pmcs = 4, | 1184 | .num_pmcs = 4, |
| 1184 | .oprofile_cpu_type = "ppc/e300", | 1185 | .oprofile_cpu_type = "ppc/e300", |
| 1185 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | 1186 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
| @@ -1196,12 +1197,13 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1196 | .icache_bsize = 32, | 1197 | .icache_bsize = 32, |
| 1197 | .dcache_bsize = 32, | 1198 | .dcache_bsize = 32, |
| 1198 | .cpu_setup = __setup_cpu_603, | 1199 | .cpu_setup = __setup_cpu_603, |
| 1199 | .machine_check = machine_check_generic, | 1200 | .machine_check = machine_check_83xx, |
| 1200 | .num_pmcs = 4, | 1201 | .num_pmcs = 4, |
| 1201 | .oprofile_cpu_type = "ppc/e300", | 1202 | .oprofile_cpu_type = "ppc/e300", |
| 1202 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | 1203 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
| 1203 | .platform = "ppc603", | 1204 | .platform = "ppc603", |
| 1204 | }, | 1205 | }, |
| 1206 | #endif | ||
| 1205 | { /* default match, we assume split I/D cache & TB (non-601)... */ | 1207 | { /* default match, we assume split I/D cache & TB (non-601)... */ |
| 1206 | .pvr_mask = 0x00000000, | 1208 | .pvr_mask = 0x00000000, |
| 1207 | .pvr_value = 0x00000000, | 1209 | .pvr_value = 0x00000000, |
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c index d75c9816a5c9..2b6589fe812d 100644 --- a/arch/powerpc/platforms/83xx/misc.c +++ b/arch/powerpc/platforms/83xx/misc.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
| 15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
| 16 | 16 | ||
| 17 | #include <asm/debug.h> | ||
| 17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| 18 | #include <asm/hw_irq.h> | 19 | #include <asm/hw_irq.h> |
| 19 | #include <asm/ipic.h> | 20 | #include <asm/ipic.h> |
| @@ -150,3 +151,19 @@ void __init mpc83xx_setup_arch(void) | |||
| 150 | 151 | ||
| 151 | mpc83xx_setup_pci(); | 152 | mpc83xx_setup_pci(); |
| 152 | } | 153 | } |
| 154 | |||
| 155 | int machine_check_83xx(struct pt_regs *regs) | ||
| 156 | { | ||
| 157 | u32 mask = 1 << (31 - IPIC_MCP_WDT); | ||
| 158 | |||
| 159 | if (!(regs->msr & SRR1_MCE_MCP) || !(ipic_get_mcp_status() & mask)) | ||
| 160 | return machine_check_generic(regs); | ||
| 161 | ipic_clear_mcp_status(mask); | ||
| 162 | |||
| 163 | if (debugger_fault_handler(regs)) | ||
| 164 | return 1; | ||
| 165 | |||
| 166 | die("Watchdog NMI Reset", regs, 0); | ||
| 167 | |||
| 168 | return 1; | ||
| 169 | } | ||
