From: Viresh Kumar <viresh.kumar@linaro.org>
To: Aaron Kling <luceoscutum@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Aaron Kling <webgeek1234@gmail.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: tegra186: Share policy per cluster
Date: Mon, 10 Mar 2025 10:15:53 +0530 [thread overview]
Message-ID: <20250310044553.zupmsoi4d3errjvs@vireshk-i7> (raw)
In-Reply-To: <20250216160806.391566-1-webgeek1234@gmail.com>
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
next prev parent reply other threads:[~2025-03-10 4:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-03-10 5:08 ` Aaron Kling
2025-03-10 5:11 ` Viresh Kumar
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=20250310044553.zupmsoi4d3errjvs@vireshk-i7 \
--to=viresh.kumar@linaro.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=thierry.reding@gmail.com \
--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