public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/4] x86, io-apic: move the effort of clearing remoteIRR explicitly before migrating the irq
@ 2009-12-01 23:31 Suresh Siddha
  2009-12-01 23:31 ` [patch 2/4] x86, ioapic: fix the EOI register detection mechanism Suresh Siddha
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Suresh Siddha @ 2009-12-01 23:31 UTC (permalink / raw)
  To: Maciej W. Rozycki, hpa, mingo, tglx, ebiederm, garyhade
  Cc: linux-kernel, suresh.b.siddha

[-- Attachment #1: fix_irq_migration_ioapic_level_delivered_as_edge.patch --]
[-- Type: text/plain, Size: 2145 bytes --]

From: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject:  x86, io-apic: move the effort of clearing remoteIRR explicitly before migrating the irq

When the level-triggered interrupt is seen as an edge interrupt, we try
to clear the remoteIRR explicitly (using either an io-apic eoi register
when present or through the idea of changing trigger mode of the io-apic
RTE to edge and then back to level). But this explicit try also needs to
happen before we try to migrate the irq. Otherwise irq migration attempt
will fail anyhow, as it postpones the irq migration to a later attempt
when it sees the remoteIRR in the io-apic RTE still set.

Signed-off-by: "Maciej W. Rozycki" <macro@linux-mips.org>
Reviewed-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
 arch/x86/kernel/apic/io_apic.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Index: tip-linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- tip-linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ tip-linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -2583,6 +2583,20 @@ static void ack_apic_level(unsigned int 
 	 */
 	ack_APIC_irq();
 
+	/* Tail end of version 0x11 I/O APIC bug workaround */
+	if (!(v & (1 << (i & 0x1f)))) {
+		atomic_inc(&irq_mis_count);
+
+		if (use_eoi_reg)
+			eoi_ioapic_irq(desc);
+		else {
+			spin_lock(&ioapic_lock);
+			__mask_and_edge_IO_APIC_irq(cfg);
+			__unmask_and_level_IO_APIC_irq(cfg);
+			spin_unlock(&ioapic_lock);
+		}
+	}
+
 	/* Now we can move and renable the irq */
 	if (unlikely(do_unmask_irq)) {
 		/* Only migrate the irq if the ack has been received.
@@ -2616,20 +2630,6 @@ static void ack_apic_level(unsigned int 
 			move_masked_irq(irq);
 		unmask_IO_APIC_irq_desc(desc);
 	}
-
-	/* Tail end of version 0x11 I/O APIC bug workaround */
-	if (!(v & (1 << (i & 0x1f)))) {
-		atomic_inc(&irq_mis_count);
-
-		if (use_eoi_reg)
-			eoi_ioapic_irq(desc);
-		else {
-			spin_lock(&ioapic_lock);
-			__mask_and_edge_IO_APIC_irq(cfg);
-			__unmask_and_level_IO_APIC_irq(cfg);
-			spin_unlock(&ioapic_lock);
-		}
-	}
 }
 
 #ifdef CONFIG_INTR_REMAP



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-02 10:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 23:31 [patch 1/4] x86, io-apic: move the effort of clearing remoteIRR explicitly before migrating the irq Suresh Siddha
2009-12-01 23:31 ` [patch 2/4] x86, ioapic: fix the EOI register detection mechanism Suresh Siddha
2009-12-02 10:43   ` [tip:x86/apic] x86, ioapic: Fix " tip-bot for Suresh Siddha
2009-12-01 23:31 ` [patch 3/4] x86, ioapic: document another case when level irq is seen as an edge Suresh Siddha
2009-12-02 10:43   ` [tip:x86/apic] x86, ioapic: Document " tip-bot for Suresh Siddha
2009-12-01 23:31 ` [patch 4/4] x86: remove unnecessary mdelay() from cpu_disable_common() Suresh Siddha
2009-12-02 10:44   ` [tip:x86/apic] x86: Remove " tip-bot for Suresh Siddha
2009-12-02 10:43 ` [tip:x86/apic] x86, io-apic: Move the effort of clearing remoteIRR explicitly before migrating the irq tip-bot for Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox