ANDROID: sched/pause: prevent wake up paused cpus

When used for qos or other reasons, wake up idle
cpus will wake cpus en-mass.  Cpus that are paused
should not be woken up like this.

Update to use active_mask, so that paused cpus are
ignored for general cpu wakeup operations.

Bug: 161210528
Change-Id: I10721e75497a8902f8ec998ded4e2eb094770f38
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
Stephen Dickey
2020-12-11 17:10:32 -08:00
committed by Todd Kjos
parent d9ffca8412
commit 5ada76d056

View File

@@ -23,6 +23,7 @@
#include <linux/sched/clock.h>
#include <linux/nmi.h>
#include <linux/sched/debug.h>
#include <linux/suspend.h>
#include "smpboot.h"
#include "sched/smp.h"
@@ -953,7 +954,8 @@ void wake_up_all_idle_cpus(void)
if (cpu == smp_processor_id())
continue;
wake_up_if_idle(cpu);
if (s2idle_state == S2IDLE_STATE_ENTER || cpu_active(cpu))
wake_up_if_idle(cpu);
}
preempt_enable();
}