From: Ingo Molnar Date: Wed, 28 May 2025 08:09:20 +0000 (+0200) Subject: sched/smp: Use the SMP version of task_on_cpu() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea100b31eed459ea32d6df4489cf70219fd83a07;p=thirdparty%2Fkernel%2Fstable.git sched/smp: Use the SMP version of task_on_cpu() Simplify the scheduler by making CONFIG_SMP=y code in task_on_cpu() unconditional. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Sebastian Andrzej Siewior Cc: Shrikanth Hegde Cc: Steven Rostedt Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lore.kernel.org/r/20250528080924.2273858-40-mingo@kernel.org --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index f4bac9fcb36b..7490473a73aa 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2238,11 +2238,7 @@ static inline int task_current_donor(struct rq *rq, struct task_struct *p) static inline int task_on_cpu(struct rq *rq, struct task_struct *p) { -#ifdef CONFIG_SMP return p->on_cpu; -#else - return task_current(rq, p); -#endif } static inline int task_on_rq_queued(struct task_struct *p)