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.
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)) {
wake_up_process(rq->migration_thread);
wait_for_completion(&req.done);
}
+
+ unlock_cpu_hotplug();
}
#ifdef ARCH_HAS_SCHED_DOMAIN