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: Eric W. Biederman <[email protected]> --- kernel/irq/migration.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index 4baa3bb..77b7acc 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c @@ -65,12 +65,11 @@ void move_native_irq(int irq) if (likely(!(desc->status & IRQ_MOVE_PENDING))) return; - if (likely(!(desc->status & IRQ_DISABLED))) - desc->chip->disable(irq); + if (unlikely(desc->status & IRQ_DISABLED)) + return; + desc->chip->mask(irq); move_masked_irq(irq); - - if (likely(!(desc->status & IRQ_DISABLED))) - desc->chip->enable(irq); + desc->chip->unmask(irq); } -- 1.5.0.g53756 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 14/14] genirq: Mask irqs when migrating them.
- From: "Siddha, Suresh B" <[email protected]>
- [PATCH] x86_64 irq: Document what works and why on ioapics.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH 14/14] genirq: Mask irqs when migrating them.
- References:
- Re: What are the real ioapic rte programming constraints?
- From: Zwane Mwaikambo <[email protected]>
- Re: What are the real ioapic rte programming constraints?
- From: [email protected] (Eric W. Biederman)
- Re: What are the real ioapic rte programming constraints?
- From: Zwane Mwaikambo <[email protected]>
- Re: What are the real ioapic rte programming constraints?
- From: [email protected] (Eric W. Biederman)
- Re: What are the real ioapic rte programming constraints?
- From: Zwane Mwaikambo <[email protected]>
- Re: What are the real ioapic rte programming constraints?
- From: [email protected] (Eric W. Biederman)
- Conclusions from my investigation about ioapic programming
- From: [email protected] (Eric W. Biederman)
- [PATCH 0/14] x86_64 irq related fixes and cleanups.
- From: [email protected] (Eric W. Biederman)
- [PATCH 01/14] x86_64 irq: Simplfy __assign_irq_vector
- From: [email protected] (Eric W. Biederman)
- [PATCH 02/14] irq: Remove set_native_irq_info
- From: [email protected] (Eric W. Biederman)
- [PATCH 03/14] x86_64 irq: Kill declaration of removed array, interrupt
- From: [email protected] (Eric W. Biederman)
- [PATCH 04/14] x86_64 irq: Remove the unused vector parameter from ioapic_register_intr
- From: [email protected] (Eric W. Biederman)
- [PATCH 05/14] x86_64 irq: Refactor setup_IO_APIC_irq
- From: [email protected] (Eric W. Biederman)
- [PATCH 06/14] x86_64 irq: Simplfiy the set_affinity logic.
- From: [email protected] (Eric W. Biederman)
- [PATCH 07/14] x86_64 irq: In __DO_ACTION perform the FINAL action for every entry.
- From: [email protected] (Eric W. Biederman)
- [PATCH 08/14] x86_64 irq: Use NR_IRQS not NR_IRQ_VECTORS
- From: [email protected] (Eric W. Biederman)
- [PATCH 09/14] x86_64 irq: Begin consolidating per_irq data in structures.
- From: [email protected] (Eric W. Biederman)
- [PATCH 10/14] x86_64 irq: Simplify assign_irq_vector's arguments.
- From: [email protected] (Eric W. Biederman)
- [PATCH 11/14] x86_64 irq: Remove unnecessary irq 0 setup.
- From: [email protected] (Eric W. Biederman)
- [PATCH 12/14] x86_64 irq: Add constants for the reserved IRQ vectors.
- From: [email protected] (Eric W. Biederman)
- Re: What are the real ioapic rte programming constraints?
- Prev by Date: Re: [PATCH] ACPI driver support for pata
- Next by Date: ipv4 and ipv6 stacks for new link layers?
- Previous by thread: Re: [PATCH 13/14] x86_64 irq: Safely cleanup an irq after moving it.
- Next by thread: [PATCH] x86_64 irq: Document what works and why on ioapics.
- Index(es):