mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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: 01059219b0 ("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>
This commit is contained in:
parent
19272b37aa
commit
c68ea8243c
|
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user