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]
Message-ID: <PA4PR04MB9416FE8A48930C7F932CA09888139@PA4PR04MB9416.eurprd04.prod.outlook.com>
Date:   Fri, 18 Mar 2022 01:15:51 +0000
From:   Peng Fan <peng.fan@....com>
To:     Stephen Boyd <sboyd@...nel.org>,
        "Peng Fan (OSS)" <peng.fan@....nxp.com>,
        Abel Vesa <abel.vesa@....com>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>
CC:     "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V2 2/2] clk: imx8m: check mcore_booted before register clk

> Subject: Re: [PATCH V2 2/2] clk: imx8m: check mcore_booted before register
> clk
> 
> Quoting Peng Fan (OSS) (2022-02-28 04:41:12)
> > From: Peng Fan <peng.fan@....com>
> >
> > If mcore_booted is true, ignore the clk root gate registration and
> > this will simplify AMP clock management and avoid system hang
> > unexpectly especially Linux shutdown clk used by mcore.
> >
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >
> > V2:
> >  None
> >
> >  drivers/clk/imx/clk-composite-8m.c | 21 +++++++++++++--------
> >  1 file changed, 13 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/clk/imx/clk-composite-8m.c
> > b/drivers/clk/imx/clk-composite-8m.c
> > index 2dfd6149e528..b16c2c0ea9f6 100644
> > --- a/drivers/clk/imx/clk-composite-8m.c
> > +++ b/drivers/clk/imx/clk-composite-8m.c
> > @@ -223,14 +223,19 @@ struct clk_hw
> *__imx8m_clk_hw_composite(const char *name,
> >         div->lock = &imx_ccm_lock;
> >         div->flags = CLK_DIVIDER_ROUND_CLOSEST;
> >
> > -       gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> > -       if (!gate)
> > -               goto fail;
> > -
> > -       gate_hw = &gate->hw;
> > -       gate->reg = reg;
> > -       gate->bit_idx = PCG_CGC_SHIFT;
> > -       gate->lock = &imx_ccm_lock;
> > +       /* skip registering the gate ops if M4 is enabled */
> > +       if (mcore_booted) {
> > +               gate_hw = NULL;
> 
> It could even use the protected-clocks property and then parse it to figure out
> to not register this gate?

Because of hardware design as I replied in patch 1/2, that means we will add
hundreds of clk entry in device tree. I would not do that.

Thanks,
Peng.

> 
> > +       } else {
> > +               gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> > +               if (!gate)
> > +                       goto fail;
> > +
> > +               gate_hw = &gate->hw;
> > +               gate->reg = reg;
> > +               gate->bit_idx = PCG_CGC_SHIFT;
> > +               gate->lock = &imx_ccm_lock;
> > +       }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ