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: <825f06c1-cf87-c0e3-a9fc-f4ec0edaa0f8@linaro.org>
Date:   Thu, 15 Jun 2023 09:49:59 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Stephen Boyd <sboyd@...nel.org>, Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Evan Green <evgreen@...omium.org>,
        Georgi Djakov <djakov@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        Rob Herring <robh+dt@...nel.org>
Cc:     Marijn Suijten <marijn.suijten@...ainline.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v6 18/22] clk: qcom: smd-rpm: Separate out interconnect
 bus clocks

On 15.06.2023 02:48, Stephen Boyd wrote:
> Quoting Konrad Dybcio (2023-06-14 11:04:37)
>> The interconnect bus clocks are now handled within the ICC framework.
>> They still however need to get a kickstart *before* we call
>> clk_smd_rpm_enable_scaling(), or RPM will assume that they should all
>> be running at 0 kHz and the system will inevitably die.
>>
>> Separate them out to ensure such a kickstart can still take place.
>>
>> As a happy accident, the file got smaller:
>>
>> Total: Before=41951, After=41555, chg -0.94%
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
>> ---
>>  drivers/clk/qcom/clk-smd-rpm.c | 278 +++++++++++++++++------------------------
>>  1 file changed, 115 insertions(+), 163 deletions(-)
>>
>> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
>> index 6e7f0438e8b8..0d1d97659d59 100644
>> --- a/drivers/clk/qcom/clk-smd-rpm.c
>> +++ b/drivers/clk/qcom/clk-smd-rpm.c
>> @@ -498,13 +506,69 @@ DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk1, 11, 19200000);
>>  DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk2, 12, 19200000);
>>  DEFINE_CLK_SMD_RPM_XO_BUFFER(div_clk3, 13, 19200000);
>>  
>> +static struct clk_smd_rpm *bimc_pcnoc_icc_clks[] = {
> 
> Can these be const arrays?
Sorta, look below.

> 
>> +       &clk_smd_rpm_bimc_clk,
>> +       &clk_smd_rpm_bus_0_pcnoc_clk,
>> +};
>> +
> [...]
>> @@ -1332,6 +1275,15 @@ static int rpm_smd_clk_probe(struct platform_device *pdev)
>>                         goto err;
>>         }
>>  
>> +       for (i = 0; i < desc->num_icc_clks; i++) {
>> +               if (!desc->icc_clks[i])
>> +                       continue;
>> +
>> +               ret = clk_smd_rpm_handoff(desc->icc_clks[i]);
> 
> This API can probably take a const struct clk_smd_rpm pointer as well.
It would be great, but ideally we want to set r->enabled in that func
for !bus clocks (for unused clk cleanup). I could probably introduce a
separate function for the icc clocks that takes const.

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ