aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/main.c7
-rw-r--r--kernel/sched.c9
2 files changed, 15 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index d324801729b..b5e421e39ed 100644
--- a/init/main.c
+++ b/init/main.c
@@ -383,6 +383,13 @@ static void noinline rest_init(void)
numa_default_policy();
unlock_kernel();
preempt_enable_no_resched();
+
+ /*
+ * The boot idle thread must execute schedule()
+ * at least one to get things moving:
+ */
+ schedule();
+
cpu_idle();
}
diff --git a/kernel/sched.c b/kernel/sched.c
index e2b0d3e4dd0..5f2182d4224 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4166,6 +4166,14 @@ void show_state(void)
read_unlock(&tasklist_lock);
}
+/**
+ * init_idle - set up an idle thread for a given CPU
+ * @idle: task in question
+ * @cpu: cpu the idle task belongs to
+ *
+ * NOTE: this function does not set the idle thread's NEED_RESCHED
+ * flag, to make booting more robust.
+ */
void __devinit init_idle(task_t *idle, int cpu)
{
runqueue_t *rq = cpu_rq(cpu);
@@ -4183,7 +4191,6 @@ void __devinit init_idle(task_t *idle, int cpu)
#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
idle->oncpu = 1;
#endif
- set_tsk_need_resched(idle);
spin_unlock_irqrestore(&rq->lock, flags);
/* Set the preempt count _outside_ the spinlocks! */
n='2'>13 years newaddr64-bit addressing and prefix handling changesH. Peter Anvin15 years nsis2New NSIS scriptCyrill Gorcunov13 years paste-testpreproc: don't paste TOK_PREPROC_IDH. Peter Anvin12 years sse5Slightly optimize the interface to nasm_token_hash()H. Peter Anvin15 years