Skip to content

Commit bf3fbdf

Browse files
digetxthierryreding
authored andcommitted
memory: tegra: Do not handle spurious interrupts
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>
1 parent 5c8d08f commit bf3fbdf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • drivers/memory/tegra

‎drivers/memory/tegra/mc.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,11 @@ static irqreturn_t tegra_mc_irq(int irq, void *data)
252252
unsigned int bit;
253253

254254
/* mask all interrupts to avoid flooding */
255-
status = mc_readl(mc, MC_INTSTATUS);
256255
mask = mc_readl(mc, MC_INTMASK);
256+
status = mc_readl(mc, MC_INTSTATUS) & mask;
257+
258+
if (!status)
259+
return IRQ_NONE;
257260

258261
for_each_set_bit(bit, &status, 32) {
259262
const char *error = status_names[bit] ?: "unknown";

0 commit comments

Comments
 (0)