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-03 15:20:52.947356360 -0800
+++ 25-akpm/kernel/sched.c	2004-04-03 15:20:52.954355296 -0800
@@ -3435,6 +3435,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)) {
@@ -3453,6 +3455,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

_