Commit 0cf41a81 authored by David Mosberger's avatar David Mosberger Committed by David Mosberger

[PATCH] Compile fix for kernel/sched.c

Fix init_idle() to initialize preempt_count only if CONFIG_PREEMPT is set.
parent 7d6da1f0
...@@ -1442,8 +1442,10 @@ void __init init_idle(task_t *idle, int cpu) ...@@ -1442,8 +1442,10 @@ void __init init_idle(task_t *idle, int cpu)
set_tsk_need_resched(idle); set_tsk_need_resched(idle);
__restore_flags(flags); __restore_flags(flags);
#ifdef CONFIG_PREEMPT
/* Set the preempt count _outside_ the spinlocks! */ /* Set the preempt count _outside_ the spinlocks! */
idle->thread_info->preempt_count = (idle->lock_depth >= 0); idle->thread_info->preempt_count = (idle->lock_depth >= 0);
#endif
} }
extern void init_timervecs(void); extern void init_timervecs(void);
......
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