aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2007-08-02 16:37:15 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-08-17 14:22:28 -0400
commit86d7a9a9c4775f864e6bc5f5da66ef9ea3715734 (patch)
tree43e7a2d1b54c10e28d8607d15c454ea6556f764c
parentb66510cb9992d204f216049e9c01d432c7635f6c (diff)
[POWERPC] Fix FSL BookE machine check reporting
Reserved MCSR bits on FSL BookE parts may have spurious values when mcheck occurs. Mask these off when printing the MCSR to avoid confusion. Also, get rid of the MCSR_GL_CI bit defined for e500 - this bit doesn't actually have any meaning. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/powerpc/kernel/traps.c4
-rw-r--r--include/asm-powerpc/reg_booke.h12
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 2bb1cb911783..d8502e377518 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -299,7 +299,7 @@ static inline int check_io_access(struct pt_regs *regs)
299#ifndef CONFIG_FSL_BOOKE 299#ifndef CONFIG_FSL_BOOKE
300#define get_mc_reason(regs) ((regs)->dsisr) 300#define get_mc_reason(regs) ((regs)->dsisr)
301#else 301#else
302#define get_mc_reason(regs) (mfspr(SPRN_MCSR)) 302#define get_mc_reason(regs) (mfspr(SPRN_MCSR) & MCSR_MASK)
303#endif 303#endif
304#define REASON_FP ESR_FP 304#define REASON_FP ESR_FP
305#define REASON_ILLEGAL (ESR_PIL | ESR_PUO) 305#define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
@@ -414,8 +414,6 @@ void machine_check_exception(struct pt_regs *regs)
414 printk("Data Cache Push Parity Error\n"); 414 printk("Data Cache Push Parity Error\n");
415 if (reason & MCSR_DCPERR) 415 if (reason & MCSR_DCPERR)
416 printk("Data Cache Parity Error\n"); 416 printk("Data Cache Parity Error\n");
417 if (reason & MCSR_GL_CI)
418 printk("Guarded Load or Cache-Inhibited stwcx.\n");
419 if (reason & MCSR_BUS_IAERR) 417 if (reason & MCSR_BUS_IAERR)
420 printk("Bus - Instruction Address Error\n"); 418 printk("Bus - Instruction Address Error\n");
421 if (reason & MCSR_BUS_RAERR) 419 if (reason & MCSR_BUS_RAERR)
diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h
index 064405c207bf..8fdc2b47afb9 100644
--- a/include/asm-powerpc/reg_booke.h
+++ b/include/asm-powerpc/reg_booke.h
@@ -223,7 +223,6 @@
223#define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ 223#define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */
224#define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */ 224#define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */
225#define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */ 225#define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */
226#define MCSR_GL_CI 0x00010000UL /* Guarded Load or Cache-Inhibited stwcx. */
227#define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */ 226#define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */
228#define MCSR_BUS_RAERR 0x00000040UL /* Read Address Error */ 227#define MCSR_BUS_RAERR 0x00000040UL /* Read Address Error */
229#define MCSR_BUS_WAERR 0x00000020UL /* Write Address Error */ 228#define MCSR_BUS_WAERR 0x00000020UL /* Write Address Error */
@@ -232,6 +231,12 @@
232#define MCSR_BUS_WBERR 0x00000004UL /* Write Data Bus Error */ 231#define MCSR_BUS_WBERR 0x00000004UL /* Write Data Bus Error */
233#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */ 232#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */
234#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */ 233#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */
234
235/* e500 parts may set unused bits in MCSR; mask these off */
236#define MCSR_MASK (MCSR_MCP | MCSR_ICPERR | MCSR_DCP_PERR | \
237 MCSR_DCPERR | MCSR_BUS_IAERR | MCSR_BUS_RAERR | \
238 MCSR_BUS_WAERR | MCSR_BUS_IBERR | MCSR_BUS_RBERR | \
239 MCSR_BUS_WBERR | MCSR_BUS_IPERR | MCSR_BUS_RPERR)
235#endif 240#endif
236#ifdef CONFIG_E200 241#ifdef CONFIG_E200
237#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ 242#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
@@ -243,6 +248,11 @@
243#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */ 248#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */
244#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered 249#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered
245 store or cache line push */ 250 store or cache line push */
251
252/* e200 parts may set unused bits in MCSR; mask these off */
253#define MCSR_MASK (MCSR_MCP | MCSR_CP_PERR | MCSR_CPERR | \
254 MCSR_EXCP_ERR | MCSR_BUS_IRERR | MCSR_BUS_DRERR | \
255 MCSR_BUS_WRERR)
246#endif 256#endif
247 257
248/* Bit definitions for the DBSR. */ 258/* Bit definitions for the DBSR. */