[PATCH] fix for certain sequnce of request_irq can cause irq storm
Evgeniy Dushistov
dushistov at mail.ru
Sat Jul 26 11:48:53 PDT 2014
On Sat, Jul 26, 2014 at 07:45:06PM +0200, Andrew Lunn wrote:
>
> Did you look at the way gpio-mvebu.c handles this? It is a little bit
> different from your solution. I'm wondering if gpio-mvebu.c is just
> different, or wrong? It does seem to be using one mask_cache for both
> edge and level trigger.
>
Looks wrong to me. I don't look at irq handling, just unmask.
Consider the same scenario.
1)unmask interrupt A for "edge type" trigger
call mvebu_gpio_edge_irq_unmask and now CPU trigger interrupt A
if edge changed
2)unmask interupt B for "level type" trigger
call mvebu_gpio_level_irq_unmask,
gc->mask_cache have interrupt A,
so we unmask A and B for "level type" trigger.
So expected result:
A edge type interrupt
B level type iterrupt
Actual result:
A edge type interrupt
A and B level type interrupt.
This may cause many funny things,
for example drivers may works or not works depending
on loading order.
--
/Evgeniy
More information about the linux-arm-kernel
mailing list