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]
Message-ID: <BYAPR02MB39410A04E3B271B90ED15771B7240@BYAPR02MB3941.namprd02.prod.outlook.com>
Date:   Fri, 11 Sep 2020 09:33:06 +0000
From:   Rajan Vaja <RAJANV@...inx.com>
To:     Michal Simek <michals@...inx.com>, Arnd Bergmann <arnd@...db.de>,
        Michal Simek <michals@...inx.com>
CC:     Amit Sunil Dhamne <amitsuni@...inx.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Ingo Molnar <mingo@...nel.org>,
        gregkh <gregkh@...uxfoundation.org>,
        Matt Fleming <matt@...eblueprint.co.uk>,
        Sudeep Holla <sudeep.holla@....com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Kees Cook <keescook@...omium.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Tejas Patel <TEJASP@...inx.com>, Jolly Shah <JOLLYS@...inx.com>
Subject: RE: [PATCH v2] drivers: soc: xilinx: Call InitFinalize from
 late_initcall_sync instead of probe

Hi Michal,

> -----Original Message-----
> From: Michal Simek <michal.simek@...inx.com>
> Sent: Friday, September 11, 2020 2:52 PM
> To: Arnd Bergmann <arnd@...db.de>; Michal Simek <michals@...inx.com>
> Cc: Amit Sunil Dhamne <amitsuni@...inx.com>; Ard Biesheuvel
> <ard.biesheuvel@...aro.org>; Ingo Molnar <mingo@...nel.org>; gregkh
> <gregkh@...uxfoundation.org>; Matt Fleming <matt@...eblueprint.co.uk>;
> Sudeep Holla <sudeep.holla@....com>; Heiner Kallweit
> <hkallweit1@...il.com>; Kees Cook <keescook@...omium.org>; Dmitry
> Torokhov <dmitry.torokhov@...il.com>; Rajan Vaja <RAJANV@...inx.com>;
> Linux ARM <linux-arm-kernel@...ts.infradead.org>; linux-
> kernel@...r.kernel.org; Tejas Patel <TEJASP@...inx.com>; Jolly Shah
> <JOLLYS@...inx.com>; Rajan Vaja <RAJANV@...inx.com>
> Subject: Re: [PATCH v2] drivers: soc: xilinx: Call InitFinalize from
> late_initcall_sync instead of probe
> 
> 
> 
> On 10. 09. 20 10:35, Arnd Bergmann wrote:
> > On Thu, Sep 10, 2020 at 8:50 AM Michal Simek <michal.simek@...inx.com>
> wrote:
> >>> @@ -246,6 +245,23 @@ static int zynqmp_pm_remove(struct
> platform_device *pdev)
> >>>       return 0;
> >>>  }
> >>>
> >>> +static int __init do_init_finalize(void) {
> >>> +     struct device_node *np;
> >>> +
> >>> +     np = of_find_compatible_node(NULL, NULL, "xlnx,zynqmp");
> >>> +     if (!np) {
> >>> +             np = of_find_compatible_node(NULL, NULL, "xlnx,versal");
> >>> +             if (!np)
> >>> +                     return 0;
> >>> +     }
> >>> +     of_node_put(np);
> >>> +
> >>> +     return zynqmp_pm_init_finalize(); }
> >>> +
> >>> +late_initcall_sync(do_init_finalize);
> >>> +
> >>>  static const struct of_device_id pm_of_match[] = {
> >>>       { .compatible = "xlnx,zynqmp-power", },
> >>>       { /* end of table */ },
> >>>
> >>
> >> Arnd: are you fine with this way how to check that it runs on zynqmp
> >> or versal?
> >
> > I might be missing something, but this sounds like the wrong way to do it.
> > There is already a platform driver probed in the presence of the
> > "xlnx,zynqmp-power" node in the same file. Wouldn't it be better to
> > either check for the same node instead of an arbitrarily different set
> > of SoC names, or to make the platform driver itself get registered
> > form the late initcall?
> 
> Rajan/Amit: On the top of my head I expect that you can't call it as late initcall
> because you need the first part earlier.
> 
> Does it make sense to check same node?
> There is and should be only one instance of this driver.
> Isn't it easier just to setup one static variable instead of calling dt functions
> which will take time and result will be the same.
[Rajan Vaja] Yes Michal, that make sense. We will make changes and will submit new version.

Thanks,
Rajan
> 
> Thanks,
> Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ