summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-12-16 18:04:31 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:58:15 -0700
commit8c2b12e12010928b6c5dd06447eccb99b0629515 (patch)
treec3e9a9ab07a9f472684c433489a35e85593becb3
parent81aa42727eba53401948ec04b4825b8ef30d6fdc (diff)
downloadlwn-8c2b12e12010928b6c5dd06447eccb99b0629515.tar.gz
lwn-8c2b12e12010928b6c5dd06447eccb99b0629515.zip
sched: Mark boot-cpu active before smp_init()
commit 933b0618d8b2a59c7a0742e43836544e02f1e9bd upstream. A UP machine has 1 active cpu, not having the boot-cpu in the active map when starting the scheduler confuses things. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <20091216170517.423469527@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--init/main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index 4051d75dd2d6..4be7de2a78b6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -369,12 +369,6 @@ static void __init smp_init(void)
{
unsigned int cpu;
- /*
- * Set up the current CPU as possible to migrate to.
- * The other ones will be done by cpu_up/cpu_down()
- */
- set_cpu_active(smp_processor_id(), true);
-
/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus)
@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void)
int cpu = smp_processor_id();
/* Mark the boot cpu "present", "online" etc for SMP and UP case */
set_cpu_online(cpu, true);
+ set_cpu_active(cpu, true);
set_cpu_present(cpu, true);
set_cpu_possible(cpu, true);
}