so we need to make init_idle() aware of it so that it gets the
preempt_count initialization right.
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
+ lock_kernel();
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();
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;
+ idle->thread_info->preempt_count = (idle->lock_depth >= 0);
double_rq_unlock(idle_rq, rq);
set_tsk_need_resched(idle);
__restore_flags(flags);