Skip to content

Commit

Permalink
sched: Mark boot-cpu active before smp_init()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Mike Galbraith <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 16, 2009
1 parent ee1156c commit 933b061
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 933b061

Please sign in to comment.