]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/pci/p2pdma.c
Merge tag 'pm-5.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux.git] / drivers / pci / p2pdma.c
index a98126ad9c3aa1175073d25ccd89574b9c5fa690..a4994aa3acc08e7864ae6ff649f8e6af0e2f9393 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/percpu-refcount.h>
 #include <linux/random.h>
 #include <linux/seq_buf.h>
+#include <linux/iommu.h>
 
 struct pci_p2pdma {
        struct gen_pool *pool;
@@ -299,6 +300,9 @@ static bool root_complex_whitelist(struct pci_dev *dev)
        struct pci_dev *root = pci_get_slot(host->bus, PCI_DEVFN(0, 0));
        unsigned short vendor, device;
 
+       if (iommu_present(dev->dev.bus))
+               return false;
+
        if (!root)
                return false;