Commit 43ada8b6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Fix log_rtas_error

From: Anton Blanchard <anton@samba.org>

From: Santiago Leon <santil@us.ibm.com>

Fix log_rtas_error bug where the results from the call that resulted in an
error where lost due the attempt to log the error.
parent 2e8b4376
......@@ -130,7 +130,7 @@ rtas_token(const char *service)
void
log_rtas_error(struct rtas_args *rtas_args)
{
struct rtas_args err_args;
struct rtas_args err_args, temp_args;
err_args.token = rtas_token("rtas-last-error");
err_args.nargs = 2;
......@@ -141,6 +141,7 @@ log_rtas_error(struct rtas_args *rtas_args)
err_args.args[1] = RTAS_ERROR_LOG_MAX;
err_args.args[2] = 0;
temp_args = *rtas_args;
get_paca()->xRtas = err_args;
PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n",
......@@ -148,8 +149,9 @@ log_rtas_error(struct rtas_args *rtas_args)
enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas));
PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n");
err_args = get_paca()->xRtas;
get_paca()->xRtas = *rtas_args;
get_paca()->xRtas = temp_args;
if (err_args.rets[0] == 0)
log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0);
......
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