]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
remoteproc: Use iommu_paging_domain_alloc()
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 12 Aug 2024 07:28:11 +0000 (15:28 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 30 Sep 2024 15:59:42 +0000 (09:59 -0600)
An iommu domain is allocated in rproc_enable_iommu() and is attached to
rproc->dev.parent in the same function.

Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240812072811.9737-1-baolu.lu@linux.intel.com
Acked-by: Beleswar Padhi <b-padhi@ti.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/remoteproc_core.c

index f276956f2c5cec3b0e0f9809d54f3b75c08a15f7..eb66f78ec8b7747f6fa9fd023259aa3566d5f098 100644 (file)
@@ -109,10 +109,10 @@ static int rproc_enable_iommu(struct rproc *rproc)
                return 0;
        }
 
-       domain = iommu_domain_alloc(dev->bus);
-       if (!domain) {
+       domain = iommu_paging_domain_alloc(dev);
+       if (IS_ERR(domain)) {
                dev_err(dev, "can't alloc iommu domain\n");
-               return -ENOMEM;
+               return PTR_ERR(domain);
        }
 
        iommu_set_fault_handler(domain, rproc_iommu_fault, rproc);