Skip to content

Commit 74063c1

Browse files
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 <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Shrikanth Hegde <sshegde@linux.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/r/20250528080924.2273858-28-mingo@kernel.org
1 parent 1f25730 commit 74063c1

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

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)