* [PATCH] cpufreq: tegra186: Share policy per cluster @ 2025-02-16 16:08 Aaron Kling 2025-03-03 10:03 ` Viresh Kumar 2025-03-10 4:45 ` Viresh Kumar 0 siblings, 2 replies; 8+ messages in thread From: Aaron Kling @ 2025-02-16 16:08 UTC (permalink / raw) To: Rafael J. Wysocki, Viresh Kumar, Thierry Reding, Jonathan Hunter Cc: Aaron Kling, linux-pm, linux-tegra, linux-kernel 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@gmail.com> --- 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++) { + if (data->cpus[cpu].bpmp_cluster_id == cluster) + cpumask_set_cpu(cpu, policy->cpus); + } + return 0; } -- 2.48.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-02-16 16:08 [PATCH] cpufreq: tegra186: Share policy per cluster Aaron Kling @ 2025-03-03 10:03 ` Viresh Kumar 2025-03-03 15:48 ` Thierry Reding 2025-03-10 4:45 ` Viresh Kumar 1 sibling, 1 reply; 8+ messages in thread From: Viresh Kumar @ 2025-03-03 10:03 UTC (permalink / raw) To: Aaron Kling Cc: Rafael J. Wysocki, Thierry Reding, Jonathan Hunter, Aaron Kling, linux-pm, linux-tegra, linux-kernel 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@gmail.com> > --- > 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++) { > + if (data->cpus[cpu].bpmp_cluster_id == cluster) > + cpumask_set_cpu(cpu, policy->cpus); > + } > + > return 0; > } Thierry / Jonathan, Any inputs on this ? -- viresh ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-03-03 10:03 ` Viresh Kumar @ 2025-03-03 15:48 ` Thierry Reding 2025-03-07 15:15 ` Sumit Gupta 0 siblings, 1 reply; 8+ messages in thread From: Thierry Reding @ 2025-03-03 15:48 UTC (permalink / raw) To: Viresh Kumar, Sumit Gupta Cc: Aaron Kling, Rafael J. Wysocki, Jonathan Hunter, Aaron Kling, linux-pm, linux-tegra, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1467 bytes --] On Mon, Mar 03, 2025 at 03:33:06PM +0530, Viresh Kumar 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@gmail.com> > > --- > > 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++) { > > + if (data->cpus[cpu].bpmp_cluster_id == cluster) > > + cpumask_set_cpu(cpu, policy->cpus); > > + } > > + > > return 0; > > } > > Thierry / Jonathan, > > Any inputs on this ? Sumit, does this look reasonable? Thanks, Thierry [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-03-03 15:48 ` Thierry Reding @ 2025-03-07 15:15 ` Sumit Gupta 2025-03-07 16:04 ` Thierry Reding 0 siblings, 1 reply; 8+ messages in thread From: Sumit Gupta @ 2025-03-07 15:15 UTC (permalink / raw) To: Thierry Reding, Viresh Kumar Cc: Aaron Kling, Rafael J. Wysocki, Jon Hunter, Aaron Kling, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org On 03/03/25 21:18, Thierry Reding wrote: > On Mon, Mar 03, 2025 at 03:33:06PM +0530, Viresh Kumar 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@gmail.com> >>> --- >>> 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++) { >>> + if (data->cpus[cpu].bpmp_cluster_id == cluster) >>> + cpumask_set_cpu(cpu, policy->cpus); >>> + } >>> + >>> return 0; >>> } >> >> Thierry / Jonathan, >> >> Any inputs on this ? > > Sumit, > > does this look reasonable? > > Thanks, > Thierry Looks good to me. Reviewed-by: Sumit Gupta <sumitg@nvidia.com> Best Regards, Sumit Gupta ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-03-07 15:15 ` Sumit Gupta @ 2025-03-07 16:04 ` Thierry Reding 0 siblings, 0 replies; 8+ messages in thread From: Thierry Reding @ 2025-03-07 16:04 UTC (permalink / raw) To: Sumit Gupta Cc: Viresh Kumar, Aaron Kling, Rafael J. Wysocki, Jon Hunter, Aaron Kling, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1892 bytes --] On Fri, Mar 07, 2025 at 08:45:29PM +0530, Sumit Gupta wrote: > > > On 03/03/25 21:18, Thierry Reding wrote: > > On Mon, Mar 03, 2025 at 03:33:06PM +0530, Viresh Kumar 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@gmail.com> > > > > --- > > > > 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++) { > > > > + if (data->cpus[cpu].bpmp_cluster_id == cluster) > > > > + cpumask_set_cpu(cpu, policy->cpus); > > > > + } > > > > + > > > > return 0; > > > > } > > > > > > Thierry / Jonathan, > > > > > > Any inputs on this ? > > > > Sumit, > > > > does this look reasonable? > > > > Thanks, > > Thierry > > Looks good to me. > > Reviewed-by: Sumit Gupta <sumitg@nvidia.com> Thanks, in that case: Acked-by: Thierry Reding <treding@nvidia.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-02-16 16:08 [PATCH] cpufreq: tegra186: Share policy per cluster Aaron Kling 2025-03-03 10:03 ` Viresh Kumar @ 2025-03-10 4:45 ` Viresh Kumar 2025-03-10 5:08 ` Aaron Kling 1 sibling, 1 reply; 8+ messages in thread From: Viresh Kumar @ 2025-03-10 4:45 UTC (permalink / raw) To: Aaron Kling Cc: Rafael J. Wysocki, Thierry Reding, Jonathan Hunter, Aaron Kling, linux-pm, linux-tegra, linux-kernel 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@gmail.com> > --- > 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 ? > + if (data->cpus[cpu].bpmp_cluster_id == cluster) > + cpumask_set_cpu(cpu, policy->cpus); > + } > + > return 0; -- viresh ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-03-10 4:45 ` Viresh Kumar @ 2025-03-10 5:08 ` Aaron Kling 2025-03-10 5:11 ` Viresh Kumar 0 siblings, 1 reply; 8+ messages in thread From: Aaron Kling @ 2025-03-10 5:08 UTC (permalink / raw) To: Viresh Kumar Cc: Aaron Kling, Rafael J. Wysocki, Thierry Reding, Jonathan Hunter, linux-pm, linux-tegra, linux-kernel On Sun, Mar 9, 2025 at 11:45 PM Viresh Kumar <viresh.kumar@linaro.org> 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@gmail.com> > > --- > > 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? > > > + if (data->cpus[cpu].bpmp_cluster_id == cluster) > > + cpumask_set_cpu(cpu, policy->cpus); > > + } > > + > > return 0; > > -- > viresh Sincerely, Aaron ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cpufreq: tegra186: Share policy per cluster 2025-03-10 5:08 ` Aaron Kling @ 2025-03-10 5:11 ` Viresh Kumar 0 siblings, 0 replies; 8+ messages in thread From: Viresh Kumar @ 2025-03-10 5:11 UTC (permalink / raw) To: Aaron Kling Cc: Aaron Kling, Rafael J. Wysocki, Thierry Reding, Jonathan Hunter, linux-pm, linux-tegra, linux-kernel On 10-03-25, 00:08, Aaron Kling wrote: > On Sun, Mar 9, 2025 at 11:45 PM Viresh Kumar <viresh.kumar@linaro.org> 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@gmail.com> > > > --- > > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-03-10 5:11 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-16 16:08 [PATCH] cpufreq: tegra186: Share policy per cluster Aaron Kling 2025-03-03 10:03 ` Viresh Kumar 2025-03-03 15:48 ` Thierry Reding 2025-03-07 15:15 ` Sumit Gupta 2025-03-07 16:04 ` Thierry Reding 2025-03-10 4:45 ` Viresh Kumar 2025-03-10 5:08 ` Aaron Kling 2025-03-10 5:11 ` Viresh Kumar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox