mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
powerpc/rtas: Use rtas_call_unlocked() in call_rtas_display_status()
Although call_rtas_display_status() does actually want to use the regular RTAS locking, it doesn't want the extra logic that is in rtas_call(), so currently it open codes the logic. Instead we can use rtas_call_unlocked(), after taking the RTAS lock. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
b2e8590fa1
commit
4456f45246
@ -93,21 +93,13 @@ static void unlock_rtas(unsigned long flags)
|
|||||||
*/
|
*/
|
||||||
static void call_rtas_display_status(unsigned char c)
|
static void call_rtas_display_status(unsigned char c)
|
||||||
{
|
{
|
||||||
struct rtas_args *args = &rtas.args;
|
|
||||||
unsigned long s;
|
unsigned long s;
|
||||||
|
|
||||||
if (!rtas.base)
|
if (!rtas.base)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
s = lock_rtas();
|
s = lock_rtas();
|
||||||
|
rtas_call_unlocked(&rtas.args, 10, 1, 1, NULL, c);
|
||||||
args->token = cpu_to_be32(10);
|
|
||||||
args->nargs = cpu_to_be32(1);
|
|
||||||
args->nret = cpu_to_be32(1);
|
|
||||||
args->rets = &(args->args[1]);
|
|
||||||
args->args[0] = cpu_to_be32(c);
|
|
||||||
|
|
||||||
enter_rtas(__pa(args));
|
|
||||||
|
|
||||||
unlock_rtas(s);
|
unlock_rtas(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user