Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/sched_ext/include: Add __COMPAT_HAS_scx_bpf_select_cpu_and macro

scx_bpf_select_cpu_and() is now an inline wrapper so
bpf_ksym_exists(scx_bpf_select_cpu_and) no longer works. Add
__COMPAT_HAS_scx_bpf_select_cpu_and macro that checks for either the
struct args type (new) or the compat ksym (old) to test availability.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Andrea Righi <arighi@nvidia.com>

Tejun Heo c9c8546c 3691d380

+8
+8
tools/sched_ext/include/scx/compat.bpf.h
··· 266 266 } 267 267 } 268 268 269 + /* 270 + * scx_bpf_select_cpu_and() is now an inline wrapper. Use this instead of 271 + * bpf_ksym_exists(scx_bpf_select_cpu_and) to test availability. 272 + */ 273 + #define __COMPAT_HAS_scx_bpf_select_cpu_and \ 274 + (bpf_core_type_exists(struct scx_bpf_select_cpu_and_args) || \ 275 + bpf_ksym_exists(scx_bpf_select_cpu_and___compat)) 276 + 269 277 /** 270 278 * scx_bpf_dsq_insert_vtime - Insert a task into the vtime priority queue of a DSQ 271 279 * @p: task_struct to insert