diff --git a/kernel/sched/walt/walt.c b/kernel/sched/walt/walt.c index b4c09317d2a1..e81198c54f61 100644 --- a/kernel/sched/walt/walt.c +++ b/kernel/sched/walt/walt.c @@ -3885,6 +3885,10 @@ static void android_rvh_set_task_cpu(void *unused, struct task_struct *p, unsign if (unlikely(walt_disabled)) return; fixup_busy_time(p, (int) new_cpu); + + 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)))); } static void android_rvh_new_task_stats(void *unused, struct task_struct *p) @@ -3938,9 +3942,6 @@ static void android_rvh_enqueue_task(void *unused, struct rq *rq, struct task_st double_enqueue = true; } - if (!cpumask_test_cpu(cpu_of(rq), p->cpus_ptr)) - WALT_BUG(WALT_BUG_NONCRITICAL, p, "enqueueing on rq=%d comm=%s(%d) affinity=0x%x", - cpu_of(rq), p->comm, p->pid, (*(cpumask_bits(p->cpus_ptr)))); if (cpu_halted(cpu_of(rq)) && !(p->flags & PF_KTHREAD) && !walt_halt_check_last(cpu_of(rq))) WALT_BUG(WALT_BUG_NONCRITICAL, p,