Commit c8dcfa85 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: make enter_rtas() take unsigned long arg

From: Paul Mackerras <paulus@samba.org>

We declare enter_rtas with a struct rtas_args * argument, though it is
supposed to be a physical address, and then every time we call it we cast the
unsigned long result from __pa() to a void *.  This patch changes the
declaration of enter_rtas to make it take an unsigned long argument, and
removes the cast from all the callers.  The actual enter_rtas() routine is in
assembler and doesn't need to be changed.
parent 3897e867
......@@ -79,7 +79,7 @@ call_rtas_display_status(char c)
args->rets = (rtas_arg_t *)&(args->args[1]);
args->args[0] = (int)c;
enter_rtas((void *)__pa((unsigned long)args));
enter_rtas(__pa(args));
spin_unlock_irqrestore(&rtas.lock, s);
}
......@@ -115,8 +115,8 @@ __log_rtas_error(struct rtas_args *rtas_args)
get_paca()->xRtas = err_args;
PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n",
(void *)__pa((unsigned long)&err_args));
enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas));
__pa(&err_args));
enter_rtas(__pa(&get_paca()->xRtas));
PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n");
err_args = get_paca()->xRtas;
......@@ -174,8 +174,8 @@ rtas_call(int token, int nargs, int nret,
rtas_args->rets[i] = 0;
PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n",
(void *)__pa((unsigned long)rtas_args));
enter_rtas((void *)__pa((unsigned long)rtas_args));
__pa(rtas_args));
enter_rtas(__pa(rtas_args));
PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n");
if (rtas_args->rets[0] == -1)
......@@ -480,7 +480,7 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
spin_lock_irqsave(&rtas.lock, flags);
get_paca()->xRtas = args;
enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas));
enter_rtas(__pa(&get_paca()->xRtas));
args = get_paca()->xRtas;
spin_unlock_irqrestore(&rtas.lock, flags);
......@@ -515,7 +515,7 @@ void rtas_stop_self(void)
printk("%u %u Ready to die...\n",
smp_processor_id(), hard_smp_processor_id());
enter_rtas((void *)__pa(rtas_args));
enter_rtas(__pa(rtas_args));
panic("Alas, I survived.\n");
}
......
......@@ -166,7 +166,7 @@ extern struct flash_block_list_header rtas_firmware_flash_list;
extern struct rtas_t rtas;
extern void enter_rtas(struct rtas_args *);
extern void enter_rtas(unsigned long);
extern int rtas_token(const char *service);
extern long rtas_call(int token, int, int, unsigned long *, ...);
extern void call_rtas_display_status(char);
......
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