From: Logan Gunthorpe Date: Mon, 12 Aug 2019 17:30:47 +0000 (-0600) Subject: PCI/P2PDMA: Allow IOMMU for host bridge whitelist X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5daf40b039249ef98d49610d14293dca3464b91f;p=openwrt%2Fstaging%2Fblogic.git PCI/P2PDMA: Allow IOMMU for host bridge whitelist Now that we map the requests correctly we can remove the iommu_present() restriction. Link: https://lore.kernel.org/r/20190730163545.4915-14-logang@deltatee.com Link: https://lore.kernel.org/r/20190812173048.9186-14-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig --- diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index bca1ffc7075e..d8c824097d26 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -18,7 +18,6 @@ #include #include #include -#include #include enum pci_p2pdma_map_type { @@ -328,9 +327,6 @@ static bool host_bridge_whitelist(struct pci_dev *a, struct pci_dev *b) struct pci_host_bridge *host_a = pci_find_host_bridge(a->bus); struct pci_host_bridge *host_b = pci_find_host_bridge(b->bus); - if (iommu_present(a->dev.bus) || iommu_present(b->dev.bus)) - return false; - if (host_a == host_b) return __host_bridge_whitelist(host_a, true);