Commit 18f08dae authored by Cheng Jian's avatar Cheng Jian Committed by Ingo Molnar

sched/core: Remove unnecessary initialization init_idle_bootup_task()

init_idle_bootup_task( ) is called in rest_init( ) to switch
the scheduling class of the boot thread to the idle class.

the function only sets:

    idle->sched_class = &idle_sched_class;

which has been set in init_idle() called by sched_init():

     * The idle tasks have their own, simple scheduling class:
    idle->sched_class = &idle_sched_class;

We've already set the boot thread to idle class in
so it's unnecessary to set it again in
Signed-off-by: default avatarCheng Jian <>
Signed-off-by: default avatarXie XiuQi <>
Signed-off-by: default avatarPeter Zijlstra (Intel) <>
Cc: <>
Cc: <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Link: default avatarIngo Molnar <>
parent 3261ed0b
......@@ -30,7 +30,6 @@ extern int lockdep_tasklist_lock_is_held(void);
extern asmlinkage void schedule_tail(struct task_struct *prev);
extern void init_idle(struct task_struct *idle, int cpu);
extern void init_idle_bootup_task(struct task_struct *idle);
extern int sched_fork(unsigned long clone_flags, struct task_struct *p);
extern void sched_dead(struct task_struct *p);
......@@ -430,7 +430,6 @@ static noinline void __ref rest_init(void)
* The boot idle thread must execute schedule()
* at least once to get things moving:
/* Call into cpu_idle with preempt disabled */
......@@ -5177,11 +5177,6 @@ void show_state_filter(unsigned long state_filter)
void init_idle_bootup_task(struct task_struct *idle)
idle->sched_class = &idle_sched_class;
* init_idle - set up an idle thread for a given CPU
* @idle: task in question
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment