From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Aaron Kling <luceoscutum@gmail.com>,
Sumit Gupta <sumitg@nvidia.com>,
Thierry Reding <treding@nvidia.com>,
Aaron Kling <webgeek1234@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Sasha Levin <sashal@kernel.org>,
rafael@kernel.org, thierry.reding@gmail.com,
jonathanh@nvidia.com, linux-pm@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: [PATCH AUTOSEL 6.14 210/642] cpufreq: tegra186: Share policy per cluster
Date: Mon, 5 May 2025 18:07:06 -0400 [thread overview]
Message-ID: <20250505221419.2672473-210-sashal@kernel.org> (raw)
In-Reply-To: <20250505221419.2672473-1-sashal@kernel.org>
From: Aaron Kling <luceoscutum@gmail.com>
[ Upstream commit be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8 ]
This functionally brings tegra186 in line with tegra210 and tegra194,
sharing a cpufreq policy between all cores in a cluster.
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cpufreq/tegra186-cpufreq.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index c7761eb99f3cc..92aa50f016660 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
{
struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id;
+ u32 cpu;
policy->freq_table = data->clusters[cluster].table;
policy->cpuinfo.transition_latency = 300 * 1000;
policy->driver_data = NULL;
+ /* set same policy for all cpus in a cluster */
+ for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) {
+ if (data->cpus[cpu].bpmp_cluster_id == cluster)
+ cpumask_set_cpu(cpu, policy->cpus);
+ }
+
return 0;
}
--
2.39.5
next prev parent reply other threads:[~2025-05-05 22:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250505221419.2672473-1-sashal@kernel.org>
2025-05-05 22:06 ` [PATCH AUTOSEL 6.14 147/642] pinctrl-tegra: Restore SFSEL bit when freeing pins Sasha Levin
2025-05-05 22:07 ` Sasha Levin [this message]
2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 223/642] arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator Sasha Levin
2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 224/642] arm64: tegra: Resize aperture for the IGX PCIe C5 slot Sasha Levin
2025-05-05 22:07 ` [PATCH AUTOSEL 6.14 234/642] ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114 Sasha Levin
2025-05-05 22:14 ` [PATCH AUTOSEL 6.14 625/642] pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group() Sasha Levin
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=20250505221419.2672473-210-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=luceoscutum@gmail.com \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sumitg@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=webgeek1234@gmail.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