memory: tegra20-mc: Fix hang in IRQ handler.
authorTuomas Tynkkynen <ttynkkynen@nvidia.com>
Tue, 11 Jun 2013 10:11:18 +0000 (13:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2013 23:46:06 +0000 (16:46 -0700)
In Tegra20 any memory controller interrupt would cause an
infinite loop in the IRQ handler.

Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memory/tegra20-mc.c

index 2ca5f2814f4a6ab317e995a6f6a3e404617350e2..0548eeacd57346e6a72cbc0708a138825729b631 100644 (file)
@@ -193,8 +193,11 @@ static irqreturn_t tegra20_mc_isr(int irq, void *data)
        mask &= stat;
        if (!mask)
                return IRQ_NONE;
-       while ((bit = ffs(mask)) != 0)
+       while ((bit = ffs(mask)) != 0) {
                tegra20_mc_decode(mc, bit - 1);
+               mask &= ~BIT(bit - 1);
+       }
+
        mc_writel(mc, stat, MC_INTSTATUS);
        return IRQ_HANDLED;
 }