mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel J Blueman <daniel@numascale-asia.com>
To: Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	H Peter Anvin <hpa@zytor.com>
Cc: Steffen Persvold <sp@numascale.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Daniel J Blueman <daniel@numascale-asia.com>
Subject: [PATCH 3/3] Add NumaChip quirk
Date: Tue, 18 Oct 2011 16:22:36 +0800	[thread overview]
Message-ID: <1318926156-25504-3-git-send-email-daniel@numascale-asia.com> (raw)
In-Reply-To: <1318926156-25504-1-git-send-email-daniel@numascale-asia.com>

Add quirk for Numascale's NumaChip to prevent resource conflicts.

v2:
 - [Daniel] rediffed and validated against 3.1-rc10

Signed-off-by: Steffen Persvold <sp@numascale.com>
Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
---
 drivers/pci/quirks.c    |   14 ++++++++++++++
 include/linux/pci_ids.h |    4 ++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1196f61..051b793 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2679,6 +2679,20 @@ static void __devinit quirk_hotplug_bridge(struct pci_dev *dev)
 
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge);
 
+/* Clear all resources on NumaChip to avoid conflicts */
+static void __devinit numachip_resource_fixup(struct pci_dev *pdev)
+{
+	int i;
+
+	for (i = PCI_STD_RESOURCES; i <= PCI_ROM_RESOURCE; i++)
+		memset(&pdev->resource[i], 0, sizeof(pdev->resource[i]));
+
+	dev_notice(&pdev->dev, "Disabled all PCI resources for NumaChip\n");
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NUMASCALE,
+	PCI_DEVICE_ID_NUMASCALE_NUMACHIP0, numachip_resource_fixup);
+
 /*
  * This is a quirk for the Ricoh MMC controller found as a part of
  * some mulifunction chips.
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ae96bbe..02e0959 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2400,6 +2400,10 @@
 
 #define PCI_VENDOR_ID_AZWAVE		0x1a3b
 
+#define PCI_VENDOR_ID_NUMASCALE		0x1b47
+#define PCI_DEVICE_ID_NUMASCALE_NUMACHIP0 0x0601
+#define PCI_DEVICE_ID_NUMASCALE_NUMACHIP1 0x0602
+
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29
 
-- 
1.7.5.4


  parent reply	other threads:[~2011-10-18  8:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18  8:22 [PATCH 1/3] Add Numachip APIC support Daniel J Blueman
2011-10-18  8:22 ` [PATCH 2/3] Add multi-node boot support Daniel J Blueman
2011-10-18  8:22 ` Daniel J Blueman [this message]
2011-10-25 13:54   ` [PATCH 3/3] Add NumaChip quirk Thomas Gleixner
2011-10-25 14:17     ` Jesse Barnes
2011-10-26  3:12     ` Daniel J Blueman
2011-10-25 14:38   ` Bjorn Helgaas
2011-10-25 15:36     ` Steffen Persvold
2011-10-25 17:15       ` Bjorn Helgaas
2011-10-25 17:33         ` Steffen Persvold
2011-10-25 18:09           ` Arne Georg Gleditsch
2011-10-25 20:03             ` Bjorn Helgaas
2011-10-25 19:57           ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2011-10-26  6:07 [PATCH 1/3] Add Numachip APIC support Daniel J Blueman
2011-10-26  6:07 ` [PATCH 3/3] Add NumaChip quirk Daniel J Blueman
2011-07-22 10:44 [PATCH 1/3] Add Numachip APIC support Daniel J Blueman
2011-07-22 10:44 ` [PATCH 3/3] Add NumaChip quirk Daniel J Blueman

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=1318926156-25504-3-git-send-email-daniel@numascale-asia.com \
    --to=daniel@numascale-asia.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sp@numascale.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®