aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/p2pdma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 742928d0053e..84ba3058eada 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -18,6 +18,7 @@
18#include <linux/percpu-refcount.h> 18#include <linux/percpu-refcount.h>
19#include <linux/random.h> 19#include <linux/random.h>
20#include <linux/seq_buf.h> 20#include <linux/seq_buf.h>
21#include <linux/iommu.h>
21 22
22struct pci_p2pdma { 23struct pci_p2pdma {
23 struct percpu_ref devmap_ref; 24 struct percpu_ref devmap_ref;
@@ -284,6 +285,9 @@ static bool root_complex_whitelist(struct pci_dev *dev)
284 struct pci_dev *root = pci_get_slot(host->bus, PCI_DEVFN(0, 0)); 285 struct pci_dev *root = pci_get_slot(host->bus, PCI_DEVFN(0, 0));
285 unsigned short vendor, device; 286 unsigned short vendor, device;
286 287
288 if (iommu_present(dev->dev.bus))
289 return false;
290
287 if (!root) 291 if (!root)
288 return false; 292 return false;
289 293