public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] remoteproc: Use iommu_paging_domain_alloc()
@ 2024-08-12  7:28 Lu Baolu
  2024-08-22 16:17 ` Mathieu Poirier
  2024-09-30 16:40 ` Mathieu Poirier
  0 siblings, 2 replies; 11+ messages in thread
From: Lu Baolu @ 2024-08-12  7:28 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Joerg Roedel, Will Deacon,
	Robin Murphy, Jason Gunthorpe, Kevin Tian
  Cc: linux-remoteproc, iommu, linux-kernel, Lu Baolu, Jason Gunthorpe

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/20240610085555.88197-13-baolu.lu@linux.intel.com
---
 drivers/remoteproc/remoteproc_core.c | 6 +++---
 1 file 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-03 13:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12  7:28 [PATCH 1/1] remoteproc: Use iommu_paging_domain_alloc() Lu Baolu
2024-08-22 16:17 ` Mathieu Poirier
2024-08-22 16:24   ` Jason Gunthorpe
2024-09-15 14:09     ` Jason Gunthorpe
2024-09-16 15:22       ` Mathieu Poirier
2024-08-29  6:17   ` Beleswar Prasad Padhi
2024-09-22 11:27     ` Beleswar Prasad Padhi
2024-09-23 18:12       ` Jason Gunthorpe
2024-09-30 16:40 ` Mathieu Poirier
2024-10-01 13:35   ` Jason Gunthorpe
2024-10-03 13:58     ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox