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:   Tue, 25 Jul 2023 06:57:09 +0900
From:   Chanwoo Choi <chanwoo@...nel.org>
To:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc:     vireshk@...nel.org, nm@...com, sboyd@...nel.org,
        myungjoo.ham@...sung.com, kyungmin.park@...sung.com,
        cw00.choi@...sung.com, andersson@...nel.org,
        konrad.dybcio@...aro.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        jejb@...ux.ibm.com, martin.petersen@...cle.com,
        alim.akhtar@...sung.com, avri.altman@....com, bvanassche@....org,
        linux-scsi@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        quic_asutoshd@...cinc.com, quic_cang@...cinc.com,
        quic_nitirawa@...cinc.com, quic_narepall@...cinc.com,
        quic_bhaskarv@...cinc.com, quic_richardp@...cinc.com,
        quic_nguyenb@...cinc.com, quic_ziqichen@...cinc.com,
        bmasney@...hat.com, krzysztof.kozlowski@...aro.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 09/15] PM / devfreq: Switch to
 dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs

On 23. 7. 24. 14:46, Manivannan Sadhasivam wrote:
> On Mon, Jul 24, 2023 at 05:06:04AM +0900, Chanwoo Choi wrote:
>> Hi,
>>
>> On 23. 7. 20. 14:40, Manivannan Sadhasivam wrote:
>>> Some devfreq consumers like UFS driver need to work with multiple clocks
>>> through the OPP framework. For this reason, OPP framework exposes the
>>> _indexed() APIs for finding the floor/ceil of the supplied frequency of
>>> the indexed clock. So let's use them in the devfreq driver.
>>>
>>> Currently, the clock index of 0 is used which works fine for multiple as
>>> well as single clock.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
>>> ---
>>>  drivers/devfreq/devfreq.c | 14 +++++++-------
>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>> index e36cbb920ec8..7686993d639f 100644
>>> --- a/drivers/devfreq/devfreq.c
>>> +++ b/drivers/devfreq/devfreq.c
>>> @@ -88,7 +88,7 @@ static unsigned long find_available_min_freq(struct devfreq *devfreq)
>>>  	struct dev_pm_opp *opp;
>>>  	unsigned long min_freq = 0;
>>>  
>>> -	opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq);
>>> +	opp = dev_pm_opp_find_freq_ceil_indexed(devfreq->dev.parent, &min_freq, 0);
>>
>> This patch changed the used function from dev_pm_opp_find_freq_ceil
>> to dev_pm_opp_find_freq_ceil_indexed even if there are no supporting of the multiple clocks
>> and then dev_pm_opp_find_freq_ceil is not removed from OPP.
>>
>> I think that it is better to use dev_pm_opp_find_freq_ceil_indexed
>> when need to support multiple clocks with real case.
>>
> 
> There is the user for dev_pm_opp_find_freq_ceil_indexed() which is the UFS
> driver and since UFS is using devfreq, we need this change. I've added this info
> in the commit message as well. What am I missing?


I found out the difference of them. 
- dev_pm_opp_find_freq_ceil() used the 'assert_single_clk' which check the count of clock.
                                                               

(snip)

Acked-by: Chanwoo Choi <cw00.choi@...sung.com>

-- 
Best Regards,
Samsung Electronics
Chanwoo Choi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ