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]
Date:   Mon, 18 Jan 2021 21:48:41 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Peter Geis <pgwipeout@...il.com>,
        Nicolas Chauvet <kwizart@...il.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Kevin Hilman <khilman@...nel.org>,
        Peter De Schrijver <pdeschrijver@...dia.com>,
        Viresh Kumar <vireshk@...nel.org>,
        Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>,
        Yangtao Li <tiny.windzz@...il.com>,
        Matt Merhar <mattmerhar@...tonmail.com>,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v3 10/12] opp: Support set_opp() customization without
 requiring to use regulators

18.01.2021 14:44, Viresh Kumar пишет:
> On 18-01-21, 03:55, Dmitry Osipenko wrote:
>> diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
>> index eefd0b15890c..c98fd2add563 100644
>> --- a/include/linux/pm_opp.h
>> +++ b/include/linux/pm_opp.h
>> @@ -13,6 +13,7 @@
>>  
>>  #include <linux/energy_model.h>
>>  #include <linux/err.h>
>> +#include <linux/kref.h>
>>  #include <linux/notifier.h>
>>  
>>  struct clk;
>> @@ -74,6 +75,7 @@ struct dev_pm_opp_info {
>>   * @regulator_count: Number of regulators
>>   * @clk:	Pointer to clk
>>   * @dev:	Pointer to the struct device
>> + * @kref:	Reference counter
>>   *
>>   * This structure contains all information required for setting an OPP.
>>   */
>> @@ -85,6 +87,7 @@ struct dev_pm_set_opp_data {
>>  	unsigned int regulator_count;
>>  	struct clk *clk;
>>  	struct device *dev;
>> +	struct kref kref;
>>  };
> 
> Instead of kref thing, allocate the memory for supplies from
> dev_pm_opp_set_regulators() and store it in new entries in opp-table
> and for rest of the data from dev_pm_opp_register_set_opp_helper(), to
> which you can copy supplies pointers then.
> 

Could you please show a code sample?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ