Skip to content

Commit 8a8622b

Browse files
LuBaolumathieupoirier
authored andcommitted
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>
1 parent a36d9f9 commit 8a8622b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/remoteproc/remoteproc_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ static int rproc_enable_iommu(struct rproc *rproc)
109109
return 0;
110110
}
111111

112-
domain = iommu_domain_alloc(dev->bus);
113-
if (!domain) {
112+
domain = iommu_paging_domain_alloc(dev);
113+
if (IS_ERR(domain)) {
114114
dev_err(dev, "can't alloc iommu domain\n");
115-
return -ENOMEM;
115+
return PTR_ERR(domain);
116116
}
117117

118118
iommu_set_fault_handler(domain, rproc_iommu_fault, rproc);

0 commit comments

Comments
 (0)