Re: [PATCH] cpufreq: tegra186: Share policy per cluster
From: Viresh Kumar
Date: Mon Mar 10 2025 - 01:11:40 EST
On 10-03-25, 00:08, Aaron Kling wrote:
> On Sun, Mar 9, 2025 at 11:45 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
> >
> > On 16-02-25, 10:08, Aaron Kling wrote:
> > > This functionally brings tegra186 in line with tegra210 and tegra194,
> > > sharing a cpufreq policy between all cores in a cluster.
> > >
> > > Signed-off-by: Aaron Kling <webgeek1234@xxxxxxxxx>
> > > ---
> > > 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..c832a1270e688 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 < (sizeof(tegra186_cpus)/sizeof(struct tegra186_cpufreq_cpu)); cpu++) {
> >
> > Can't you use ARRAY_SIZE here ?
>
> I could, just wasn't aware of that macro. Is that enough to send a v2 over?
Yes, please send that and include the tags you received.
--
viresh