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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181211134829.nct4uqvofn332yxp@queper01-lin>
Date:   Tue, 11 Dec 2018 13:48:32 +0000
From:   Quentin Perret <quentin.perret@....com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        Stephen Boyd <sboyd@...nel.org>, linux-pm@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Rafael Wysocki <rjw@...ysocki.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] OPP: Fix missing debugfs supply directory for OPPs

On Tuesday 11 Dec 2018 at 16:56:29 (+0530), Viresh Kumar wrote:
> There is one case where we may end up with no "supply" directory for the
> OPPs in debugfs. That happens when the OPP core isn't managing the
> regulators for the device and the device's OPP do have microvolt
> property. It happens because the opp_table->regulator_count remains set
> to 0 and the debugfs routines don't add any supply directory in such a
> case.
> 
> This commit fixes that by setting opp_table->regulator_count to 1 in
> that particular case. But to make everything work nicely and not break
> other parts of the core, regulator_count is defined as "int" now instead
> of "unsigned int" and it can have different special values now. It is
> set to -1 initially to mark it "uninitialized" and later only we set it
> to 0 or positive values after checking how many supplies are there.
> 
> This also helps in finding the bugs where only few of the OPPs have the
> "opp-microvolt" property set and not all.

Tested on Juno r0 and Hikey960 successfully. The 'supply' directory is
now correctly exposed.

Feel free to add Tested-by: Quentin Perret <quentin.perret@....com>

Thanks,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ