summaryrefslogtreecommitdiff
path: root/drivers/bus/pci
diff options
context:
space:
mode:
authorAlejandro Lucero <alejandro.lucero@netronome.com>2018-10-05 13:45:24 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-10-28 22:06:15 +0100
commitf74d50a7dfccb928e7b4ac75af7817703be5697b (patch)
tree21b9e35a004306e48fe7d9d4976638f10e8eb61d /drivers/bus/pci
parent1df21702873dab6ed95cfc5b7828553afd39fcde (diff)
downloaddpdk-f74d50a7dfccb928e7b4ac75af7817703be5697b.zip
dpdk-f74d50a7dfccb928e7b4ac75af7817703be5697b.tar.gz
dpdk-f74d50a7dfccb928e7b4ac75af7817703be5697b.tar.xz
bus/pci: check IOMMU addressing limitation just once
Current code checks if IOMMU hardware reports enough addressing bits for using IOVA mode but it repeats the same check for any PCI device present. This is not necessary because the IOMMU hardware is the same for all of them. This patch only checks the IOMMU using first PCI device found. Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'drivers/bus/pci')
-rw-r--r--drivers/bus/pci/linux/pci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 145cb10..649ef3c 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -621,8 +621,11 @@ pci_devices_iommu_support_va(void)
FOREACH_DEVICE_ON_PCIBUS(dev) {
if (!rte_pci_match(drv, dev))
continue;
- if (!pci_one_device_iommu_support_va(dev))
- return false;
+ /*
+ * just one PCI device needs to be checked out because
+ * the IOMMU hardware is the same for all of them.
+ */
+ return pci_one_device_iommu_support_va(dev);
}
}
return true;