Commit 6f33162b authored by Srivatsa Vaddagiri's avatar Srivatsa Vaddagiri Committed by Linus Torvalds

[PATCH] ppc64: Fix cpu_up race

Patch below fixes a cpu_up race in PPC64.
Signed-off-by: default avatarSrivatsa Vaddagiri <vatsa@in.ibm.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 98febb25
...@@ -935,7 +935,11 @@ int __devinit __cpu_up(unsigned int cpu) ...@@ -935,7 +935,11 @@ int __devinit __cpu_up(unsigned int cpu)
if (smp_ops->give_timebase) if (smp_ops->give_timebase)
smp_ops->give_timebase(); smp_ops->give_timebase();
cpu_set(cpu, cpu_online_map);
/* Wait until cpu puts itself in the online map */
while (!cpu_online(cpu))
cpu_relax();
return 0; return 0;
} }
...@@ -971,6 +975,10 @@ int __devinit start_secondary(void *unused) ...@@ -971,6 +975,10 @@ int __devinit start_secondary(void *unused)
#endif #endif
#endif #endif
spin_lock(&call_lock);
cpu_set(cpu, cpu_online_map);
spin_unlock(&call_lock);
local_irq_enable(); local_irq_enable();
return cpu_idle(NULL); return cpu_idle(NULL);
......
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