--- arch/ppc64/kernel/rtas.c.orig-pre-lockfix 2004-06-29 17:02:12.000000000 -0500 +++ arch/ppc64/kernel/rtas.c 2004-06-29 17:14:05.000000000 -0500 @@ -134,9 +134,10 @@ log_rtas_error(void) spin_lock_irqsave(&rtas.lock, s); rc = __log_rtas_error(); - spin_unlock_irqrestore(&rtas.lock, s); - if (rc == 0) + if (rc == 0) { log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0); + } + spin_unlock_irqrestore(&rtas.lock, s); } int @@ -193,12 +194,13 @@ rtas_call(int token, int nargs, int nret outputs[i] = rtas_args->rets[i+1]; ret = (int)((nret > 0) ? rtas_args->rets[0] : 0); + if (logit) { + log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0); + } + /* Gotta do something different here, use global lock for now... */ spin_unlock_irqrestore(&rtas.lock, s); - if (logit) - log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0); - return ret; }