pinctrl: armada-37xx: Fix spurious irq management
authorTerry Zhou <bjzhou@marvell.com>
Wed, 23 May 2018 08:44:05 +0000 (10:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:26:59 +0000 (11:26 +0200)
commit 702d1e81feae70aa16ca364b4d2d95ccad801022 upstream.

Until now, if we found spurious irq in irq_handler, we only updated the
status in register but not the status in the code. Due to this the system
will got stuck dues to the infinite loop

[gregory.clement@bootlin.com: update comment and add fix and stable tags]
Fixes: 30ac0d3b0702 ("pinctrl: armada-37xx: Add edge both type gpio irq support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Terry Zhou <bjzhou@marvell.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c

index 5b63248c82090a4fbc681bf33a43ac05f3f12b5d..7bef929bd7fe82d1fa70e79665ee5be2865fdc80 100644 (file)
@@ -679,12 +679,13 @@ static void armada_37xx_irq_handler(struct irq_desc *desc)
                                        writel(1 << hwirq,
                                               info->base +
                                               IRQ_STATUS + 4 * i);
-                                       continue;
+                                       goto update_status;
                                }
                        }
 
                        generic_handle_irq(virq);
 
+update_status:
                        /* Update status in case a new IRQ appears */
                        spin_lock_irqsave(&info->irq_lock, flags);
                        status = readl_relaxed(info->base +