public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Dabrunz <od@suse.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Jon Masters <jonathan@jonmasters.org>,
	linux-kernel@vger.kernel.org, Olaf Dabrunz <od@suse.de>,
	Stefan Assmann <sassmann@suse.de>
Subject: [PATCH 3/7] disable legacy boot interrupt generation
Date: Mon,  2 Jun 2008 14:45:03 +0200	[thread overview]
Message-ID: <12124107072533-git-send-email-od@suse.de> (raw)
In-Reply-To: <12124107071847-git-send-email-od@suse.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2595 bytes --]

From: Stefan Assmann <sassmann@suse.de>

Add a quirk to disable legacy boot interrupt generation on intel devices
that support disabling it.

This patch benefited from discussions with Alexander Graf, Torsten Duwe,
Ihno Krumreich, Daniel Gollub, Hannes Reinecke. The conclusions we drew
and the patch itself are the authors' responsibility alone.

Signed-off-by: Stefan Assmann <sassmann@suse.de>
Signed-off-by: Olaf Dabrunz <od@suse.de>
---
 drivers/pci/quirks.c    |   28 ++++++++++++++++++++++++++++
 include/linux/pci_ids.h |    1 +
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6173be5..8f09f8f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1377,6 +1377,34 @@ int nobootirqquirk_setup(char *str)
 __setup("nobootirqquirk", nobootirqquirk_setup);
 
 /*
+ * On some chipsets we can disable the generation of legacy INTx boot
+ * interrupts.
+ */
+#define PCI_IOAPIC_ALTERNATE_BASE_ADDRESS	0x40
+#define INTEL_6300_ESB_BOOT_INTERRUPT_ENABLE	(1<<14)
+static void quirk_disable_intel_boot_interrupt(struct pci_dev *dev)
+{
+	u16 cnf;
+
+	if (nobootirqquirk)
+		return;
+
+	pci_read_config_word(dev, PCI_IOAPIC_ALTERNATE_BASE_ADDRESS, &cnf);
+	/* this disables the boot interrupt even though it reads ENABLE */
+	cnf |= INTEL_6300_ESB_BOOT_INTERRUPT_ENABLE;
+	pci_write_config_word(dev, PCI_IOAPIC_ALTERNATE_BASE_ADDRESS, cnf);
+
+	printk(KERN_INFO "disabled boot interrupt on device 0x%04x:0x%04x\n",
+		dev->vendor, dev->device);
+}
+#undef PCI_IOAPIC_ALTERNATE_BASE_ADDRESS
+/*
+ * IO-APIC1 on 6300ESB generates boot interrupts, see intel order no
+ * 300641-004US, section 5.7.3.
+ */
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_ESB_10, 	quirk_disable_intel_boot_interrupt);
+
+/*
  * Boot interrupts on some chipsets cannot be turned off. For these chipsets,
  * remap the original interrupt in the linux kernel to the boot interrupt, so
  * that a PCI device's interrupt handler is installed on the boot interrupt
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index c675399..b89616d 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2309,6 +2309,7 @@
 #define PCI_DEVICE_ID_INTEL_ESB_4	0x25a4
 #define PCI_DEVICE_ID_INTEL_ESB_5	0x25a6
 #define PCI_DEVICE_ID_INTEL_ESB_9	0x25ab
+#define PCI_DEVICE_ID_INTEL_ESB_10	0x25ac
 #define PCI_DEVICE_ID_INTEL_82820_HB	0x2500
 #define PCI_DEVICE_ID_INTEL_82820_UP_HB	0x2501
 #define PCI_DEVICE_ID_INTEL_82850_HB	0x2530
-- 
1.5.2.4

-- 
Olaf Dabrunz (od/odabrunz), SUSE Linux Products GmbH, Nürnberg


  parent reply	other threads:[~2008-06-02 13:53 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 12:45 [PATCH 0/7] Boot IRQ quirks and rerouting Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 1/7] add kernel cmdline option to disable pci-irq quirks Olaf Dabrunz
2008-06-03 10:13   ` Thomas Gleixner
2008-06-03 17:00     ` Stefan Assmann
2008-06-02 12:45 ` [PATCH 2/7] reroute PCI interrupt to legacy boot interrupt equivalent Olaf Dabrunz
2008-06-03 10:37   ` Thomas Gleixner
2008-06-03 22:59     ` Randy Dunlap
2008-06-12 14:14     ` Olaf Dabrunz
2008-06-02 12:45 ` Olaf Dabrunz [this message]
2008-06-03 10:40   ` [PATCH 3/7] disable legacy boot interrupt generation Thomas Gleixner
2008-06-02 12:45 ` [PATCH 4/7] disable broadcomm " Olaf Dabrunz
2008-06-03 10:46   ` Thomas Gleixner
2008-06-03 15:46   ` Jon Masters
2008-06-03 15:59     ` Olaf Dabrunz
2008-06-03 16:05       ` Jon Masters
2008-06-03 17:27         ` Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 5/7] disable AMD/ATI " Olaf Dabrunz
2008-06-03 10:54   ` Thomas Gleixner
2008-06-12 14:14     ` Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 6/7] disable pci legacy boot irq quirks on noapic boot Olaf Dabrunz
2008-06-03 10:55   ` Thomas Gleixner
2008-06-02 12:45 ` [PATCH 7/7] bootirqquirk= parameter to enable bootirq quirks for additional chips Olaf Dabrunz
2008-06-03 10:56   ` Thomas Gleixner
2008-06-04 10:06     ` Olaf Dabrunz
2008-06-02 16:43 ` [PATCH 0/7] Boot IRQ quirks and rerouting Olaf Dabrunz
2008-06-03 10:11 ` Thomas Gleixner
2008-06-03 17:08   ` Olaf Dabrunz
2008-06-03 10:21 ` Olaf Dabrunz
2008-06-03 15:52 ` Jon Masters
2008-06-03 16:17   ` Stefan Assmann
2008-06-03 16:56   ` Olaf Dabrunz
2008-06-04  2:35 ` Eric W. Biederman
2008-06-04  9:49   ` Stefan Assmann
2008-06-04 10:45     ` Eric W. Biederman
2008-06-04 11:33       ` Stefan Assmann
2008-06-04 15:52         ` Maciej W. Rozycki
2008-06-04 16:08           ` Thomas Gleixner
2008-06-04 17:18             ` Maciej W. Rozycki
2008-06-04 17:33               ` Thomas Gleixner
2008-06-04 17:53                 ` Maciej W. Rozycki
2008-06-04 18:35                   ` Thomas Gleixner
2008-06-04 18:51                     ` Maciej W. Rozycki
2010-02-16  0:30           ` Yuhong Bao
2008-06-04 18:57         ` Jon Masters
2008-06-04 19:19           ` Maciej W. Rozycki
2008-06-04 19:59             ` Jon Masters
2008-06-04 22:07               ` Maciej W. Rozycki
2008-06-04 22:27                 ` Jon Masters
2008-06-04 23:08                   ` Maciej W. Rozycki
2008-06-04 11:37       ` Olaf Dabrunz
2008-06-04 18:44     ` Jon Masters

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=12124107072533-git-send-email-od@suse.de \
    --to=od@suse.de \
    --cc=hpa@zytor.com \
    --cc=jonathan@jonmasters.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sassmann@suse.de \
    --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