Skip to content

Commit b253d5f

Browse files
committed
Merge tag 'pci-v5.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fix from Bjorn Helgaas: "If an IOMMU is present, ignore the P2PDMA whitelist we added for v5.2 because we don't yet know how to support P2PDMA in that case (Logan Gunthorpe)" * tag 'pci-v5.2-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/P2PDMA: Ignore root complex whitelist when an IOMMU is present
2 parents f410276 + 6dbbd05 commit b253d5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/pci/p2pdma.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/percpu-refcount.h>
1919
#include <linux/random.h>
2020
#include <linux/seq_buf.h>
21+
#include <linux/iommu.h>
2122

2223
struct pci_p2pdma {
2324
struct gen_pool *pool;
@@ -299,6 +300,9 @@ static bool root_complex_whitelist(struct pci_dev *dev)
299300
struct pci_dev *root = pci_get_slot(host->bus, PCI_DEVFN(0, 0));
300301
unsigned short vendor, device;
301302

303+
if (iommu_present(dev->dev.bus))
304+
return false;
305+
302306
if (!root)
303307
return false;
304308

0 commit comments

Comments
 (0)