Skip to content

Commit 53b76df

Browse files
jgunthorpejoergroedel
authored andcommitted
iommu/msm: Remove ops->pgsize_bitmap
This driver just uses a constant, put it in domain_alloc_paging and use the domain's value instead of ops during finalise. Signed-off-by: Jason Gunthorpe <[email protected]> Acked-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent db64591 commit 53b76df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/iommu/msm_iommu.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ static struct iommu_domain *msm_iommu_domain_alloc_paging(struct device *dev)
312312

313313
INIT_LIST_HEAD(&priv->list_attached);
314314

315+
priv->domain.pgsize_bitmap = MSM_IOMMU_PGSIZES;
316+
315317
priv->domain.geometry.aperture_start = 0;
316318
priv->domain.geometry.aperture_end = (1ULL << 32) - 1;
317319
priv->domain.geometry.force_aperture = true;
@@ -339,7 +341,7 @@ static int msm_iommu_domain_config(struct msm_priv *priv)
339341
spin_lock_init(&priv->pgtlock);
340342

341343
priv->cfg = (struct io_pgtable_cfg) {
342-
.pgsize_bitmap = msm_iommu_ops.pgsize_bitmap,
344+
.pgsize_bitmap = priv->domain.pgsize_bitmap,
343345
.ias = 32,
344346
.oas = 32,
345347
.tlb = &msm_iommu_flush_ops,
@@ -352,8 +354,6 @@ static int msm_iommu_domain_config(struct msm_priv *priv)
352354
return -EINVAL;
353355
}
354356

355-
msm_iommu_ops.pgsize_bitmap = priv->cfg.pgsize_bitmap;
356-
357357
return 0;
358358
}
359359

@@ -692,7 +692,6 @@ static struct iommu_ops msm_iommu_ops = {
692692
.domain_alloc_paging = msm_iommu_domain_alloc_paging,
693693
.probe_device = msm_iommu_probe_device,
694694
.device_group = generic_device_group,
695-
.pgsize_bitmap = MSM_IOMMU_PGSIZES,
696695
.of_xlate = qcom_iommu_of_xlate,
697696
.default_domain_ops = &(const struct iommu_domain_ops) {
698697
.attach_dev = msm_iommu_attach_dev,

0 commit comments

Comments
 (0)