diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:58 -0400 |
commit | 1df21055e34b6a68d62cf0c524b9e52deebd7ead (patch) | |
tree | b3611a364b289340d6b5016eba9f53a37b6b1de2 | |
parent | 4da1ce6d9c7e2a6d9236bf4dcfd33cf506082794 (diff) |
sched: add init_idle_bootup_task()
add the init_idle_bootup_task() callback to the bootup thread,
unused at the moment. (CFS will use it to switch the scheduling
class of the boot thread to the idle class)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | init/main.c | 5 | ||||
-rw-r--r-- | kernel/sched.c | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4b912e753ca0..61a111fe2b7a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -195,6 +195,7 @@ struct task_struct; | |||
195 | extern void sched_init(void); | 195 | extern void sched_init(void); |
196 | extern void sched_init_smp(void); | 196 | extern void sched_init_smp(void); |
197 | extern void init_idle(struct task_struct *idle, int cpu); | 197 | extern void init_idle(struct task_struct *idle, int cpu); |
198 | extern void init_idle_bootup_task(struct task_struct *idle); | ||
198 | 199 | ||
199 | extern cpumask_t nohz_cpu_mask; | 200 | extern cpumask_t nohz_cpu_mask; |
200 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 201 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
diff --git a/init/main.c b/init/main.c index eb8bdbae4fc7..0eb1c7463fe4 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -436,15 +436,16 @@ static void noinline __init_refok rest_init(void) | |||
436 | 436 | ||
437 | /* | 437 | /* |
438 | * The boot idle thread must execute schedule() | 438 | * The boot idle thread must execute schedule() |
439 | * at least one to get things moving: | 439 | * at least once to get things moving: |
440 | */ | 440 | */ |
441 | init_idle_bootup_task(current); | ||
441 | preempt_enable_no_resched(); | 442 | preempt_enable_no_resched(); |
442 | schedule(); | 443 | schedule(); |
443 | preempt_disable(); | 444 | preempt_disable(); |
444 | 445 | ||
445 | /* Call into cpu_idle with preempt disabled */ | 446 | /* Call into cpu_idle with preempt disabled */ |
446 | cpu_idle(); | 447 | cpu_idle(); |
447 | } | 448 | } |
448 | 449 | ||
449 | /* Check for early params. */ | 450 | /* Check for early params. */ |
450 | static int __init do_early_param(char *param, char *val) | 451 | static int __init do_early_param(char *param, char *val) |
diff --git a/kernel/sched.c b/kernel/sched.c index 7090982350d3..ac4d26241d1e 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5018,6 +5018,11 @@ void show_state_filter(unsigned long state_filter) | |||
5018 | debug_show_all_locks(); | 5018 | debug_show_all_locks(); |
5019 | } | 5019 | } |
5020 | 5020 | ||
5021 | void __cpuinit init_idle_bootup_task(struct task_struct *idle) | ||
5022 | { | ||
5023 | /* nothing yet */ | ||
5024 | } | ||
5025 | |||
5021 | /** | 5026 | /** |
5022 | * init_idle - set up an idle thread for a given CPU | 5027 | * init_idle - set up an idle thread for a given CPU |
5023 | * @idle: task in question | 5028 | * @idle: task in question |