sched/walt: check for incorrect cpu assignment

When a task is in execve, it can be assigned to any cpu regardless
of its status as a 32bit task. However, once execve is done, the
task needs to be assigned to a 32 bit cpu.

Capture the case where a 32 bit task, not in execve, is assigned
to an incorrect cpu.

Change-Id: I7880521716f6ed16d81aad13e42c0ad4374bab15
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
Stephen Dickey 2022-04-14 15:47:37 -07:00 committed by Rishabh Bhatnagar
parent 318a435b83
commit d6ad86a43e

View File

@ -3983,6 +3983,13 @@ static void android_rvh_set_task_cpu(void *unused, struct task_struct *p, unsign
if (!cpumask_test_cpu(new_cpu, p->cpus_ptr))
WALT_BUG(WALT_BUG_WALT, p, "selecting unaffined cpu=%d comm=%s(%d) affinity=0x%x",
new_cpu, p->comm, p->pid, (*(cpumask_bits(p->cpus_ptr))));
if (!p->in_execve &&
is_compat_thread(task_thread_info(p)) &&
!cpumask_test_cpu(new_cpu, system_32bit_el0_cpumask()))
WALT_BUG(WALT_BUG_WALT, p,
"selecting non 32 bit cpu=%d comm=%s(%d) 32bit_cpus=0x%x",
new_cpu, p->comm, p->pid, (*(cpumask_bits(system_32bit_el0_cpumask()))));
}
static void android_rvh_new_task_stats(void *unused, struct task_struct *p)