aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2011-08-03 10:44:27 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2011-08-03 10:44:20 -0400
commitcc34321d5806b7919531a1d951bb6deb62c163c9 (patch)
tree620b8e88e1f222e53c5ec207d403c936611cc10c /arch/s390/kernel
parent391c62feb1798b6d31bd88076eae649b091ad8bf (diff)
[S390] cpu hotplug: on cpu start wait until being marked active
This is the same as fd8a7de1 "x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU". Unlike on x86 this doesn't fix a bug on s390 since we do not have threaded interrupt handlers. However we want to keep the same initialization order like on x86. This should prevent bugs caused by code which assumes (and relies on) the init order is the same on each architecture. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/smp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 70f4b9604575..86371fdd68e7 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -473,7 +473,12 @@ int __cpuinit start_secondary(void *cpuvoid)
473 S390_lowcore.restart_psw.addr = 473 S390_lowcore.restart_psw.addr =
474 PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler; 474 PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler;
475 __ctl_set_bit(0, 28); /* Enable lowcore protection */ 475 __ctl_set_bit(0, 28); /* Enable lowcore protection */
476 /* Switch on interrupts */ 476 /*
477 * Wait until the cpu which brought this one up marked it
478 * active before enabling interrupts.
479 */
480 while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask))
481 cpu_relax();
477 local_irq_enable(); 482 local_irq_enable();
478 /* cpu_idle will call schedule for us */ 483 /* cpu_idle will call schedule for us */
479 cpu_idle(); 484 cpu_idle();