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: <CAHp75VffzWiu0T2_78=9qAFFYnkTE-8SZ144Vjd4y_SpeDmRQQ@mail.gmail.com>
Date:   Fri, 17 Feb 2017 13:40:45 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Phil Reid <preid@...ctromag.com.au>
Cc:     thloh@...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@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as
 a level_high

On Fri, Feb 17, 2017 at 1:32 PM, Phil Reid <preid@...ctromag.com.au> wrote:
> On 17/02/2017 17:23, Andy Shevchenko wrote:
>>
>> On Fri, Feb 17, 2017 at 11:12 AM, Phil Reid <preid@...ctromag.com.au>
>> wrote:
>>>
>>> When a threaded irq handler is chained attached to one of the gpio
>>> pins when configure for level irq the altera_gpio_irq_leveL_high_handler
>>> does not mask the interrupt while being handled by the chained irq.
>>> This resulting in the threaded irq not getting enough cycles to complete
>>> quickly enough before the irq was disabled as faulty.
>>> It looks like handle_level_irq should be used in this situation
>>> instead of handle_simple_irq.
>>
>>
>>> @@ -310,7 +310,8 @@ static int altera_gpio_probe(struct platform_device
>>> *pdev)
>>>         altera_gc->interrupt_trigger = reg;
>>>
>>>         ret = gpiochip_irqchip_add(&altera_gc->mmchip.gc,
>>> &altera_irq_chip, 0,
>>> -               handle_simple_irq, IRQ_TYPE_NONE);
>>> +               altera_gc->interrupt_trigger == IRQ_TYPE_LEVEL_HIGH ?
>>> +               handle_level_irq : handle_simple_irq, IRQ_TYPE_NONE);
>>
>>
>> AFAIK, handle_bad_irq() should be used here.
>>
> G'day Andy
>
> Grepping drivers/gpio find a combination of
> handle_simple_irq
> handle_level_irq
> handle_edge_irq
> handle_bad_irq
> used in gpiochip_irqchip_add

Try to add date of change and amount of use.
I bet handle_bad_irq() would be the winner.

> The ones which use handle_bad_irq call irq_set_handler_locked in their
> irq_type callback to either handle_level_irq / handle_edge_irq

Yep.

> So I think in this case it's correct. But I'm no expert.

I dunno.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ