From: Suresh Siddha <suresh.b.siddha@intel.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>,
hpa@zytor.com, mingo@elte.hu, tglx@linutronix.de,
ebiederm@xmission.com, garyhade@us.ibm.com
Cc: linux-kernel@vger.kernel.org, suresh.b.siddha@intel.com
Subject: [patch 1/4] x86, io-apic: move the effort of clearing remoteIRR explicitly before migrating the irq
Date: Tue, 01 Dec 2009 15:31:15 -0800 [thread overview]
Message-ID: <20091201233334.975416130@sbs-t61.sc.intel.com> (raw)
[-- 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
next reply other threads:[~2009-12-02 0:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 23:31 Suresh Siddha [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091201233334.975416130@sbs-t61.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=ebiederm@xmission.com \
--cc=garyhade@us.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®