Skip to content

Commit 1d1e563

Browse files
chenhuacaiMarc Zyngier
authored andcommitted
irqchip/loongson-htvec: Fix initial interrupt clearing
In htvec_reset() only the first group of initial interrupts is cleared. This sometimes causes spurious interrupts, so let's clear all groups. While at it, fix the nearby comment that to match the reality of what the driver does. Fixes: 818e915 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1599819978-13999-2-git-send-email-chenhc@lemote.com
1 parent 8ddf190 commit 1d1e563

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/irqchip/irq-loongson-htvec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void htvec_reset(struct htvec *priv)
151151
/* Clear IRQ cause registers, mask all interrupts */
152152
for (idx = 0; idx < priv->num_parents; idx++) {
153153
writel_relaxed(0x0, priv->base + HTVEC_EN_OFF + 4 * idx);
154-
writel_relaxed(0xFFFFFFFF, priv->base);
154+
writel_relaxed(0xFFFFFFFF, priv->base + 4 * idx);
155155
}
156156
}
157157

@@ -172,7 +172,7 @@ static int htvec_of_init(struct device_node *node,
172172
goto free_priv;
173173
}
174174

175-
/* Interrupt may come from any of the 4 interrupt line */
175+
/* Interrupt may come from any of the 8 interrupt lines */
176176
for (i = 0; i < HTVEC_MAX_PARENT_IRQ; i++) {
177177
parent_irq[i] = irq_of_parse_and_map(node, i);
178178
if (parent_irq[i] <= 0)

0 commit comments

Comments
 (0)