lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bxec7gq3b62g5jdyxs7oo4dvq4dd5hwczdsvbimjka7u4zwye5@iubxkvn2mbre>
Date: Wed, 22 Oct 2025 11:31:59 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: webgeek1234@...il.com
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, 
	Thierry Reding <thierry.reding@...il.com>, Jonathan Hunter <jonathanh@...dia.com>, linux-pm@...r.kernel.org, 
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] cpufreq: tegra186: add OPP support and set bandwidth

On 21-10-25, 20:08, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@...il.com>
> 
> Add support to use OPP table from DT in Tegra186 cpufreq driver.
> Tegra SoC's receive the frequency lookup table (LUT) from BPMP-FW.
> Cross check the OPP's present in DT against the LUT from BPMP-FW
> and enable only those DT OPP's which are present in LUT also.
> 
> The OPP table in DT has CPU Frequency to bandwidth mapping where
> the bandwidth value is per MC channel. DRAM bandwidth depends on the
> number of MC channels which can vary as per the boot configuration.
> This per channel bandwidth from OPP table will be later converted by
> MC driver to final bandwidth value by multiplying with number of
> channels before being handled in the EMC driver.
> 
> If OPP table is not present in DT, then use the LUT from BPMP-FW
> directy as the CPU frequency table and not do the DRAM frequency

  directly

> scaling which is same as the current behavior.
> 
> Signed-off-by: Aaron Kling <webgeek1234@...il.com>

Applied with:

diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index 35f1c1371f6a..34ed943c5f34 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -127,9 +127,8 @@ static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy,
 
        /* Disable all opps and cross-validate against LUT later */
        for (rate = 0; ; rate++) {
-               struct dev_pm_opp *opp __free(put_opp);
-
-               opp = dev_pm_opp_find_freq_ceil(cpu_dev, &rate);
+               struct dev_pm_opp *opp __free(put_opp) =
+                       dev_pm_opp_find_freq_ceil(cpu_dev, &rate);
                if (IS_ERR(opp))
                        break;
 
@@ -145,9 +144,8 @@ static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy,
         * Enable only those DT OPP's which are present in LUT also.
         */
        cpufreq_for_each_valid_entry(pos, bpmp_lut) {
-               struct dev_pm_opp *opp __free(put_opp);
-
-               opp = dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * HZ_PER_KHZ, false);
+               struct dev_pm_opp *opp __free(put_opp) =
+                       dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * HZ_PER_KHZ, false);
                if (IS_ERR(opp))
                        continue;

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ