aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-20 23:17:47 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-20 23:17:47 -0700
commite0689d5df443a7305e421380916646d299223016 (patch)
tree9e9d4b1494605e7d8c64681c15d8b898d6632c5c /kernel
parentcc3bc0b5cf07dbf18d9fdb3cf04d836f1f84f623 (diff)
downloadhistory-e0689d5df443a7305e421380916646d299223016.tar.gz
[PATCH] fix for stuck cpus at boot]
From: Anton Blanchard <anton@samba.org> From: Rusty Russell <rusty@rustcorp.com.au> When hotplug cpu isn't enabled, cpu_is_offline is always false. I had a stuck cpu at boot that resulted in a lockup because we tried to start a migration thread on it. Instead of cpu_is_offline we can use !cpu_online which should cover both the hotplug cpu enabled and disabled cases.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 7e1f705970263f..c10c4c7704d806 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3636,7 +3636,7 @@ void cpu_attach_domain(struct sched_domain *sd, int cpu)
spin_lock_irqsave(&rq->lock, flags);
- if (cpu == smp_processor_id() || cpu_is_offline(cpu)) {
+ if (cpu == smp_processor_id() || !cpu_online(cpu)) {
rq->sd = sd;
} else {
init_completion(&req.done);