From: Ingo Molnar misc fixes: - hotplug CPU fix - early init cleanup --- 25-akpm/init/main.c | 9 ++++++++- 25-akpm/kernel/sched.c | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff -puN init/main.c~sched-misc-fixes init/main.c --- 25/init/main.c~sched-misc-fixes 2004-04-07 22:07:59.137108320 -0700 +++ 25-akpm/init/main.c 2004-04-07 22:07:59.143107408 -0700 @@ -453,6 +453,13 @@ asmlinkage void __init start_kernel(void */ smp_prepare_boot_cpu(); + /* + * Set up the scheduler prior starting any interrupts (such as the + * timer interrupt). Full topology setup happens at smp_init() + * time - but meanwhile we still have a functioning scheduler. + */ + sched_init(); + build_all_zonelists(); page_alloc_init(); trap_init(); @@ -465,7 +472,7 @@ asmlinkage void __init start_kernel(void rcu_init(); init_IRQ(); pidhash_init(); - sched_init(); + init_timers(); softirq_init(); time_init(); diff -puN kernel/sched.c~sched-misc-fixes kernel/sched.c --- 25/kernel/sched.c~sched-misc-fixes 2004-04-07 22:07:59.139108016 -0700 +++ 25-akpm/kernel/sched.c 2004-04-07 22:07:59.145107104 -0700 @@ -1142,6 +1142,7 @@ static void sched_migrate_task(task_t *p * the migration. */ tlb_migrate_prepare(current->mm); + unlock_cpu_hotplug(); return; } @@ -3633,8 +3634,6 @@ void __init sched_init(void) set_task_cpu(current, smp_processor_id()); wake_up_forked_process(current); - init_timers(); - /* * The boot idle thread does lazy MMU switching as well: */ _