Commit cc8b5263 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc/pseries: Clean up ras_error_interrupt code

The RAS error interrupt is no longer used but we may as well
mirror the changes we made to the EPOW interrupt.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 6f43747f
...@@ -246,7 +246,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id) ...@@ -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) static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
{ {
struct rtas_error_log *rtas_elog; struct rtas_error_log *rtas_elog;
int status = 0xdeadbeef; int status;
int fatal; int fatal;
spin_lock(&ras_log_buf_lock); spin_lock(&ras_log_buf_lock);
...@@ -254,7 +254,7 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) ...@@ -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, status = rtas_call(ras_check_exception_token, 6, 1, NULL,
RTAS_VECTOR_EXTERNAL_INTERRUPT, RTAS_VECTOR_EXTERNAL_INTERRUPT,
virq_to_hw(irq), virq_to_hw(irq),
RTAS_INTERNAL_ERROR, 1 /*Time Critical */, RTAS_INTERNAL_ERROR, 1 /* Time Critical */,
__pa(&ras_log_buf), __pa(&ras_log_buf),
rtas_get_error_log_max()); rtas_get_error_log_max());
...@@ -269,24 +269,13 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) ...@@ -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); log_error(ras_log_buf, ERR_TYPE_RTAS_LOG, fatal);
if (fatal) { if (fatal) {
udbg_printf("Fatal HW Error <0x%lx 0x%x>\n", pr_emerg("Fatal hardware error reported by firmware");
*((unsigned long *)&ras_log_buf), status); pr_emerg("Check RTAS error log for details");
printk(KERN_EMERG "Error: Fatal hardware error <0x%lx 0x%x>\n", pr_emerg("Immediate power off");
*((unsigned long *)&ras_log_buf), status); emergency_sync();
kernel_power_off();
#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
} else { } else {
udbg_printf("Recoverable HW Error <0x%lx 0x%x>\n", pr_err("Recoverable hardware error reported by firmware");
*((unsigned long *)&ras_log_buf), status);
printk(KERN_WARNING
"Warning: Recoverable hardware error <0x%lx 0x%x>\n",
*((unsigned long *)&ras_log_buf), status);
} }
spin_unlock(&ras_log_buf_lock); spin_unlock(&ras_log_buf_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment