From 9393bb52f87722830093a5ab9e942a231969ed27 Mon Sep 17 00:00:00 2001 From: Stephen Dickey Date: Tue, 9 Feb 2021 23:01:11 -0800 Subject: [PATCH] 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 --- kernel/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 1cbbbfdeae83..62cb4fb7a867 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -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; }