Commit b87daa28 authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

genirq: prevent interrupt storm on irq migration

Migration maks/unmaks interrupts unconditionally. With forced irq
threading thats going to result in an interrupt storm when the
threaded handler has not finished yet.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 8ce08b9d
......@@ -54,6 +54,7 @@ void move_masked_irq(int irq)
void move_native_irq(int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
int mask = 1;
if (likely(!(desc->status & IRQ_MOVE_PENDING)))
return;
......@@ -61,8 +62,17 @@ void move_native_irq(int irq)
if (unlikely(desc->status & IRQ_DISABLED))
return;
desc->chip->mask(irq);
/*
* If the irq is already in progress, it should be masked.
* If we unmask it, we might cause an interrupt storm on RT.
*/
if (unlikely(desc->status & IRQ_INPROGRESS))
mask = 0;
if (mask)
desc->chip->mask(irq);
move_masked_irq(irq);
desc->chip->unmask(irq);
if (mask)
desc->chip->unmask(irq);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment