summaryrefslogtreecommitdiff
path: root/drivers/memory/tegra
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2018-04-09 22:28:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-03 07:55:24 +0200
commit1516a6019485297c1c5b8d10a869fe6769d9227a (patch)
tree4b4eea6865341bd32f1c3d75a54c740646aee8a1 /drivers/memory/tegra
parent7d044d940faeb6a7e65a1d215415e425822f365c (diff)
memory: tegra: Do not handle spurious interrupts
[ Upstream commit bf3fbdfbec947cdd04b2f2c4bce11534c8786eee ] The ISR reads interrupts-enable mask, but doesn't utilize it. Apply the mask to the interrupt status and don't handle interrupts that MC driver haven't asked for. Kernel would disable spurious MC IRQ and report the error. This would happen only in a case of a very severe bug. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memory/tegra')
-rw-r--r--drivers/memory/tegra/mc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index a4803ac192bb..d2005b995821 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -252,8 +252,11 @@ static irqreturn_t tegra_mc_irq(int irq, void *data)
unsigned int bit;
/* mask all interrupts to avoid flooding */
- status = mc_readl(mc, MC_INTSTATUS);
mask = mc_readl(mc, MC_INTMASK);
+ status = mc_readl(mc, MC_INTSTATUS) & mask;
+
+ if (!status)
+ return IRQ_NONE;
for_each_set_bit(bit, &status, 32) {
const char *error = status_names[bit] ?: "unknown";