walt: honor affinity in placement path

Walt placement code could return the prev_cpu for placement without
checking if it is in affinity mask.

Fix it by checking task's cpus_ptr.

Change-Id: I6edf2249bccffd1868dd546dc18b45af311cc91d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Abhijeet Dharmapurikar 2021-05-12 12:17:57 -07:00 committed by Rishabh Bhatnagar
parent 550838ff0a
commit c565963618

View File

@ -200,7 +200,8 @@ static void walt_find_best_target(struct sched_domain *sd,
if (((capacity_orig_of(prev_cpu) == capacity_orig_of(start_cpu)) ||
asym_cap_siblings(prev_cpu, start_cpu)) &&
cpu_active(prev_cpu) && cpu_online(prev_cpu) &&
available_idle_cpu(prev_cpu)) {
available_idle_cpu(prev_cpu) &&
cpumask_test_cpu(prev_cpu, p->cpus_ptr)) {
target_cpu = prev_cpu;
fbt_env->fastpath = PREV_CPU_FASTPATH;
cpumask_set_cpu(target_cpu, candidates);