Skip to content

Commit ac62460

Browse files
chenhuacaiMarc Zyngier
authored andcommitted
irqchip/loongson-pch-pic: Fix the misused irq flow handler
Loongson PCH PIC is a standard level triggered PIC, and it need to clear interrupt during unmask. Fixes: ef8c01e ("irqchip: Add Loongson PCH PIC controller") Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Tested-by: Jiaxun Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c47e388 commit ac62460

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/irqchip/irq-loongson-pch-pic.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ static void pch_pic_bitclr(struct pch_pic *priv, int offset, int bit)
6464
raw_spin_unlock(&priv->pic_lock);
6565
}
6666

67-
static void pch_pic_eoi_irq(struct irq_data *d)
68-
{
69-
u32 idx = PIC_REG_IDX(d->hwirq);
70-
struct pch_pic *priv = irq_data_get_irq_chip_data(d);
71-
72-
writel(BIT(PIC_REG_BIT(d->hwirq)),
73-
priv->base + PCH_PIC_CLR + idx * 4);
74-
}
75-
7667
static void pch_pic_mask_irq(struct irq_data *d)
7768
{
7869
struct pch_pic *priv = irq_data_get_irq_chip_data(d);
@@ -85,6 +76,9 @@ static void pch_pic_unmask_irq(struct irq_data *d)
8576
{
8677
struct pch_pic *priv = irq_data_get_irq_chip_data(d);
8778

79+
writel(BIT(PIC_REG_BIT(d->hwirq)),
80+
priv->base + PCH_PIC_CLR + PIC_REG_IDX(d->hwirq) * 4);
81+
8882
irq_chip_unmask_parent(d);
8983
pch_pic_bitclr(priv, PCH_PIC_MASK, d->hwirq);
9084
}
@@ -124,7 +118,6 @@ static struct irq_chip pch_pic_irq_chip = {
124118
.irq_mask = pch_pic_mask_irq,
125119
.irq_unmask = pch_pic_unmask_irq,
126120
.irq_ack = irq_chip_ack_parent,
127-
.irq_eoi = pch_pic_eoi_irq,
128121
.irq_set_affinity = irq_chip_set_affinity_parent,
129122
.irq_set_type = pch_pic_set_type,
130123
};
@@ -153,7 +146,7 @@ static int pch_pic_alloc(struct irq_domain *domain, unsigned int virq,
153146

154147
irq_domain_set_info(domain, virq, hwirq,
155148
&pch_pic_irq_chip, priv,
156-
handle_fasteoi_ack_irq, NULL, NULL);
149+
handle_level_irq, NULL, NULL);
157150
irq_set_probe(virq);
158151

159152
return 0;

0 commit comments

Comments
 (0)