All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ingo Molnar <mingo@redhat.com>, "hpa@zytor.com" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ebiederm@xmission.com" <ebiederm@xmission.com>,
	"garyhade@us.ibm.com" <garyhade@us.ibm.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Sankaran, Rajesh" <rajesh.sankaran@intel.com>
Subject: Re: [tip:x86/apic] x86: Use EOI register in io-apic on intel platforms
Date: Wed, 04 Nov 2009 15:04:35 -0800	[thread overview]
Message-ID: <1257375875.4716.24.camel@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <1257301490.2668.280.camel@sbs-t61.sc.intel.com>

On Tue, 2009-11-03 at 18:24 -0800, Suresh Siddha wrote:
> Maciej, There might be some confusion (mostly on my side). When I looked
> at ICH2 spec http://www.intel.com/assets/pdf/datasheet/290687.pdf it
> says it has an EOI register and it is version 2.

Ok, Issue is in the specs documentation. ICH2 to ICH5 seems to document
that they use version 0x2 ioapic's, while infact they use 0x20 version
and has a working EOI register. So we should use 0x20 as the version
check and not 0x2.

Maciej, can I have your ack for the appended patch?
---

From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: x86, ioapic: fix io-apic version check for the EOI reg presence

Maciej W. Rozycki reported:
> 82093AA I/O APIC has its version set to 0x11 and it 
> does not support the EOI register.  Similarly I/O APICs integrated into 
> the 82379AB south bridge and the 82374EB/SB EISA component.

IO-APIC versions below 0x20 don't support EOI register.

Some of the Intel ICH Specs (ICH2 to ICH5) documents the io-apic
version as 0x2. This is an error with documentation and these ICH chips
use io-apic's of version 0x20 and indeed has a working EOI register
for the io-apic.

Fix the ioapic_supports_eoi() to check for version 0x20 and beyond.

Reported-by: Maciej W. Rozycki <macro@linux-mips.org>
Acked-by: Rajesh Sankaran <rajesh.sankaran@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 47d95c3..68510d4 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2520,13 +2520,29 @@ static void eoi_ioapic_irq(struct irq_desc *desc)
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+/*
+ * IO-APIC versions below 0x20 don't support EOI register.
+ * For the record, here is the information about various versions:
+ * 	0Xh	82489DX
+ * 	1Xh	I/OAPIC or I/O(x)APIC which are not PCI 2.2 Compliant
+ * 	2Xh     I/O(x)APIC which is PCI 2.2 Compliant
+ *	30h-FFh Reserved
+ *
+ * Some of the Intel ICH Specs (ICH2 to ICH5) documents the io-apic
+ * version as 0x2. This is an error with documentation and these ICH chips
+ * use io-apic's of version 0x20.
+ */
 static int ioapic_supports_eoi(void)
 {
 	struct pci_dev *root;
 
 	root = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
+	/*
+ 	 * Perhaps we can do this for all vendors. But for now,
+ 	 * no one else seems to have version >= 0x20 ??
+ 	 */
 	if (root && root->vendor == PCI_VENDOR_ID_INTEL &&
-	    mp_ioapics[0].apicver >= 0x2) {
+	    mp_ioapics[0].apicver >= 0x20) {
 		use_eoi_reg = 1;
 		printk(KERN_INFO "IO-APIC supports EOI register\n");
 	} else



  reply	other threads:[~2009-11-04 23:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 22:24 [patch 0/6] x86: cleanups and fixes for irq migration code during cpu offline Suresh Siddha
2009-10-26 22:24 ` [patch 1/6] x86: unify fixup_irqs() for 32-bit and 64-bit kernels Suresh Siddha
2009-11-02 16:16   ` [tip:x86/apic] x86: Unify " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 2/6] x86, intr-remap: Avoid irq_chip mask/unmask in fixup_irqs() for intr-remapping Suresh Siddha
2009-11-02 16:16   ` [tip:x86/apic] " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 3/6] x86: remove move_cleanup_count from irq_cfg Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Remove " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [patch 4/6] x86: force irq complete move during cpu offline Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Force " tip-bot for Suresh Siddha
2009-10-26 22:24 ` [RFC patch 5/6] x86: Use EOI register in io-apic on intel platforms Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] " tip-bot for Suresh Siddha
2009-11-04  0:53     ` Maciej W. Rozycki
2009-11-04  2:24       ` Suresh Siddha
2009-11-04 23:04         ` Suresh Siddha [this message]
2009-11-05 14:46           ` Maciej W. Rozycki
2009-11-06  0:01             ` Suresh Siddha
2009-11-06  6:53               ` Maciej W. Rozycki
2009-11-07  7:27                 ` Suresh Siddha
2009-11-08 19:06                   ` Maciej W. Rozycki
2009-12-02  0:56                     ` Suresh Siddha
2009-10-26 22:24 ` [RFC patch 6/6] x86: remove local_irq_enable()/local_irq_disable() in fixup_irqs() Suresh Siddha
2009-11-02 16:17   ` [tip:x86/apic] x86: Remove " tip-bot for Suresh Siddha
2009-10-30 19:25 ` [patch 0/6] x86: cleanups and fixes for irq migration code during cpu offline Suresh Siddha
2009-11-02 14:59   ` Ingo Molnar
2009-11-02 17:35     ` Gary Hade

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=1257375875.4716.24.camel@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@redhat.com \
    --cc=rajesh.sankaran@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.