Skip to content

Commit fae93d8

Browse files
LuBaolujoergroedel
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 <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Acked-by: Beleswar Padhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 69e5a17 commit fae93d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)