aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-05-28 10:09:18 +0200
committerIngo Molnar <mingo@kernel.org>2025-06-13 08:47:22 +0200
commit9fd5da7989ba6175fe71439738ddcf4c030d3d51 (patch)
tree98f74c3d8b63d8845e91f1b208d84317b9af6949 /kernel
parentsched/smp: Use the SMP version of cpu_of() (diff)
downloadlinux-9fd5da7989ba6175fe71439738ddcf4c030d3d51.tar.gz
linux-9fd5da7989ba6175fe71439738ddcf4c030d3d51.zip
sched/smp: Use the SMP version of is_migration_disabled()
Simplify the scheduler by making the CONFIG_SMP-only code in is_migration_disabled() unconditional. 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-38-mingo@kernel.org
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/sched.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 234dd28e2bec..b184c3d61ba2 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1301,11 +1301,7 @@ static inline int cpu_of(struct rq *rq)
static inline bool is_migration_disabled(struct task_struct *p)
{
-#ifdef CONFIG_SMP
return p->migration_disabled;
-#else
- return false;
-#endif
}
DECLARE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);