From: "Steven L. Kinney" <steven.kinney@amd.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
<x86@kernel.org>, Joerg Roedel <joro@8bytes.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Andrzej Siewior <sebastian@breakpoint.cc>,
Myron Stowe <myron.stowe@redhat.com>,
Hiroshi DOYU <hdoyu@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Jiri Kosina <jkosina@suse.cz>, Kukjin Kim <kgene.kim@samsung.com>,
<linux-kernel@vger.kernel.org>,
<iommu@lists.linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Thomas Renninger <trenn@suse.de>, Andi Kleen <ak@linux.intel.com>,
Cyrill Gorcunov <gorcunov@openvz.org>,
"Steven L. Kinney" <steven.kinney@amd.com>
Subject: [PATCH 1/3] AMD x86 quirks: Quirk for enabling IOMMUv2 PC feature
Date: Mon, 21 Jan 2013 14:20:56 -0600 [thread overview]
Message-ID: <1358799658-6236-2-git-send-email-steven.kinney@amd.com> (raw)
In-Reply-To: <1358799658-6236-1-git-send-email-steven.kinney@amd.com>
From: "Steven L. Kinney" <steven.kinney@amd.com>
Original code base by Andreas Herrmann at AMD with minor changes.
Signed-off-by: Steven L. Kinney <steven.kinney@amd.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
next prev parent reply other threads:[~2013-01-21 20:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 20:20 [PATCH 0/3] AMD IOMMUv2 Performance Counter patches Steven L. Kinney
2013-01-21 20:20 ` Steven L. Kinney [this message]
2013-01-28 14:29 ` [PATCH 1/3] AMD x86 quirks: Quirk for enabling IOMMUv2 PC feature Joerg Roedel
2013-01-28 14:59 ` Kinney, Steven
2013-01-28 15:36 ` Joerg Roedel
2013-01-21 20:20 ` [PATCH 2/3] AMD IOMMUv2 PC resource management hooks Steven L. Kinney
2013-01-21 21:32 ` Cyrill Gorcunov
2013-01-21 21:47 ` Kinney, Steven
2013-01-21 21:52 ` Cyrill Gorcunov
2013-01-21 20:20 ` [PATCH 3/3] AMD IOMMUv2 PC perf PMU implementation Steven L. Kinney
2013-01-22 17:48 ` [PATCH 0/3] AMD IOMMUv2 Performance Counter patches Konrad Rzeszutek Wilk
2013-01-22 18:26 ` Kinney, Steven
2013-02-01 17:45 [PATCH 1/3] AMD x86 quirks: Quirk for enabling IOMMUv2 PC feature Kinney, Steven
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=1358799658-6236-2-git-send-email-steven.kinney@amd.com \
--to=steven.kinney@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=ak@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=gorcunov@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdoyu@nvidia.com \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jkosina@suse.cz \
--cc=joro@8bytes.org \
--cc=kgene.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=myron.stowe@redhat.com \
--cc=paulus@samba.org \
--cc=sebastian@breakpoint.cc \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.de \
--cc=trenn@suse.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
Powered by JetHome