summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/usnic/usnic_uiom.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-04-05 13:19:59 +0100
committerJason Gunthorpe <jgg@nvidia.com>2022-04-08 14:12:12 -0300
commitd9539fb7c21ef5f47db0aeed0c32588479e32184 (patch)
treec418608e3e7c035c1880bb33f15ad3ff45c447ca /drivers/infiniband/hw/usnic/usnic_uiom.c
parent4302005f07d2607b1122bd2bc9226e9d1a0595ac (diff)
downloadlinux-d9539fb7c21ef5f47db0aeed0c32588479e32184.tar.gz
linux-d9539fb7c21ef5f47db0aeed0c32588479e32184.tar.bz2
linux-d9539fb7c21ef5f47db0aeed0c32588479e32184.zip
RDMA/usnic: Stop using iommu_present()
Even if an IOMMU might be present for some PCI segment in the system, that doesn't necessarily mean it provides translation for the device(s) we care about. Replace iommu_present() with a more appropriate check at probe time, and garbage-collect the resulting empty init function. Link: https://lore.kernel.org/r/f707b4248e1d33b6d2c7f1d7c94febb802cf9890.1649161199.git.robin.murphy@arm.com Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic/usnic_uiom.c')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_uiom.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c
index 760b254ba42d..8c48027614a1 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.c
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.c
@@ -556,13 +556,3 @@ void usnic_uiom_free_dev_list(struct device **devs)
{
kfree(devs);
}
-
-int usnic_uiom_init(char *drv_name)
-{
- if (!iommu_present(&pci_bus_type)) {
- usnic_err("IOMMU required but not present or enabled. USNIC QPs will not function w/o enabling IOMMU\n");
- return -EPERM;
- }
-
- return 0;
-}