ANDROID: cpuhp/aarch32: keep last 32bit cpu active

It is possible that all the 32 bit CPUs are paused in
the system, which is not ideal for quickly launching
32 bit apps.

Detect if a pause operation is about to pause the
last 32 bit CPU, and prevent it from happening.

Bug: 175896474
Change-Id: I21b4dad7ba9f3ef9be460137098e6fb2c0e336e6
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
Stephen Dickey 2021-02-09 23:01:11 -08:00 committed by Quentin Perret
parent b129c98dc6
commit 9393bb52f8

View File

@ -1153,7 +1153,8 @@ int pause_cpus(struct cpumask *cpus)
cpumask_and(cpus, cpus, cpu_active_mask);
for_each_cpu(cpu, cpus) {
if (!cpu_online(cpu) || dl_cpu_busy(cpu)) {
if (!cpu_online(cpu) || dl_cpu_busy(cpu) ||
get_cpu_device(cpu)->offline_disabled == true) {
err = -EBUSY;
goto err_cpu_maps_update;
}