Skip to content

Commit

Permalink
soc/fsl/qbman: Use iommu_paging_domain_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
LuBaolu authored and chleroy committed Aug 22, 2024
1 parent 47ac09b commit ff5c89e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/soc/fsl/qbman/qman_portal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff5c89e

Please sign in to comment.