Skip to content

Commit be4ae8c

Browse files
Aaron Klingvireshk
authored andcommitted
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 <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Aaron Kling <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 4a1e3bf commit be4ae8c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/cpufreq/tegra186-cpufreq.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
7373
{
7474
struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
7575
unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id;
76+
u32 cpu;
7677

7778
policy->freq_table = data->clusters[cluster].table;
7879
policy->cpuinfo.transition_latency = 300 * 1000;
7980
policy->driver_data = NULL;
8081

82+
/* set same policy for all cpus in a cluster */
83+
for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) {
84+
if (data->cpus[cpu].bpmp_cluster_id == cluster)
85+
cpumask_set_cpu(cpu, policy->cpus);
86+
}
87+
8188
return 0;
8289
}
8390

0 commit comments

Comments
 (0)