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:   Wed, 09 Aug 2023 14:55:40 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Chen-Yu Tsai <wenst@...omium.org>,
        Jerome Brunet <jbrunet@...libre.com>,
        Kevin Hilman <khilman@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Neil Armstrong <neil.armstrong@...aro.org>
Cc:     linux-amlogic@...ts.infradead.org, linux-clk@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: meson: meson8b: Simplify notifier clock lookup

Quoting Jerome Brunet (2023-08-08 06:21:46)
> 
> On Mon 31 Jul 2023 at 12:27, Chen-Yu Tsai <wenst@...omium.org> wrote:
> > @@ -3847,9 +3846,7 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
> >        * tricky programming sequence will be handled by the forthcoming
> >        * coordinated clock rates mechanism once that feature is released.
> >        */
> > -     notifier_clk_name = clk_hw_get_name(&meson8b_cpu_scale_out_sel.hw);
> > -     notifier_clk = __clk_lookup(notifier_clk_name);
> > -     ret = clk_notifier_register(notifier_clk, &meson8b_cpu_nb_data.nb);
> > +     ret = clk_notifier_register(meson8b_cpu_scale_out_sel.hw.clk, &meson8b_cpu_nb_data.nb);
> 
> Hi Chen-Yu,
> 
> Your patch seems valid, as CCF stands right now.
> 
> However, I believe there is a will to drop the 'struct clk' instance that
> automatically gets created with each 'struct clk_hw'. This change would
> not help going in this direction
> 

Yes. Use clk_hw_get_clk() here, or introduce a
clk_hw_notifier_register() API that does that automatically. We will
have to put the clk on unregister path as well though, so maybe struct
clk_notifier needs to be extended to store the clk_hw pointer. The
notifier code kinda needs an overhaul to be clk_hw/clk_core aware. I
think it predates the introduction of struct clk_core? It's a bunch of
work I've been putting off.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ