On SMP systems, preempt_count is erroneously set to 1 for idle task's on
all CPU besides CPU0. This patch sets preempt_count properly.
Robert Love
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
- lock_kernel();
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();
printk("POSIX conformance testing by UNIFIX\n");
init_idle(current, smp_processor_id());
+
+ lock_kernel();
+
/*
* We count on the initial thread going ok
* Like idlers init is an unlocked kernel thread, which will
idle->prio = MAX_PRIO;
idle->state = TASK_RUNNING;
idle->thread_info->cpu = cpu;
+ idle->thread_info->preempt_count = 0;
double_rq_unlock(idle_rq, rq);
set_tsk_need_resched(idle);
__restore_flags(flags);