]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: vf610: Mask all GPIO interrupts
authorAndrew Lunn <andrew@lunn.ch>
Sun, 27 Jan 2019 21:58:00 +0000 (22:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Mar 2019 21:04:04 +0000 (14:04 -0700)
commitda0c7c2b502b2734e8f32455d4a274d1eb48f63b
tree617ad8fca3531e7894d7c3b0d517974a6b4a8549
parent359bee9d8e1b28914183be69dc2372cff3c87fe9
gpio: vf610: Mask all GPIO interrupts

[ Upstream commit 7ae710f9f8b2cf95297e7bbfe1c09789a7dc43d4 ]

On SoC reset all GPIO interrupts are disable. However, if kexec is
used to boot into a new kernel, the SoC does not experience a
reset. Hence GPIO interrupts can be left enabled from the previous
kernel. It is then possible for the interrupt to fire before an
interrupt handler is registered, resulting in the kernel complaining
of an "unexpected IRQ trap", the interrupt is never cleared, and so
fires again, resulting in an interrupt storm.

Disable all GPIO interrupts before registering the GPIO IRQ chip.

Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-vf610.c