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: <155007977634.115909.4465011219844819801@swboyd.mtv.corp.google.com>
Date:   Wed, 13 Feb 2019 09:42:56 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "festevam@...il.com" <festevam@...il.com>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "mturquette@...libre.com" <mturquette@...libre.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
        Aisheng Dong <aisheng.dong@....com>,
        Anson Huang <anson.huang@....com>,
        Daniel Baluta <daniel.baluta@....com>
Cc:     dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH V3 2/2] clk: imx: scu: add cpu frequency scaling support

Quoting Anson Huang (2019-02-13 07:59:32)
> @@ -145,6 +161,39 @@ static long clk_scu_round_rate(struct clk_hw *hw, unsigned long rate,
>         return rate;
>  }
>  
> +static bool clk_scu_atf_set_cpu_rate(struct clk_hw *hw, unsigned long rate)
> +{
> +       struct clk_scu *clk = to_clk_scu(hw);
> +       struct arm_smccc_res res;
> +       unsigned int cluster_id;
> +       int i;
> +
> +       /* CPU frequency scaling can ONLY be done by ARM-Trusted-Firmware */
> +       if (clk->clk_type == IMX_SC_PM_CLK_CPU) {
> +               for (i = 0; i < ARRAY_SIZE(imx_sc_cpufreq_data); i++) {
> +                       if (!strcmp(clk_hw_get_name(hw),
> +                               imx_sc_cpufreq_data[i].clk_name)) {
> +                               cluster_id = imx_sc_cpufreq_data[i].cluster_id;
> +                               break;
> +                       }
> +               }

Is there some reason why these clks can't be determined once at boot
time? It would be a good idea to avoid doing any sort of string
comparison here, instead just calling the right arm_smccc_smc with the
right arguments based on code that registers those types of clks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ