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, 12 May 2023 10:04:41 +0100
From:   Cristian Marussi <cristian.marussi@....com>
To:     Oleksii Moisieiev <Oleksii_Moisieiev@...m.com>
Cc:     "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
        "sudeep.holla@....com" <sudeep.holla@....com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Peng Fan <peng.fan@....nxp.com>,
        Michal Simek <michal.simek@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: [RFC v2 2/3] pinctrl: Implementation of the generic scmi-pinctrl
 driver

On Thu, May 11, 2023 at 01:15:46PM +0000, Oleksii Moisieiev wrote:
> Hello Andy,
> 
> On 05.05.23 23:35, andy.shevchenko@...il.com wrote:
> > Wed, Apr 26, 2023 at 01:26:37PM +0000, Oleksii Moisieiev kirjoitti:
> >> scmi-pinctrl driver implements pinctrl driver interface and using
> >> SCMI protocol to redirect messages from pinctrl subsystem SDK to
> >> SCP firmware, which does the changes in HW.
> >>
> >> This setup expects SCP firmware (or similar system, such as ATF)
> >> to be installed on the platform, which implements pinctrl driver
> >> for the specific platform.
> >>
> >> SCMI-Pinctrl driver should be configured from the device-tree and uses
> >> generic device-tree mappings for the configuration.
> > 
> > ...
> > 
> >> +#include <linux/device.h>
> >> +#include <linux/err.h>
> > 
> >> +#include <linux/of.h>
> > 
> > I do not see any user of this header. Do you?
> > 
> Yes, thanks. Removing
> 
> >> +#include <linux/module.h>
> >> +#include <linux/seq_file.h>
> >> +
> >> +#include <linux/pinctrl/machine.h>
> >> +#include <linux/pinctrl/pinconf.h>
> >> +#include <linux/pinctrl/pinconf-generic.h>
> >> +#include <linux/pinctrl/pinctrl.h>
> >> +#include <linux/pinctrl/pinmux.h>
> > 
> >> +#include <linux/scmi_protocol.h>
> >> +#include <linux/slab.h>
> > 
> > Please, move these two to the upper group of the generic headers.
> > 
> Thanks, fixed.
> 
> >> +struct scmi_pinctrl_funcs {
> >> +	unsigned int num_groups;
> >> +	const char **groups;
> >> +};
> > 
> > Please, use struct pinfunction.
> >
> I can't use pincfunction here because it has the following groups 
> definition:
> const char * const *groups;
> 
> Which is meant to be constantly allocated.
> So I when I try to gather list of groups in 
> pinctrl_scmi_get_function_groups I will receive compilation error.
> 

Maybe this is a further signal that we should re-evaluate the benefits of
the lazy allocations you now perform during protocol initialization
instead of querying and allocating statically all the info structs about
existing resources.

Not saying that is necessarily bad, I understood your points about reducing
the number of SCMI queries during boot and let pinctrl subsystem trigger only
the strictly needed one, just saying maybe good to reason a bit more about this
once V3 is posted. (i.e. I could bother you more :P ..)

Thanks,
Cristian

P.S. [off-topic]: remember to use get_maintainer.pl as advised elsewhere
to include proper maintainers (and their bots)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ