Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3836
b: refs/heads/master
c: f340c0d
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jun 28, 2005
1 parent 55576f8 commit 438c204
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 082cf69eb82681f4eacb3a5653834c7970714bef
refs/heads/master: f340c0d1a3f40fdcba69cd291530a4debc58748f
7 changes: 7 additions & 0 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
9 changes: 8 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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! */
Expand Down

0 comments on commit 438c204

Please sign in to comment.