Skip to content

Commit f939ec0

Browse files
Felix Fietkaugregkh
authored andcommitted
MIPS: IRQ: Fix disable_irq on CPU IRQs
commit a3e6c1eff54878506b2dddcc202df9cc8180facb upstream. If the irq_chip does not define .irq_disable, any call to disable_irq will defer disabling the IRQ until it fires while marked as disabled. This assumes that the handler function checks for this condition, which handle_percpu_irq does not. In this case, calling disable_irq leads to an IRQ storm, if the interrupt fires while disabled. This optimization is only useful when disabling the IRQ is slow, which is not true for the MIPS CPU IRQ. Disable this optimization by implementing .irq_disable and .irq_enable Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8949/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 65456b7 commit f939ec0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/mips/kernel/irq_cpu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ static struct irq_chip mips_cpu_irq_controller = {
5656
.irq_mask_ack = mask_mips_irq,
5757
.irq_unmask = unmask_mips_irq,
5858
.irq_eoi = unmask_mips_irq,
59+
.irq_disable = mask_mips_irq,
60+
.irq_enable = unmask_mips_irq,
5961
};
6062

6163
/*
@@ -92,6 +94,8 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
9294
.irq_mask_ack = mips_mt_cpu_irq_ack,
9395
.irq_unmask = unmask_mips_irq,
9496
.irq_eoi = unmask_mips_irq,
97+
.irq_disable = mask_mips_irq,
98+
.irq_enable = unmask_mips_irq,
9599
};
96100

97101
void __init mips_cpu_irq_init(void)

0 commit comments

Comments
 (0)