summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2026-06-19 16:59:20 +0100
committerTejun Heo <tj@kernel.org>2026-06-24 12:48:32 -1000
commit37cca059804ee35782a1cc9d7b087e5d3c855eae (patch)
tree5380a097715bb90b2ddf54835d86592b95c41979 /tools
parent115d1ce989747045bd7745c7ab020982660c7e42 (diff)
downloadlinux-37cca059804ee35782a1cc9d7b087e5d3c855eae.tar.gz
linux-37cca059804ee35782a1cc9d7b087e5d3c855eae.zip
sched_ext: Remove deprecated scx_bpf_cpu_rq()
scx_bpf_cpu_rq() exposes rq pointers without requiring the rq lock and has emitted a deprecation warning since commit 5c48d88fe004 ("sched_ext: deprecation warn for scx_bpf_cpu_rq()"). The supported replacements cover the intended uses: scx_bpf_locked_rq() for locked rq access and scx_bpf_cpu_curr() for remote curr lookup. Remove the kfunc, its BTF registrations, the deprecation warning state, and the BPF-side prototype and compat fallback. Signed-off-by: Christian Loehle <christian.loehle@arm.com> Reviewed-by: Andrea Righi <arighi@nvidia.com> Reviewed-by: Hongyan Xia <hongyan.xia@transsion.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/sched_ext/include/scx/common.bpf.h5
-rw-r--r--tools/sched_ext/include/scx/compat.bpf.h17
2 files changed, 2 insertions, 20 deletions
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h
index 9591a6e778ce..bd51986c4c42 100644
--- a/tools/sched_ext/include/scx/common.bpf.h
+++ b/tools/sched_ext/include/scx/common.bpf.h
@@ -96,7 +96,6 @@ s32 scx_bpf_pick_any_cpu_node(const cpumask_t *cpus_allowed, int node, u64 flags
s32 scx_bpf_pick_any_cpu(const cpumask_t *cpus_allowed, u64 flags) __ksym;
bool scx_bpf_task_running(const struct task_struct *p) __ksym;
s32 scx_bpf_task_cpu(const struct task_struct *p) __ksym;
-struct rq *scx_bpf_cpu_rq(s32 cpu) __ksym;
struct rq *scx_bpf_locked_rq(void) __ksym;
struct task_struct *scx_bpf_cpu_curr(s32 cpu) __ksym __weak;
struct task_struct *scx_bpf_tid_to_task(u64 tid) __ksym __weak;
@@ -983,8 +982,8 @@ extern struct irqtime___local cpu_irqtime __ksym __weak;
static inline struct rq___local *get_current_rq(u32 cpu)
{
/*
- * This is a workaround to get an rq pointer since we decided to
- * deprecate scx_bpf_cpu_rq().
+ * This is a workaround to get an rq pointer now that
+ * scx_bpf_cpu_rq() has been removed.
*
* WARNING: The caller must hold the rq lock for @cpu. This is
* guaranteed when called from scheduling callbacks (ops.running,
diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/include/scx/compat.bpf.h
index 87f15f296234..133058578668 100644
--- a/tools/sched_ext/include/scx/compat.bpf.h
+++ b/tools/sched_ext/include/scx/compat.bpf.h
@@ -234,23 +234,6 @@ static inline bool __COMPAT_is_enq_cpu_selected(u64 enq_flags)
scx_bpf_pick_any_cpu(cpus_allowed, flags))
/*
- * v6.18: Add a helper to retrieve the current task running on a CPU.
- *
- * Keep this helper available until v6.20 for compatibility.
- */
-static inline struct task_struct *__COMPAT_scx_bpf_cpu_curr(int cpu)
-{
- struct rq *rq;
-
- if (bpf_ksym_exists(scx_bpf_cpu_curr))
- return scx_bpf_cpu_curr(cpu);
-
- rq = scx_bpf_cpu_rq(cpu);
-
- return rq ? rq->curr : NULL;
-}
-
-/*
* v6.19: To work around BPF maximum parameter limit, the following kfuncs are
* replaced with variants that pack scalar arguments in a struct. Wrappers are
* provided to maintain source compatibility.