powerpc/pseries: Use rtas_call_unlocked() in pseries hotplug
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Nov 2015 11:26:10 +0000 (22:26 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 Dec 2015 11:40:55 +0000 (22:40 +1100)
Avoid open coding the logic by using rtas_call_unlocked().

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/hotplug-cpu.c

index 62475440fd453105b1df12c26dc8fad32a020b8f..86d2ecacb237e2b1e6f42c0c70d58d3c3da00b01 100644 (file)
@@ -88,13 +88,7 @@ void set_default_offline_state(int cpu)
 
 static void rtas_stop_self(void)
 {
-       static struct rtas_args args = {
-               .nargs = 0,
-               .nret = cpu_to_be32(1),
-               .rets = &args.args[0],
-       };
-
-       args.token = cpu_to_be32(rtas_stop_self_token);
+       static struct rtas_args args;
 
        local_irq_disable();
 
@@ -102,7 +96,8 @@ static void rtas_stop_self(void)
 
        printk("cpu %u (hwid %u) Ready to die...\n",
               smp_processor_id(), hard_smp_processor_id());
-       enter_rtas(__pa(&args));
+
+       rtas_call_unlocked(&args, rtas_stop_self_token, 0, 1, NULL);
 
        panic("Alas, I survived.\n");
 }