diff options
author | Shaohui Xie <b21989@freescale.com> | 2010-11-18 01:57:32 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-05-20 09:46:57 -0400 |
commit | cce1f106c64dc1d19d5e9406320fde18dfc662df (patch) | |
tree | 0fe38cf975577cb22de977ab36dc1cde82d80125 /arch/powerpc/kernel | |
parent | d08e44570ed611c527a1062eb4f8c6ac61832e6e (diff) |
powerpc/fsl_rio: move machine_check handler
Add support for machine_check support into machine_check_e500 and
machine_check_e500mc.
Signed-off-by: Shaohui Xie <b21989@freescale.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Roy Zang <tie-fei.zang@freescale.com>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index b13306b0d925..0ff4ab98d50c 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #endif | 55 | #endif |
56 | #include <asm/kexec.h> | 56 | #include <asm/kexec.h> |
57 | #include <asm/ppc-opcode.h> | 57 | #include <asm/ppc-opcode.h> |
58 | #include <asm/rio.h> | ||
58 | 59 | ||
59 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) | 60 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) |
60 | int (*__debugger)(struct pt_regs *regs) __read_mostly; | 61 | int (*__debugger)(struct pt_regs *regs) __read_mostly; |
@@ -424,6 +425,12 @@ int machine_check_e500mc(struct pt_regs *regs) | |||
424 | unsigned long reason = mcsr; | 425 | unsigned long reason = mcsr; |
425 | int recoverable = 1; | 426 | int recoverable = 1; |
426 | 427 | ||
428 | if (reason & MCSR_BUS_RBERR) { | ||
429 | recoverable = fsl_rio_mcheck_exception(regs); | ||
430 | if (recoverable == 1) | ||
431 | goto silent_out; | ||
432 | } | ||
433 | |||
427 | printk("Machine check in kernel mode.\n"); | 434 | printk("Machine check in kernel mode.\n"); |
428 | printk("Caused by (from MCSR=%lx): ", reason); | 435 | printk("Caused by (from MCSR=%lx): ", reason); |
429 | 436 | ||
@@ -499,6 +506,7 @@ int machine_check_e500mc(struct pt_regs *regs) | |||
499 | reason & MCSR_MEA ? "Effective" : "Physical", addr); | 506 | reason & MCSR_MEA ? "Effective" : "Physical", addr); |
500 | } | 507 | } |
501 | 508 | ||
509 | silent_out: | ||
502 | mtspr(SPRN_MCSR, mcsr); | 510 | mtspr(SPRN_MCSR, mcsr); |
503 | return mfspr(SPRN_MCSR) == 0 && recoverable; | 511 | return mfspr(SPRN_MCSR) == 0 && recoverable; |
504 | } | 512 | } |
@@ -507,6 +515,11 @@ int machine_check_e500(struct pt_regs *regs) | |||
507 | { | 515 | { |
508 | unsigned long reason = get_mc_reason(regs); | 516 | unsigned long reason = get_mc_reason(regs); |
509 | 517 | ||
518 | if (reason & MCSR_BUS_RBERR) { | ||
519 | if (fsl_rio_mcheck_exception(regs)) | ||
520 | return 1; | ||
521 | } | ||
522 | |||
510 | printk("Machine check in kernel mode.\n"); | 523 | printk("Machine check in kernel mode.\n"); |
511 | printk("Caused by (from MCSR=%lx): ", reason); | 524 | printk("Caused by (from MCSR=%lx): ", reason); |
512 | 525 | ||