diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2024-08-12 15:28:11 +0800 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2024-09-30 09:59:42 -0600 |
commit | 8a8622b7c20658bf24b4d48dc53aaa893c37f482 (patch) | |
tree | 06235292dba9cf2cb1cb55d334e8ed09a75acea5 /drivers/remoteproc | |
parent | a36d9f96d1cf7c0308bf091e810bec06ce492c3d (diff) |
remoteproc: Use iommu_paging_domain_alloc()
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>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index f276956f2c5c..eb66f78ec8b7 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -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); |