Commit 2a786b45 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds

[PATCH] genirq: Mask irqs when migrating them.

move_native_irqs tries to do the right thing when migrating irqs
by disabling them.  However disabling them is a software logical
thing, not a hardware thing.  This has always been a little flaky
and after Ingo's latest round of changes it is guaranteed to not
mask the apic.

So this patch fixes move_native_irq to directly call the mask and
unmask chip methods to guarantee that we mask the irq when we
are migrating it.  We must do this as it is required by
all code that call into the path.

Since we don't know the masked status when IRQ_DISABLED is
set so we will not be able to restore it.   The patch makes the code
just give up and trying again the next time this routing is called.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 61014292
...@@ -65,12 +65,11 @@ void move_native_irq(int irq) ...@@ -65,12 +65,11 @@ void move_native_irq(int irq)
if (likely(!(desc->status & IRQ_MOVE_PENDING))) if (likely(!(desc->status & IRQ_MOVE_PENDING)))
return; return;
if (likely(!(desc->status & IRQ_DISABLED))) if (unlikely(desc->status & IRQ_DISABLED))
desc->chip->disable(irq); return;
desc->chip->mask(irq);
move_masked_irq(irq); move_masked_irq(irq);
desc->chip->unmask(irq);
if (likely(!(desc->status & IRQ_DISABLED)))
desc->chip->enable(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