Commit 933b0618 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

sched: Mark boot-cpu active before smp_init()

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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170517.423469527@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ee1156c1
...@@ -369,12 +369,6 @@ static void __init smp_init(void) ...@@ -369,12 +369,6 @@ static void __init smp_init(void)
{ {
unsigned int cpu; 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 */ /* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) { for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus) if (num_online_cpus() >= setup_max_cpus)
...@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void) ...@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void)
int cpu = smp_processor_id(); int cpu = smp_processor_id();
/* Mark the boot cpu "present", "online" etc for SMP and UP case */ /* Mark the boot cpu "present", "online" etc for SMP and UP case */
set_cpu_online(cpu, true); set_cpu_online(cpu, true);
set_cpu_active(cpu, true);
set_cpu_present(cpu, true); set_cpu_present(cpu, true);
set_cpu_possible(cpu, true); set_cpu_possible(cpu, true);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment