diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 82789e79e539..0ea99e3d4815 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -35,12 +35,7 @@ | |||
35 | #include "offline_states.h" | 35 | #include "offline_states.h" |
36 | 36 | ||
37 | /* This version can't take the spinlock, because it never returns */ | 37 | /* This version can't take the spinlock, because it never returns */ |
38 | static struct rtas_args rtas_stop_self_args = { | 38 | static int rtas_stop_self_token = RTAS_UNKNOWN_SERVICE; |
39 | .token = RTAS_UNKNOWN_SERVICE, | ||
40 | .nargs = 0, | ||
41 | .nret = 1, | ||
42 | .rets = &rtas_stop_self_args.args[0], | ||
43 | }; | ||
44 | 39 | ||
45 | static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) = | 40 | static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) = |
46 | CPU_STATE_OFFLINE; | 41 | CPU_STATE_OFFLINE; |
@@ -93,15 +88,20 @@ void set_default_offline_state(int cpu) | |||
93 | 88 | ||
94 | static void rtas_stop_self(void) | 89 | static void rtas_stop_self(void) |
95 | { | 90 | { |
96 | struct rtas_args *args = &rtas_stop_self_args; | 91 | struct rtas_args args = { |
92 | .token = cpu_to_be32(rtas_stop_self_token), | ||
93 | .nargs = 0, | ||
94 | .nret = 1, | ||
95 | .rets = &args.args[0], | ||
96 | }; | ||
97 | 97 | ||
98 | local_irq_disable(); | 98 | local_irq_disable(); |
99 | 99 | ||
100 | BUG_ON(args->token == RTAS_UNKNOWN_SERVICE); | 100 | BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE); |
101 | 101 | ||
102 | printk("cpu %u (hwid %u) Ready to die...\n", | 102 | printk("cpu %u (hwid %u) Ready to die...\n", |
103 | smp_processor_id(), hard_smp_processor_id()); | 103 | smp_processor_id(), hard_smp_processor_id()); |
104 | enter_rtas(__pa(args)); | 104 | enter_rtas(__pa(&args)); |
105 | 105 | ||
106 | panic("Alas, I survived.\n"); | 106 | panic("Alas, I survived.\n"); |
107 | } | 107 | } |
@@ -392,10 +392,10 @@ static int __init pseries_cpu_hotplug_init(void) | |||
392 | } | 392 | } |
393 | } | 393 | } |
394 | 394 | ||
395 | rtas_stop_self_args.token = rtas_token("stop-self"); | 395 | rtas_stop_self_token = rtas_token("stop-self"); |
396 | qcss_tok = rtas_token("query-cpu-stopped-state"); | 396 | qcss_tok = rtas_token("query-cpu-stopped-state"); |
397 | 397 | ||
398 | if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE || | 398 | if (rtas_stop_self_token == RTAS_UNKNOWN_SERVICE || |
399 | qcss_tok == RTAS_UNKNOWN_SERVICE) { | 399 | qcss_tok == RTAS_UNKNOWN_SERVICE) { |
400 | printk(KERN_INFO "CPU Hotplug not supported by firmware " | 400 | printk(KERN_INFO "CPU Hotplug not supported by firmware " |
401 | "- disabling.\n"); | 401 | "- disabling.\n"); |