Commit c853d8b4 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Kleber Sacilotto de Souza

memory: tegra: Do not handle spurious interrupts

BugLink: https://bugs.launchpad.net/bugs/1791953

[ Upstream commit bf3fbdfb ]

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: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 3a783c80
...@@ -252,8 +252,11 @@ static irqreturn_t tegra_mc_irq(int irq, void *data) ...@@ -252,8 +252,11 @@ static irqreturn_t tegra_mc_irq(int irq, void *data)
unsigned int bit; unsigned int bit;
/* mask all interrupts to avoid flooding */ /* mask all interrupts to avoid flooding */
status = mc_readl(mc, MC_INTSTATUS);
mask = mc_readl(mc, MC_INTMASK); 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) { for_each_set_bit(bit, &status, 32) {
const char *error = status_names[bit] ?: "unknown"; const char *error = status_names[bit] ?: "unknown";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment