From dc224f824d206bc6cbd9b58ef8a193d1b5228b0a Mon Sep 17 00:00:00 2001 From: Tengfei Fan Date: Tue, 31 Aug 2021 14:49:26 +0800 Subject: [PATCH] sched/walt: update the value of active_cpus Because of online cpu not make sure active, but active make sure online, so when want to get active_cpus, make it and cpu_active_mask. Change-Id: Ie73b85506252edfad1f1258c9e059b0167dfe4a5 Signed-off-by: Tengfei Fan --- kernel/sched/walt/core_ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched/walt/core_ctl.c b/kernel/sched/walt/core_ctl.c index f90948451d21..0b976655a280 100644 --- a/kernel/sched/walt/core_ctl.c +++ b/kernel/sched/walt/core_ctl.c @@ -287,7 +287,9 @@ static ssize_t show_need_cpus(const struct cluster_data *state, char *buf) static ssize_t show_active_cpus(const struct cluster_data *state, char *buf) { - return scnprintf(buf, PAGE_SIZE, "%u\n", state->active_cpus); + int active_cpus = get_active_cpu_count(state); + + return scnprintf(buf, PAGE_SIZE, "%u\n", active_cpus); } static unsigned int cluster_paused_cpus(const struct cluster_data *cluster)