Skip to content

Commit 74063c1

Browse files
author
Ingo Molnar
committed
sched/smp: Use the SMP version of idle_thread_set_boot_cpu()
Simplify the scheduler by making the CONFIG_SMP=y version of idle_thread_set_boot_cpu() unconditional. Note that idle_thread_set_boot_cpu() is already conditional on CONFIG_GENERIC_SMP_IDLE_THREAD, which most architectures select unconditionally on both UP and SMP kernels. Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Shrikanth Hegde <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1f25730 commit 74063c1

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

kernel/sched/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8582,9 +8582,7 @@ void __init sched_init(void)
85828582

85838583
calc_load_update = jiffies + LOAD_FREQ;
85848584

8585-
#ifdef CONFIG_SMP
85868585
idle_thread_set_boot_cpu();
8587-
#endif
85888586

85898587
balance_push_set(smp_processor_id(), false);
85908588
init_sched_fair_class();

kernel/smpboot.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
#include "smpboot.h"
2020

21-
#ifdef CONFIG_SMP
22-
2321
#ifdef CONFIG_GENERIC_SMP_IDLE_THREAD
2422
/*
2523
* For the hotplug case we keep the task structs around and reuse
@@ -76,8 +74,6 @@ void __init idle_threads_init(void)
7674
}
7775
#endif
7876

79-
#endif /* #ifdef CONFIG_SMP */
80-
8177
static LIST_HEAD(hotplug_threads);
8278
static DEFINE_MUTEX(smpboot_threads_lock);
8379

0 commit comments

Comments
 (0)