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  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:	Thu, 20 Mar 2014 15:20:41 -0500
From:	delicious quinoa <delicious.quinoa@...il.com>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	Alan Tull <atull@...era.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dinh Nguyen <dinguyen@...era.com>
Subject: Re: [PATCH 2/3] gpio: dwapb: do not create the irq mapping upfront.

On Thu, Mar 20, 2014 at 2:55 PM, Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
> After the irq chip got registered the driver creates a mapping for every
> gpio line. This mapping be useless if the gpio in question never is
> beeing used a irq line. The mapping should be created by the core on
> request.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
>  drivers/gpio/gpio-dwapb.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index 4d25a06b..0db0b94 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -211,7 +211,7 @@ static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
>         struct gpio_chip *gc = &port->bgc.gc;
>         struct device_node *node =  gc->of_node;
>         struct irq_chip_generic *irq_gc;
> -       unsigned int hwirq, ngpio = gc->ngpio;
> +       unsigned int ngpio = gc->ngpio;
>         struct irq_chip_type *ct;
>         int err, irq;
>
> @@ -263,9 +263,6 @@ static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
>         irq_set_chained_handler(irq, dwapb_irq_handler);
>         irq_set_handler_data(irq, gpio);
>
> -       for (hwirq = 0 ; hwirq < ngpio ; hwirq++)
> -               irq_create_mapping(gpio->domain, hwirq);
> -
>         port->bgc.gc.to_irq = dwapb_gpio_to_irq;
>  }


Hi Sebastian,

I think this functionality has changed at some point or maybe
everybody copied the same bad code over and over.  I see a lot of
legacy gpio drivers calling irq_create_mapping in their to_irq()
functions.  Linus Walleij asked me to create the mappings at probe
time.  Please see https://lkml.org/lkml/2014/2/10/154 and the
subsequent discussion in https://lkml.org/lkml/2014/2/24/232

Alan Tull
aka
delicious quinoa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists