diff options
author | Aaron Kling <luceoscutum@gmail.com> | 2025-03-10 08:28:48 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-03-10 08:50:05 +0300 |
commit | be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8 (patch) | |
tree | 006da5a76d49f3dbdc1bf1944734e05cfa930ba9 | |
parent | 4a1e3bf61fc78ad100018adb573355303915dca3 (diff) | |
download | linux-be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8.tar.xz |
cpufreq: tegra186: Share policy per cluster
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>
-rw-r--r-- | drivers/cpufreq/tegra186-cpufreq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index b54a77be54e6..cbabb726c664 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; } |