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:   Thu, 23 Jul 2020 09:42:24 +0800
From:   "elaine.zhang" <zhangqing@...k-chips.com>
To:     Stephen Boyd <sboyd@...nel.org>, Heiko Stuebner <heiko@...ech.de>
Cc:     mturquette@...libre.com, linux-clk@...r.kernel.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
        xxx@...k-chips.com, xf@...k-chips.com, huangtao@...k-chips.com,
        kever.yang@...k-chips.com
Subject: Re: [PATCH v1] clk: Export __clk_lookup()


在 2020/7/23 上午8:51, Stephen Boyd 写道:
> Quoting Heiko Stuebner (2020-07-22 11:26:50)
>> Hi Elaine,
>>
>> Am Mittwoch, 22. Juli 2020, 04:32:30 CEST schrieb Elaine Zhang:
>>> Export __clk_lookup() to support user built as module.
>>>
>>> ERROR:
>>> drivers/clk/rockchip/clk.ko: In function
>>> `rockchip_clk_protect_critical':
>>> drivers/clk/rockchip/clk.c:741:
>>> undefined reference to `__clk_lookup'
>> can you elaborate a bit more on why this would be needed?
>>
>> Because right now the Rockchip clocks are of course built into
>> the main kernel image (especially due to them being needed during early
>> boot) and __clk_lookup actually is a pretty deep part of the clock-
>> framework itself, as probably also denoted by the "__" in the function
>> name.
>>
> Can you stop using __clk_lookup()? The plan is to remove it.

Rk use  __clk_lookup() as:

drivers/clk/rockchip/clk.c

void __init rockchip_clk_protect_critical(const char *const clocks[],
                                           int nclocks)
{
         int i;

         /* Protect the clocks that needs to stay on */
         for (i = 0; i < nclocks; i++) {
                 struct clk *clk = __clk_lookup(clocks[i]);

                 if (clk)
                         clk_prepare_enable(clk);
         }
}
e.g:

drivers/clk/rockchip/clk-rk3328.c

static const char *const rk3328_critical_clocks[] __initconst = {
         "aclk_bus",
         "aclk_bus_niu",
         "pclk_bus",
         "pclk_bus_niu",
         "hclk_bus",
         "hclk_bus_niu",
         "aclk_peri",
............

};

If have plan to remove the __clk_lookup, I need to replace the 
rockchip_clk_protect_critical, and use the flag CLK_IS_CRITICAL.(but use 
flag CLK_IS_CRITICAL, the enable count is always "0")

>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ