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: <20210120043211.qakitv5yyr4lun37@vireshk-i7>
Date:   Wed, 20 Jan 2021 10:02:11 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     Yangtao Li <tiny.windzz@...il.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] cpufreq: tegra20: Use resource-managed API

On 19-01-21, 18:01, Dmitry Osipenko wrote:
> The regular devm_opp_* helpers won't be usable for CPUFreq drivers because OPP is applied to the CPU device and not the device of the CPUFreq driver.

Ahh, I missed that.

> But maybe we could support such cases by the helpers?
> 
> I CC'd Yangtao Li.
> 
> For example we could do this:
> 
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index ca8c6acc29f4..e2eb0f9cf46c 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -1771,7 +1771,8 @@ static void devm_pm_opp_supported_hw_release(void *data)
>  
>  /**
>   * devm_pm_opp_set_supported_hw() - Set supported platforms
> - * @dev: Device for which supported-hw has to be set.
> + * @dev: Device which manages allocated resources.
> + * @opp_dev: Device for which supported-hw has to be set.
>   * @versions: Array of hierarchy of versions to match.
>   * @count: Number of elements in the array.
>   *
> @@ -1783,13 +1784,14 @@ static void devm_pm_opp_supported_hw_release(void *data)
>   * The opp_table structure will be freed after the device is destroyed.
>   */
>  struct opp_table *devm_pm_opp_set_supported_hw(struct device *dev,
> +					       struct device *opp_dev,
>  					       const u32 *versions,
>  					       unsigned int count)
>  {
>  	struct opp_table *opp_table;
>  	int err;
>  
> -	opp_table = dev_pm_opp_set_supported_hw(dev, versions, count);
> +	opp_table = dev_pm_opp_set_supported_hw(opp_dev, versions, count);
>  	if (IS_ERR(opp_table))
>  		return opp_table;

No please :)

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ