diff options
author | Andrea Righi <arighi@nvidia.com> | 2025-06-04 16:33:11 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-06-09 06:25:02 -1000 |
commit | c68ea8243c5cc901cea62f695504bec73195d906 (patch) | |
tree | 383b0a7d49c5850b6f51557323c8a572aa576029 | |
parent | 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff) |
sched_ext: idle: Remove unnecessary ifdef in scx_bpf_cpu_node()
There's no need to make scx_bpf_cpu_node() dependent on CONFIG_NUMA,
since cpu_to_node() can be used also in systems with CONFIG_NUMA
disabled.
This also allows to always validate the @cpu argument regardless of the
CONFIG_NUMA settings.
Fixes: 01059219b0cfd ("sched_ext: idle: Introduce node-aware idle cpu kfunc helpers")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/sched/ext_idle.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c index 6d29d3cbc670..1598681b681e 100644 --- a/kernel/sched/ext_idle.c +++ b/kernel/sched/ext_idle.c @@ -929,14 +929,10 @@ s32 select_cpu_from_kfunc(struct task_struct *p, s32 prev_cpu, u64 wake_flags, */ __bpf_kfunc int scx_bpf_cpu_node(s32 cpu) { -#ifdef CONFIG_NUMA if (!kf_cpu_valid(cpu, NULL)) return NUMA_NO_NODE; return cpu_to_node(cpu); -#else - return 0; -#endif } /** |