aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hotplug-cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 20d62975856f..b174fa751d26 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -90,7 +90,7 @@ static void rtas_stop_self(void)
90{ 90{
91 static struct rtas_args args = { 91 static struct rtas_args args = {
92 .nargs = 0, 92 .nargs = 0,
93 .nret = 1, 93 .nret = cpu_to_be32(1),
94 .rets = &args.args[0], 94 .rets = &args.args[0],
95 }; 95 };
96 96
@@ -312,7 +312,8 @@ static void pseries_remove_processor(struct device_node *np)
312{ 312{
313 unsigned int cpu; 313 unsigned int cpu;
314 int len, nthreads, i; 314 int len, nthreads, i;
315 const u32 *intserv; 315 const __be32 *intserv;
316 u32 thread;
316 317
317 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len); 318 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len);
318 if (!intserv) 319 if (!intserv)
@@ -322,8 +323,9 @@ static void pseries_remove_processor(struct device_node *np)
322 323
323 cpu_maps_update_begin(); 324 cpu_maps_update_begin();
324 for (i = 0; i < nthreads; i++) { 325 for (i = 0; i < nthreads; i++) {
326 thread = be32_to_cpu(intserv[i]);
325 for_each_present_cpu(cpu) { 327 for_each_present_cpu(cpu) {
326 if (get_hard_smp_processor_id(cpu) != intserv[i]) 328 if (get_hard_smp_processor_id(cpu) != thread)
327 continue; 329 continue;
328 BUG_ON(cpu_online(cpu)); 330 BUG_ON(cpu_online(cpu));
329 set_cpu_present(cpu, false); 331 set_cpu_present(cpu, false);
@@ -332,7 +334,7 @@ static void pseries_remove_processor(struct device_node *np)
332 } 334 }
333 if (cpu >= nr_cpu_ids) 335 if (cpu >= nr_cpu_ids)
334 printk(KERN_WARNING "Could not find cpu to remove " 336 printk(KERN_WARNING "Could not find cpu to remove "
335 "with physical id 0x%x\n", intserv[i]); 337 "with physical id 0x%x\n", thread);
336 } 338 }
337 cpu_maps_update_done(); 339 cpu_maps_update_done();
338} 340}