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:   Fri, 26 Jul 2019 12:27:48 +0200
From:   Alexandre Mergnat <amergnat@...libre.com>
To:     Chen-Yu Tsai <wens@...nel.org>
Cc:     Jerome Brunet <jbrunet@...libre.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Kevin Hilman <khilman@...libre.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        baylibre-upstreaming@...ups.io,
        "open list:ARM/Amlogic Meson..." <linux-amlogic@...ts.infradead.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/8] clk: meson: gxbb: migrate to the new parent
 description method

Le jeu. 25 juil. 2019 à 19:09, Chen-Yu Tsai <wens@...nel.org> a écrit :
>
> On Thu, Jul 25, 2019 at 10:50 PM Jerome Brunet <jbrunet@...libre.com> wrote:
> >
> > On Mon 22 Jul 2019 at 11:54, Alexandre Mergnat <amergnat@...libre.com> wrote:
> >
> >
> > > @@ -1592,13 +1737,29 @@ static struct clk_regmap gxbb_vid_pll_div = {
> > >       .hw.init = &(struct clk_init_data) {
> > >               .name = "vid_pll_div",
> > >               .ops = &meson_vid_pll_div_ro_ops,
> > > -             .parent_names = (const char *[]){ "hdmi_pll" },
> > > +             .parent_data = &(const struct clk_parent_data) {
> > > +                     /*
> > > +                      * This clock is declared here for GXL and GXBB SoC, so
> > > +                      * we must use string name to set this parent to avoid
> > > +                      * pointer issue.
> > > +                      */
> >
> > I don't really get the issue with this comment.
> >
> > How about:
> >
> > /*
> >  * Note:
> >  * gxl and gxbb have different hdmi_plls (with different struct clk_hw).
> >  * We fallback to the global naming string mechanism so vid_pll_div picks
> >  * up the appropriate one.
> >  */
>
> If you're sticking to global names for now, you could just skip converting
> this clock altogether. I suspect .parent_names will be around for some time.

I prefer to perform a complete migration because it is possible that
.parent_names
becomes deprecated one day. I think it's cleaner to do it one shot and
avoid keeping
redundant structure with the new one.

>
> On the other hand, if you really want to get rid of global clock name based
> parenting, you could use clk_hw pointers, and have the probe function fix
> up this one based on the compatible string. That's what I did.

Sounds good, may I have the commit or file which is implement this please?
I wonder if it worth to add complexity in probe instead of using a dedicated
field in .parent_data for string name. I guess that depend on the complexity
done in probe.

>
> Just my two cents.
>
> ChenYu
>
> > > +                     .name = "hdmi_pll",
> > > +                     .index = -1,
> > > +             },
> > >               .num_parents = 1,
> > >               .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE,
> > >       },
> > >  };
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@...ts.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ