From: Lu Baolu Date: Wed, 9 Oct 2024 04:11:44 +0000 (+0800) Subject: remoteproc: Use iommu_paging_domain_alloc() X-Git-Tag: v6.13-rc1~105^2~1^7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fae93d8da6b94ca1a6a497e8a00ad87324188cf7;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Jason Gunthorpe Reviewed-by: Mathieu Poirier Acked-by: Beleswar Padhi Link: https://lore.kernel.org/r/20241009041147.28391-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel --- diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index f276956f2c5ce..eb66f78ec8b77 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);