summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2024-08-12 10:25:27 +0300
committerChristophe Leroy <christophe.leroy@csgroup.eu>2024-09-03 08:50:57 +0300
commit77a1a513083188f12361c45f08bdcfa508749b76 (patch)
tree2a2efac6d79509b9c21ae8d9ae1c28cc5f6fb3d1
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
downloadlinux-77a1a513083188f12361c45f08bdcfa508749b76.tar.xz
soc: fsl: qbman: Use iommu_paging_domain_alloc()
An iommu domain is allocated in portal_set_cpu() and is attached to pcfg->dev 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-14-baolu.lu@linux.intel.com Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-rw-r--r--drivers/soc/fsl/qbman/qman_portal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/soc/fsl/qbman/qman_portal.c b/drivers/soc/fsl/qbman/qman_portal.c
index e23b60618c1a..456ef5d5c199 100644
--- a/drivers/soc/fsl/qbman/qman_portal.c
+++ b/drivers/soc/fsl/qbman/qman_portal.c
@@ -48,9 +48,10 @@ static void portal_set_cpu(struct qm_portal_config *pcfg, int cpu)
struct device *dev = pcfg->dev;
int ret;
- pcfg->iommu_domain = iommu_domain_alloc(&platform_bus_type);
- if (!pcfg->iommu_domain) {
+ pcfg->iommu_domain = iommu_paging_domain_alloc(dev);
+ if (IS_ERR(pcfg->iommu_domain)) {
dev_err(dev, "%s(): iommu_domain_alloc() failed", __func__);
+ pcfg->iommu_domain = NULL;
goto no_iommu;
}
ret = fsl_pamu_configure_l1_stash(pcfg->iommu_domain, cpu);