From: Nick Piggin <nickpiggin@yahoo.com.au>

The attached patch is required to work correctly with the CPU hotplug
framework.  John Hawkes reports successful booting with this.


---

 25-akpm/kernel/sched.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN kernel/sched.c~sched-boot-fix kernel/sched.c
--- 25/kernel/sched.c~sched-boot-fix	2004-04-05 18:45:32.227312272 -0700
+++ 25-akpm/kernel/sched.c	2004-04-05 18:45:32.232311512 -0700
@@ -3436,6 +3436,8 @@ void cpu_attach_domain(struct sched_doma
 	runqueue_t *rq = cpu_rq(cpu);
 	int local = 1;
 
+	lock_cpu_hotplug();
+
 	spin_lock_irqsave(&rq->lock, flags);
 
 	if (cpu == smp_processor_id() || cpu_is_offline(cpu)) {
@@ -3454,6 +3456,8 @@ void cpu_attach_domain(struct sched_doma
 		wake_up_process(rq->migration_thread);
 		wait_for_completion(&req.done);
 	}
+
+	unlock_cpu_hotplug();
 }
 
 #ifdef ARCH_HAS_SCHED_DOMAIN

_