From: Thara Gopinath <thara.gopinath@linaro.org>
To: sudeep.holla@arm.com, gregkh@linuxfoundation.org,
rafael@kernel.org, bjorn.andersson@linaro.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: [PATCH] base: arch_topology: Use policy->max to calculate freq_factor
Date: Mon, 15 Nov 2021 15:10:10 -0500 [thread overview]
Message-ID: <20211115201010.68567-1-thara.gopinath@linaro.org> (raw)
cpuinfo.max_freq can reflect boost frequency if enabled during boot. Since
we don't consider boost frequencies while calculating cpu capacities, use
policy->max to populate the freq_factor during boot up.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
drivers/base/arch_topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 43407665918f..df818b439bc3 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -334,7 +334,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
cpumask_andnot(cpus_to_visit, cpus_to_visit, policy->related_cpus);
for_each_cpu(cpu, policy->related_cpus)
- per_cpu(freq_factor, cpu) = policy->cpuinfo.max_freq / 1000;
+ per_cpu(freq_factor, cpu) = policy->max / 1000;
if (cpumask_empty(cpus_to_visit)) {
topology_normalize_cpu_scale();
--
2.25.1
next reply other threads:[~2021-11-15 20:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 20:10 Thara Gopinath [this message]
2021-11-16 19:05 ` [PATCH] base: arch_topology: Use policy->max to calculate freq_factor Rafael J. Wysocki
2021-11-17 10:46 ` Lukasz Luba
2021-11-17 12:49 ` Rafael J. Wysocki
2021-11-17 15:08 ` Lukasz Luba
2021-11-17 15:17 ` Rafael J. Wysocki
2021-11-17 15:47 ` Lukasz Luba
2021-11-17 17:01 ` Thara Gopinath
2021-11-17 17:59 ` Rafael J. Wysocki
2021-12-02 10:50 ` Morten Rasmussen
2021-12-02 16:31 ` Rafael J. Wysocki
2021-12-03 9:48 ` Morten Rasmussen
2021-12-03 15:07 ` Rafael J. Wysocki
2021-12-08 9:20 ` Morten Rasmussen
2021-11-17 11:21 ` Dietmar Eggemann
2021-11-17 10:12 ` Lukasz Luba
2021-11-24 16:22 ` Lukasz Luba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211115201010.68567-1-thara.gopinath@linaro.org \
--to=thara.gopinath@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).