summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrea Righi <arighi@nvidia.com>2026-03-22 07:51:46 +0100
committerTejun Heo <tj@kernel.org>2026-03-22 10:02:49 -1000
commit63f500c32a37d490ec623a3130e488cdb9bd6cf7 (patch)
tree87e00f52220662e0332e3007be273f5b2b17b562 /kernel
parente73b1d7210c02ff223e2786934d5a6e73eab1999 (diff)
sched_ext: Guard cpu_smt_mask() with CONFIG_SCHED_SMT
Wrap cpu_smt_mask() usage with CONFIG_SCHED_SMT to avoid build failures on kernels built without SMT support. Fixes: 2197cecdb02c ("sched_ext: idle: Prioritize idle SMT sibling") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202603221422.XIueJOE9-lkp@intel.com/ Signed-off-by: Andrea Righi <arighi@nvidia.com> Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/ext_idle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index d9596427b5aa..857d8e902b44 100644
--- a/kernel/sched/ext_idle.c
+++ b/kernel/sched/ext_idle.c
@@ -622,6 +622,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
goto out_unlock;
}
+#ifdef CONFIG_SCHED_SMT
/*
* Use @prev_cpu's sibling if it's idle.
*/
@@ -633,6 +634,7 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
goto out_unlock;
}
}
+#endif
/*
* Search for any idle CPU in the same LLC domain.