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]
Date:   Sat, 16 May 2020 20:18:35 +0200
From:   Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To:     Stephen Boyd <sboyd@...nel.org>
Cc:     linux-clk@...r.kernel.org, mturquette@...libre.com,
        linux-kernel@...r.kernel.org, jbrunet@...libre.com
Subject: Re: clk_hw.init and -EPROBE_DEFER / driver re-load

Hi Stephen,

On Thu, May 14, 2020 at 10:37 PM Stephen Boyd <sboyd@...nel.org> wrote:
[...]
> Do you have some sort of array of clk_hw pointers to register? Maybe we
> could make a new clk registration structure to simplify this for users,
> but I'm not super interested in introducing yet another registration
> API! :/
>
> struct clk_hw_desc {
>         struct clk_hw *hw;
>         struct clk_init_data *init;
> };
I could make an array of clk_hw pointers but I think it will make
things more complicated then they have to be.
In another version of my MMC controller patches I had a dedicated
array of clk_init_data: [0]

compare this with the latest version (which has made it to linux-next
yesterday) where I'm initializing all clocks inside a few functions
(meson_mx_sdhc_register_clkc, rather than a static table): [1]
it's not great because it means I can't use a loop to register
everything. but it's fairly easy to read so I think it's the best I
can do for now.

With the "solution" from [1] I also don't run into the issue which I
described in my original mail because now clk_init_data only exists on
the stack.
I'm not sure if this is a recurring pattern or not, but for now I feel
like a new API is not needed.


Thank you for your time,
Martin


[0] https://patchwork.kernel.org/patch/11515631/
[1] https://patchwork.kernel.org/patch/11543939/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ