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: <20201011190329.GA119453@roeck-us.net>
Date:   Sun, 11 Oct 2020 12:03:29 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Anson Huang <Anson.Huang@....com>
Cc:     linux@...linux.org.uk, shawnguo@...nel.org, s.hauer@...gutronix.de,
        kernel@...gutronix.de, festevam@...il.com, catalin.marinas@....com,
        will@...nel.org, linus.walleij@...aro.org,
        bgolaszewski@...libre.com, oleksandr.suvorov@...adex.com,
        peng.fan@....com, andreas@...nade.info, hverkuil-cisco@...all.nl,
        olof@...om.net, krzk@...nel.org, geert+renesas@...der.be,
        prabhakar.mahadev-lad.rj@...renesas.com, aisheng.dong@....com,
        lkundrak@...sk, joel@....id.au, bjorn.andersson@...aro.org,
        leoyang.li@....com, vkoul@...nel.org, michael@...le.cc,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, Linux-imx@....com
Subject: Re: [PATCH V3 1/4] gpio: mxc: Support module build

On Thu, Sep 17, 2020 at 01:33:46PM +0800, Anson Huang wrote:
> Change config to tristate, add module device table, module author,
> description and license to support module build for i.MX GPIO driver.
> 
> As this is a SoC GPIO module, it provides common functions for most
> of the peripheral devices, such as GPIO pins control, secondary
> interrupt controller for GPIO pins IRQ etc., without GPIO driver, most
> of the peripheral devices will NOT work properly, so GPIO module is
> similar with clock, pinctrl driver that should be loaded ONCE and
> never unloaded.
> 
> Since MXC GPIO driver needs to have init function to register syscore
> ops once, here still use subsys_initcall(), NOT module_platform_driver().
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>

This patch made it into linux-next, but none of the other patches in
the series did. This results in a variety of boot failures in -next.

Not that it is my concern, but "without GPIO driver, most of the peripheral
devices will NOT work properly" makes me wonder if building this driver
as module is really expected to work anywhere.

Guenter

> ---
> no change.
> ---
>  drivers/gpio/Kconfig    | 2 +-
>  drivers/gpio/gpio-mxc.c | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 5cfdaf3..c7292a5 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -397,7 +397,7 @@ config GPIO_MVEBU
>  	select REGMAP_MMIO
>  
>  config GPIO_MXC
> -	def_bool y
> +	tristate "i.MX GPIO support"
>  	depends on ARCH_MXC || COMPILE_TEST
>  	select GPIO_GENERIC
>  	select GENERIC_IRQ_CHIP
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index 64278a4..643f4c55 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -15,6 +15,7 @@
>  #include <linux/irq.h>
>  #include <linux/irqdomain.h>
>  #include <linux/irqchip/chained_irq.h>
> +#include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/syscore_ops.h>
> @@ -158,6 +159,7 @@ static const struct of_device_id mxc_gpio_dt_ids[] = {
>  	{ .compatible = "fsl,imx7d-gpio", .data = &mxc_gpio_devtype[IMX35_GPIO], },
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, mxc_gpio_dt_ids);
>  
>  /*
>   * MX2 has one interrupt *for all* gpio ports. The list is used
> @@ -604,3 +606,7 @@ static int __init gpio_mxc_init(void)
>  	return platform_driver_register(&mxc_gpio_driver);
>  }
>  subsys_initcall(gpio_mxc_init);
> +
> +MODULE_AUTHOR("Shawn Guo <shawn.guo@...aro.org>");
> +MODULE_DESCRIPTION("i.MX GPIO Driver");
> +MODULE_LICENSE("GPL");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ