From 9d253eadc1400125101e2be809f4e56484f93885 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Sun, 21 Feb 2021 06:34:10 +0530 Subject: [PATCH] sched/walt: Track CPUs that can't be paused The first CPU that supports AArch32 in EL0 on asymmetric AArch32 systems can't be paused. Track such CPUs in core_ctl to not to request pause_cpus(). Change-Id: I4a9132884c3e322e9a6bd7d1f06a82bd9113eec8 Signed-off-by: Pavankumar Kondeti --- kernel/sched/walt/core_ctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/sched/walt/core_ctl.c b/kernel/sched/walt/core_ctl.c index 6d0bed0bfbda..307d0788e913 100644 --- a/kernel/sched/walt/core_ctl.c +++ b/kernel/sched/walt/core_ctl.c @@ -53,6 +53,7 @@ struct cpu_data { struct cluster_data *cluster; struct list_head sib; bool paused_by_us; + bool disabled; }; static DEFINE_PER_CPU(struct cpu_data, cpu_state); @@ -1007,6 +1008,8 @@ static void try_to_pause(struct cluster_data *cluster, unsigned int need, if (!num_cpus--) break; + if (c->disabled) + continue; if (!is_active(c)) continue; if (active_cpus - nr_pending == need) @@ -1043,6 +1046,8 @@ static void try_to_pause(struct cluster_data *cluster, unsigned int need, if (!num_cpus--) break; + if (c->disabled) + continue; if (!is_active(c)) continue; if (active_cpus - nr_pending <= cluster->max_cpus) @@ -1246,6 +1251,8 @@ static int cluster_init(const struct cpumask *mask) state = &per_cpu(cpu_state, cpu); state->cluster = cluster; state->cpu = cpu; + state->disabled = get_cpu_device(cpu) && + get_cpu_device(cpu)->offline_disabled; list_add_tail(&state->sib, &cluster->lru); } cluster->active_cpus = get_active_cpu_count(cluster);