From 696e2567d86d1a2585a26ea91008c8f5e10ddef1 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 21 Mar 2012 15:58:03 +0000 Subject: [PATCH] --- yaml --- r: 297183 b: refs/heads/master c: cc8b526366e8bed9a950288316e0ab03bef4420a h: refs/heads/master i: 297181: 35e35e1e9a7529860a2d0ed893d3b0e9a2780263 297179: df0ef3ba7cbdf2028803b41864230ba0d3669e2a 297175: 8ec9c9dcdb8ae842fc499e14392f5c5793c10cff 297167: 7752508d3123bda967e7de5a3d210649b71673d4 297151: 622af671894ac83cd50c5891e032835ab3d34493 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/pseries/ras.c | 27 +++++++--------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 3b32305b9c4c..eb4d9c527146 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6f43747f6a7ef216fbea1d5b5d94044d504e12ce +refs/heads/master: cc8b526366e8bed9a950288316e0ab03bef4420a diff --git a/trunk/arch/powerpc/platforms/pseries/ras.c b/trunk/arch/powerpc/platforms/pseries/ras.c index 42fda797d008..4406628efa58 100644 --- a/trunk/arch/powerpc/platforms/pseries/ras.c +++ b/trunk/arch/powerpc/platforms/pseries/ras.c @@ -246,7 +246,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id) static irqreturn_t ras_error_interrupt(int irq, void *dev_id) { struct rtas_error_log *rtas_elog; - int status = 0xdeadbeef; + int status; int fatal; spin_lock(&ras_log_buf_lock); @@ -254,7 +254,7 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) status = rtas_call(ras_check_exception_token, 6, 1, NULL, RTAS_VECTOR_EXTERNAL_INTERRUPT, virq_to_hw(irq), - RTAS_INTERNAL_ERROR, 1 /*Time Critical */, + RTAS_INTERNAL_ERROR, 1 /* Time Critical */, __pa(&ras_log_buf), rtas_get_error_log_max()); @@ -269,24 +269,13 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, fatal); if (fatal) { - udbg_printf("Fatal HW Error <0x%lx 0x%x>\n", - *((unsigned long *)&ras_log_buf), status); - printk(KERN_EMERG "Error: Fatal hardware error <0x%lx 0x%x>\n", - *((unsigned long *)&ras_log_buf), status); - -#ifndef DEBUG_RTAS_POWER_OFF - /* Don't actually power off when debugging so we can test - * without actually failing while injecting errors. - * Error data will not be logged to syslog. - */ - ppc_md.power_off(); -#endif + pr_emerg("Fatal hardware error reported by firmware"); + pr_emerg("Check RTAS error log for details"); + pr_emerg("Immediate power off"); + emergency_sync(); + kernel_power_off(); } else { - udbg_printf("Recoverable HW Error <0x%lx 0x%x>\n", - *((unsigned long *)&ras_log_buf), status); - printk(KERN_WARNING - "Warning: Recoverable hardware error <0x%lx 0x%x>\n", - *((unsigned long *)&ras_log_buf), status); + pr_err("Recoverable hardware error reported by firmware"); } spin_unlock(&ras_log_buf_lock);