Skip to content

Commit 90019f8

Browse files
paulburtonMarc Zyngier
authored andcommitted
irqchip.mips-gic: Fix shared interrupt mask writes
The write_gic_smask() & write_gic_rmask() functions take a shared interrupt number as a parameter, but we're incorrectly providing them a bitmask with the shared interrupt's bit set. This effectively means that we mask or unmask the shared interrupt 1<<n rather than shared interrupt n, and as a result likely drop interrupts. Signed-off-by: Paul Burton <[email protected]> Fixes: 68898c8765f4 ("irqchip: mips-gic: Drop gic_(re)set_mask() functions") Cc: Jason Cooper <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 6c09ffd commit 90019f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/irqchip/irq-mips-gic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void gic_mask_irq(struct irq_data *d)
169169
{
170170
unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);
171171

172-
write_gic_rmask(BIT(intr));
172+
write_gic_rmask(intr);
173173
gic_clear_pcpu_masks(intr);
174174
}
175175

@@ -179,7 +179,7 @@ static void gic_unmask_irq(struct irq_data *d)
179179
unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);
180180
unsigned int cpu;
181181

182-
write_gic_smask(BIT(intr));
182+
write_gic_smask(intr);
183183

184184
gic_clear_pcpu_masks(intr);
185185
cpu = cpumask_first_and(affinity, cpu_online_mask);
@@ -767,7 +767,7 @@ static int __init gic_of_init(struct device_node *node,
767767
for (i = 0; i < gic_shared_intrs; i++) {
768768
change_gic_pol(i, GIC_POL_ACTIVE_HIGH);
769769
change_gic_trig(i, GIC_TRIG_LEVEL);
770-
write_gic_rmask(BIT(i));
770+
write_gic_rmask(i);
771771
}
772772

773773
for (i = 0; i < gic_vpes; i++) {

0 commit comments

Comments
 (0)