ANDROID: Build fixups with PROXY_EXEC v18 + !CONFIG_SMP

In doing some testing, I caught a few build issues with
different combinations of enabling and disabling
CONFIG_SCHED_PROXY_EXEC and CONFIG_SMP after syncing
with the v18 of the proxy-exec series.

These fixes were not in the v18 series of the patch, but
I've included them in my tree for v19.

Bug: 427820735
Change-Id: Ice3733219a292f882223f8a505f5339fa4b7583f
Signed-off-by: John Stultz <jstultz@google.com>
This commit is contained in:
John Stultz
2025-07-01 05:20:30 +00:00
parent 4f9e4406e4
commit d2e452e197
2 changed files with 4 additions and 3 deletions

View File

@@ -3899,7 +3899,7 @@ static void do_activate_blocked_waiter(struct rq *target_rq, struct task_struct
*/
return;
}
if (READ_ONCE(p->on_cpu)) {
if (task_on_cpu(task_rq(p), p)) {
/*
* Its possible this activation is very late, and
* we already were woken up and are running on a

View File

@@ -2336,7 +2336,7 @@ static inline bool task_is_blocked(struct task_struct *p)
static inline int task_on_cpu(struct rq *rq, struct task_struct *p)
{
#ifdef CONFIG_SMP
return p->on_cpu;
return READ_ONCE(p->on_cpu);
#else
return task_current(rq, p);
#endif
@@ -3957,6 +3957,7 @@ void move_queued_task_locked(struct rq *rq, struct rq *dst_rq, struct task_struc
int task_is_pushable(struct rq *rq, struct task_struct *p, int cpu);
struct task_struct *find_exec_ctx(struct rq *rq, struct task_struct *p);
#else /* !CONFIG_SCHED_PROXY_EXEC */
#ifdef CONFIG_SMP
static inline
void move_queued_task_locked(struct rq *rq, struct rq *dst_rq, struct task_struct *task)
{
@@ -3968,7 +3969,7 @@ int task_is_pushable(struct rq *rq, struct task_struct *p, int cpu)
{
return __task_is_pushable(rq, p, cpu);
}
#endif
static inline
struct task_struct *find_exec_ctx(struct rq *rq, struct task_struct *p)
{