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]
Date:   Fri, 18 Nov 2016 08:39:34 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Markus Mayer <markus.mayer@...adcom.com>
Cc:     Markus Mayer <code@...yer.net>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Power Management List <linux-pm@...r.kernel.org>,
        Broadcom Kernel List <bcm-kernel-feedback-list@...adcom.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: brcmstb-cpufreq: CPUfreq driver for older
 Broadcom STB SoCs

On 17-11-16, 10:38, Markus Mayer wrote:
> No, because I am trying to find the lowest frequency that doesn't
> require safe mode and it's looping through the table from highest to
> lowest. So there could still be a lower frequency after the current
> one that doesn't require safe mode.
> 
> What I can do, however, is something like this:
> 
> static ssize_t show_brcmstb_safe_freq(struct cpufreq_policy *policy, char *buf)
> {
>     struct cpufreq_frequency_table *entry;
>     unsigned int safe_freq = 0;
> 
>     cpufreq_for_each_valid_entry(entry, policy->freq_table) {
>         if (!(entry->driver_data & BRCMSTB_TBL_SAFE_MODE))
>             safe_freq = entry->frequency;
>    }
> 
>     return sprintf(buf, "%u\n", safe_freq);
> }
> 
> This is using the existing data from the frequency table rather than
> re-generating it on the fly by calling freq_requires_safe_mode().


> All my allocations are managed (i.e. using devm* functions), so
> cleanup should be automatic. Do I still need one?


> It's using for a clock node (brcm,brcmstb-cpu-clk-div) which exists
> independently of this driver.

All these seem fine to me.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ