Commit 1df21055 authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
parent 4da1ce6d
...@@ -195,6 +195,7 @@ struct task_struct; ...@@ -195,6 +195,7 @@ struct task_struct;
extern void sched_init(void); extern void sched_init(void);
extern void sched_init_smp(void); extern void sched_init_smp(void);
extern void init_idle(struct task_struct *idle, int cpu); extern void init_idle(struct task_struct *idle, int cpu);
extern void init_idle_bootup_task(struct task_struct *idle);
extern cpumask_t nohz_cpu_mask; extern cpumask_t nohz_cpu_mask;
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
......
...@@ -436,15 +436,16 @@ static void noinline __init_refok rest_init(void) ...@@ -436,15 +436,16 @@ static void noinline __init_refok rest_init(void)
/* /*
* The boot idle thread must execute schedule() * The boot idle thread must execute schedule()
* at least one to get things moving: * at least once to get things moving:
*/ */
init_idle_bootup_task(current);
preempt_enable_no_resched(); preempt_enable_no_resched();
schedule(); schedule();
preempt_disable(); preempt_disable();
/* Call into cpu_idle with preempt disabled */ /* Call into cpu_idle with preempt disabled */
cpu_idle(); cpu_idle();
} }
/* Check for early params. */ /* Check for early params. */
static int __init do_early_param(char *param, char *val) static int __init do_early_param(char *param, char *val)
......
...@@ -5018,6 +5018,11 @@ void show_state_filter(unsigned long state_filter) ...@@ -5018,6 +5018,11 @@ void show_state_filter(unsigned long state_filter)
debug_show_all_locks(); debug_show_all_locks();
} }
void __cpuinit init_idle_bootup_task(struct task_struct *idle)
{
/* nothing yet */
}
/** /**
* init_idle - set up an idle thread for a given CPU * init_idle - set up an idle thread for a given CPU
* @idle: task in question * @idle: task in question
......
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