@@ -229,7 +229,7 @@ static int qcom_iommu_init_domain(struct iommu_domain *domain,
229
229
goto out_unlock ;
230
230
231
231
pgtbl_cfg = (struct io_pgtable_cfg ) {
232
- .pgsize_bitmap = qcom_iommu_ops . pgsize_bitmap ,
232
+ .pgsize_bitmap = domain -> pgsize_bitmap ,
233
233
.ias = 32 ,
234
234
.oas = 40 ,
235
235
.tlb = & qcom_flush_ops ,
@@ -246,8 +246,6 @@ static int qcom_iommu_init_domain(struct iommu_domain *domain,
246
246
goto out_clear_iommu ;
247
247
}
248
248
249
- /* Update the domain's page sizes to reflect the page table format */
250
- domain -> pgsize_bitmap = pgtbl_cfg .pgsize_bitmap ;
251
249
domain -> geometry .aperture_end = (1ULL << pgtbl_cfg .ias ) - 1 ;
252
250
domain -> geometry .force_aperture = true;
253
251
@@ -337,6 +335,7 @@ static struct iommu_domain *qcom_iommu_domain_alloc_paging(struct device *dev)
337
335
338
336
mutex_init (& qcom_domain -> init_mutex );
339
337
spin_lock_init (& qcom_domain -> pgtbl_lock );
338
+ qcom_domain -> domain .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M ;
340
339
341
340
return & qcom_domain -> domain ;
342
341
}
@@ -598,7 +597,6 @@ static const struct iommu_ops qcom_iommu_ops = {
598
597
.probe_device = qcom_iommu_probe_device ,
599
598
.device_group = generic_device_group ,
600
599
.of_xlate = qcom_iommu_of_xlate ,
601
- .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M ,
602
600
.default_domain_ops = & (const struct iommu_domain_ops ) {
603
601
.attach_dev = qcom_iommu_attach_dev ,
604
602
.map_pages = qcom_iommu_map ,
0 commit comments