[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358799658-6236-2-git-send-email-steven.kinney@amd.com>
Date: Mon, 21 Jan 2013 14:20:56 -0600
From: "Steven L. Kinney" <steven.kinney@....com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
Joerg Roedel <joro@...tes.org>
CC: Bjorn Helgaas <bhelgaas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sebastian Andrzej Siewior <sebastian@...akpoint.cc>,
Myron Stowe <myron.stowe@...hat.com>,
Hiroshi DOYU <hdoyu@...dia.com>,
Stephen Warren <swarren@...dotorg.org>,
Jiri Kosina <jkosina@...e.cz>,
Kukjin Kim <kgene.kim@...sung.com>,
<linux-kernel@...r.kernel.org>, <iommu@...ts.linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Thomas Renninger <trenn@...e.de>,
Andi Kleen <ak@...ux.intel.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
"Steven L. Kinney" <steven.kinney@....com>
Subject: [PATCH 1/3] AMD x86 quirks: Quirk for enabling IOMMUv2 PC feature
From: "Steven L. Kinney" <steven.kinney@....com>
Original code base by Andreas Herrmann at AMD with minor changes.
Signed-off-by: Steven L. Kinney <steven.kinney@....com>
---
arch/x86/kernel/quirks.c | 17 +++++++++++++++++
include/linux/pci_ids.h | 2 ++
2 files changed, 19 insertions(+)
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 26ee48a..ab27b88 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -567,3 +567,20 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F5,
quirk_amd_nb_node);
#endif
+
+#if defined(CONFIG_PCI) && defined(CONFIG_AMD_IOMMU_V2_PC)
+
+static void amd_force_iommu_v2_pc(struct pci_dev *dev)
+{
+ u32 val;
+
+ pci_read_config_dword(dev, 0x70, &val);
+ val |= (1<<9);
+ pci_write_config_dword(dev, 0x70, val);
+ dev_printk(KERN_DEBUG, &dev->dev, "Enabled IOMMUv2 PC\n");
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_IOMMU,
+ amd_force_iommu_v2_pc);
+
+#endif
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0eb6579..c6ce47b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -396,6 +396,8 @@
/* AMD RD890 Chipset */
#define PCI_DEVICE_ID_RD890_IOMMU 0x5a23
+#define PCI_DEVICE_ID_AMD_15H_M10H_IOMMU 0x1419
+
#define PCI_VENDOR_ID_ADL 0x1005
#define PCI_DEVICE_ID_ADL_2301 0x2301
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists