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: <507EF9AB.9070603@wwwdotorg.org>
Date:	Wed, 17 Oct 2012 12:32:11 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	linux-kernel@...r.kernel.org,
	Rob Herring <rob.herring@...xeda.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH 7/7] gpio/tegra: convert to use linear irqdomain

On 10/16/2012 04:33 PM, Stephen Warren wrote:
> On 10/16/2012 01:23 PM, Linus Walleij wrote:
>> The MXS driver tries to do the work of irq_domain_add_linear()
>> by reserving a bunch of descriptors somewhere and keeping track
>> of the base offset, then calling irq_domain_add_legacy(). Let's
>> stop doing that and simply use the linear IRQ domain.
> 
> This /looks/ fine, but appears to break users of GPIOs from this module,
> and causes a backtrace when cat /sys/kernel/debug/gpio:
...

The following additional diff makes it work:

> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 0234162..c7c175a 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -460,7 +460,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
>         gpiochip_add(&tegra_gpio_chip);
>  
>         for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) {
> -               int irq = irq_find_mapping(irq_domain, gpio);
> +               int irq = irq_create_mapping(irq_domain, gpio);
>                 /* No validity check; all Tegra GPIOs are valid IRQs */
>  
>                 bank = &tegra_gpio_banks[GPIO_BANK(gpio)];

I wonder if perhaps the entirety of that loop and perhaps the one after
it should be in the IRQ domain's map op - is that how all this is
intended to work?
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ