From: Jiang Liu <jiang.liu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>, Borislav Petkov <bp@alien8.de>,
Bjorn Helgaas <bhelgaas@google.com>,
Daniel Vetter <daniel@ffwll.ch>,
Alex Deucher <alexdeucher@gmail.com>,
Christian Knig <christian.koenig@amd.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-iommu@vger.kernel.org, linux-acpi@vger.kernel.org,
x86@kernel.org
Subject: [Bugfix v4 1/2] iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices
Date: Fri, 9 Oct 2015 22:07:31 +0800 [thread overview]
Message-ID: <1444399652-25920-2-git-send-email-jiang.liu@linux.intel.com> (raw)
In-Reply-To: <1444399652-25920-1-git-send-email-jiang.liu@linux.intel.com>
AMD IOMMU driver makes use of IOMMU PCI devices, so prevent binding other
PCI drivers to IOMMU PCI devices.
This fixes a bug reported by Boris that system suspend/resume gets broken
on AMD platforms. For more information, please refer to:
https://lkml.org/lkml/2015/9/26/89
Fixes: 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()")
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
---
drivers/iommu/amd_iommu_init.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 5ef347a13cb5..1b066e7d144d 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -1256,6 +1256,9 @@ static int iommu_init_pci(struct amd_iommu *iommu)
if (!iommu->dev)
return -ENODEV;
+ /* Prevent binding other PCI device drivers to IOMMU devices */
+ iommu->dev->match_driver = false;
+
pci_read_config_dword(iommu->dev, cap_ptr + MMIO_CAP_HDR_OFFSET,
&iommu->cap);
pci_read_config_dword(iommu->dev, cap_ptr + MMIO_RANGE_OFFSET,
--
1.7.10.4
next prev parent reply other threads:[~2015-10-09 14:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 10:23 [PATCH] x86/PCI: Don't alloc pcibios-irq when MSI is enabled Joerg Roedel
2015-10-09 10:26 ` Thomas Gleixner
2015-10-09 14:07 ` [Bugfix v4 0/2] Prevent binding PCI drivers to PCI devices used by non-pci drivers Jiang Liu
2015-10-09 14:07 ` Jiang Liu [this message]
2015-10-09 15:56 ` [Bugfix v4 1/2] iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices Joerg Roedel
2015-10-09 14:07 ` [Bugfix v4 2/2] ACPI, PCI: Prevent binding other PCI drivers to IOAPIC " Jiang Liu
2015-10-09 15:45 ` Joerg Roedel
2015-10-21 16:23 ` [PATCH] x86/PCI: Don't alloc pcibios-irq when MSI is enabled Bjorn Helgaas
2015-10-23 2:02 ` Jiang Liu
2015-10-23 8:23 ` Joerg Roedel
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=1444399652-25920-2-git-send-email-jiang.liu@linux.intel.com \
--to=jiang.liu@linux.intel.com \
--cc=alexdeucher@gmail.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=joro@8bytes.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-iommu@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--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 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.