===== ras.c 1.17 vs edited ===== --- 1.17/arch/ppc64/kernel/ras.c Tue Mar 16 18:46:45 2004 +++ edited/ras.c Tue Apr 6 15:59:18 2004 @@ -109,6 +109,9 @@ } __initcall(init_ras_IRQ); +static struct rtas_error_log log_buf; +static spin_lock log_lock = SPIN_LOCK_UNLOCKED; + /* * Handle power subsystem events (EPOW). * @@ -123,11 +126,17 @@ unsigned int size = sizeof(log_entry); long status = 0xdeadbeef; + spin_lock(&log_lock); + status = rtas_call(rtas_token("check-exception"), 6, 1, NULL, 0x500, irq, RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, 1, /* Time Critical */ - __pa(&log_entry), size); + __pa(&log_buf), size); + + log_entry = log_buf; + + spin_unlock(&log_lock); udbg_printf("EPOW <0x%lx 0x%lx>\n", *((unsigned long *)&log_entry), status); @@ -136,7 +145,7 @@ /* format and print the extended information */ log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, 0); - + return IRQ_HANDLED; } @@ -156,11 +165,17 @@ long status = 0xdeadbeef; int fatal; + spin_lock(&log_lock); + status = rtas_call(rtas_token("check-exception"), 6, 1, NULL, 0x500, irq, RTAS_INTERNAL_ERROR, 1, /* Time Critical */ - __pa(&log_entry), size); + __pa(&log_buf), size); + + log_entry = log_buf; + + spin_unlock(&log_lock); if ((status == 0) && (log_entry.severity >= SEVERITY_ERROR_SYNC)) fatal = 1;