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:   Fri, 20 May 2022 17:08:34 +0800
From:   Miles Chen <miles.chen@...iatek.com>
To:     <angelogioacchino.delregno@...labora.com>
CC:     <chun-jie.chen@...iatek.com>, <jose.exposito89@...il.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-clk@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>, <matthias.bgg@...il.com>,
        <miles.chen@...iatek.com>, <mturquette@...libre.com>,
        <p.zabel@...gutronix.de>, <rex-bc.chen@...iatek.com>,
        <sboyd@...nel.org>, <wenst@...omium.org>,
        <y.oudjana@...tonmail.com>, <yassine.oudjana@...il.com>,
        <~postmarketos/upstreaming@...ts.sr.ht>
Subject: Re: [PATCH 3/6] clk: mediatek: reset: Return reset data pointer on register

> Il 19/05/22 15:47, Yassine Oudjana ha scritto:
> > From: Yassine Oudjana <y.oudjana@...tonmail.com>
> > 
> > Return a struct mtk_clk_rst_data * when registering a reset
> > controller in preparation for adding an unregister helper
> > that will take it as an argument. Make the necessary changes
> > in drivers that do not currently discard the return value
> > of register functions.
> > 
> > Signed-off-by: Yassine Oudjana <y.oudjana@...tonmail.com>
> 
> Hello Yassine,
> 
> Thanks for your efforts on helping to make the MediaTek clocks better - I agree
> (and I'm not the only one..) that there's a lot of work to do on this side.
> 
> Though... I don't think that this is the right direction: you're right about
> properly unregistering (in patch 4/6) the reset controllers on rmmod/failure
> but I'm not sure that this kind of noise brings any benefit.
> 
> Explaining:
> You definitely saw that there's a new register _with_dev, which uses devm ops
> and that's going to automatically cleanup in case of removal/failure.
> This is what we should do.
> 
> Hence, my proposal is to drop patch 3/6, 4/6, 5/6 and (slowly, steadily) migrate
> all of the MediaTek clocks from CLK_OF_DECLARE() to platform drivers (which also
> means that we can eventually change them to tristate!), so that we slowly remove
> all users of all functions that are not "_with_dev", and that we finally remove
> all of these then-unused functions as well.
> 
> Making sure that I don't get misunderstood:
>       I'm not implying that this huge migration work is on your shoulders!
> 
> P.S.: Chen-Yu, Miles: do you also agree? :-)

Agreed. 3/6, 4/6, 5/6 introduce mtk_simple_clk_controller, but we just got
ChenYu's patch merged to clk-next to switch to clk_hw_onecell_data, and
hoplefully we can test them in v5.18 or v5.19.
So I think we should wait for ChenYu's cleanup.

-	struct clk_hw_onecell_data *clk_data;
+	struct mtk_simple_clk_controller *clk_ctrl;

thanks,
Miles

> 
> Cheers,
> Angelo
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ