From: Andrea Righi Date: Thu, 15 May 2025 19:11:42 +0000 (+0200) Subject: sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c X-Git-Tag: v6.16-rc1~153^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=617a77018f683905ed4e8cd693df51243908353f;p=thirdparty%2Flinux.git sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c Relocate the scx_kf_allowed_if_unlocked(), so it can be used from other source files (e.g., ext_idle.c). No functional change. Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo --- diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 52e0f9553e730..793e288f63cf4 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -1387,11 +1387,6 @@ static __always_inline bool scx_kf_allowed_on_arg_tasks(u32 mask, return true; } -static bool scx_kf_allowed_if_unlocked(void) -{ - return !current->scx.kf_mask; -} - /** * nldsq_next_task - Iterate to the next task in a non-local DSQ * @dsq: user dsq being iterated diff --git a/kernel/sched/ext.h b/kernel/sched/ext.h index 3053cdd61eb9c..6e5072f577718 100644 --- a/kernel/sched/ext.h +++ b/kernel/sched/ext.h @@ -8,6 +8,11 @@ */ #ifdef CONFIG_SCHED_CLASS_EXT +static inline bool scx_kf_allowed_if_unlocked(void) +{ + return !current->scx.kf_mask; +} + DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup); void scx_tick(struct rq *rq);