[PATCH] pinctrl: bcm2835: Clear the event latch register when disabling interrupts
Linus Walleij
linus.walleij at linaro.org
Thu Jul 16 06:33:09 PDT 2015
On Tue, Jun 30, 2015 at 1:35 PM, Jonathan Bell <jonathan at raspberrypi.org> wrote:
> It's possible to hit a race condition if interrupts are generated on a GPIO
> pin when the IRQ line in question is being disabled.
>
> If the interrupt is freed, bcm2835_gpio_irq_disable() is called which
> disables the event generation sources (edge, level). If an event occurred
> between the last disabling of hard IRQs and the write to the event
> source registers, a bit would be set in the GPIO event detect register
> (GPEDSn) which goes unacknowledged by bcm2835_gpio_irq_handler()
> so Linux complains loudly.
>
> There is no per-GPIO mask register, so when disabling GPIO interrupts
> write 1 to the relevant bit in GPEDSn to clear out any stale events.
>
> Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
Patch applied for fixes with Stephen's ACK, I had to rebase it
because of something, maybe whitespace mangling.
Yours,
Linus Walleij
More information about the linux-rpi-kernel
mailing list