From 586e7ef09d9e7192582007e1074451b3e9cd6c80 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Fri, 13 Dec 2024 11:03:10 -0800 Subject: [PATCH] ANDROID: sched/core: Fix two small build issues with proxy-exec w/ !CONFIG_SMP After the proxy patches landed, I got some build failure warnings for !CONFIG_SMP configurations. I had tested !CONFIG_SMP earlier in development but I missed testing after a few of the recent changes were made. Fixes: 6d7a9ac0d5ae ("ANDROID: sched: Add trace events for proxy execution") Change-Id: I8d38c6ccb7b3a18cb32b1b1ecec3179130615605 Signed-off-by: John Stultz --- kernel/sched/core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6886d6539118..ecf22d88f4ca 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4112,11 +4112,19 @@ static inline bool proxy_needs_return(struct rq *rq, struct task_struct *p) raw_spin_unlock(&p->blocked_lock); return ret; } + +static inline void _trace_sched_pe_return_migration(struct task_struct *p) +{ + trace_sched_pe_return_migration(p, p->wake_cpu); +} #else /* !CONFIG_SMP */ static inline bool proxy_needs_return(struct rq *rq, struct task_struct *p) { return false; } +static inline void _trace_sched_pe_return_migration(struct task_struct *p) +{ +} #endif /*CONFIG_SMP */ static void @@ -4221,7 +4229,7 @@ static int ttwu_runnable(struct task_struct *p, int wake_flags) wakeup_preempt(rq, p, wake_flags); } if (proxy_needs_return(rq, p)) { - trace_sched_pe_return_migration(p, p->wake_cpu); + _trace_sched_pe_return_migration(p); goto out; } ttwu_do_wakeup(p); @@ -5591,6 +5599,10 @@ void balance_callbacks(struct rq *rq, struct balance_callback *head) #else +static inline void zap_balance_callbacks(struct rq *rq) +{ +} + static inline void __balance_callbacks(struct rq *rq) { } @@ -7463,7 +7475,7 @@ needs_return: return proxy_resched_idle(rq); p->blocked_on_state = BO_RUNNABLE; - trace_sched_pe_return_migration(p, p->wake_cpu); + _trace_sched_pe_return_migration(p); proxy_migrate_task(rq, rf, p, p->wake_cpu); return NULL;