File tree Expand file tree Collapse file tree 9 files changed +17
-10
lines changed Expand file tree Collapse file tree 9 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -925,6 +925,8 @@ static struct iommu_domain *exynos_iommu_domain_alloc_paging(struct device *dev)
925
925
spin_lock_init (& domain -> pgtablelock );
926
926
INIT_LIST_HEAD (& domain -> clients );
927
927
928
+ domain -> domain .pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE ;
929
+
928
930
domain -> domain .geometry .aperture_start = 0 ;
929
931
domain -> domain .geometry .aperture_end = ~0UL ;
930
932
domain -> domain .geometry .force_aperture = true;
@@ -1477,7 +1479,6 @@ static const struct iommu_ops exynos_iommu_ops = {
1477
1479
.device_group = generic_device_group ,
1478
1480
.probe_device = exynos_iommu_probe_device ,
1479
1481
.release_device = exynos_iommu_release_device ,
1480
- .pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE ,
1481
1482
.of_xlate = exynos_iommu_of_xlate ,
1482
1483
.default_domain_ops = & (const struct iommu_domain_ops ) {
1483
1484
.attach_dev = exynos_iommu_attach_device ,
Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ static int ipmmu_domain_init_context(struct ipmmu_vmsa_domain *domain)
430
430
* non-secure mode.
431
431
*/
432
432
domain -> cfg .quirks = IO_PGTABLE_QUIRK_ARM_NS ;
433
- domain -> cfg .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K ;
433
+ domain -> cfg .pgsize_bitmap = domain -> io_domain . pgsize_bitmap ;
434
434
domain -> cfg .ias = 32 ;
435
435
domain -> cfg .oas = 40 ;
436
436
domain -> cfg .tlb = & ipmmu_flush_ops ;
@@ -571,6 +571,7 @@ static struct iommu_domain *ipmmu_domain_alloc_paging(struct device *dev)
571
571
return NULL ;
572
572
573
573
mutex_init (& domain -> mutex );
574
+ domain -> io_domain .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K ;
574
575
575
576
return & domain -> io_domain ;
576
577
}
@@ -882,7 +883,6 @@ static const struct iommu_ops ipmmu_ops = {
882
883
*/
883
884
.device_group = IS_ENABLED (CONFIG_ARM ) && !IS_ENABLED (CONFIG_IOMMU_DMA )
884
885
? generic_device_group : generic_single_device_group ,
885
- .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K ,
886
886
.of_xlate = ipmmu_of_xlate ,
887
887
.default_domain_ops = & (const struct iommu_domain_ops ) {
888
888
.attach_dev = ipmmu_attach_device ,
Original file line number Diff line number Diff line change @@ -288,6 +288,8 @@ static struct iommu_domain *mtk_iommu_v1_domain_alloc_paging(struct device *dev)
288
288
if (!dom )
289
289
return NULL ;
290
290
291
+ dom -> domain .pgsize_bitmap = MT2701_IOMMU_PAGE_SIZE ;
292
+
291
293
return & dom -> domain ;
292
294
}
293
295
@@ -582,7 +584,6 @@ static const struct iommu_ops mtk_iommu_v1_ops = {
582
584
.probe_finalize = mtk_iommu_v1_probe_finalize ,
583
585
.release_device = mtk_iommu_v1_release_device ,
584
586
.device_group = generic_device_group ,
585
- .pgsize_bitmap = MT2701_IOMMU_PAGE_SIZE ,
586
587
.owner = THIS_MODULE ,
587
588
.default_domain_ops = & (const struct iommu_domain_ops ) {
588
589
.attach_dev = mtk_iommu_v1_attach_device ,
Original file line number Diff line number Diff line change @@ -1584,6 +1584,8 @@ static struct iommu_domain *omap_iommu_domain_alloc_paging(struct device *dev)
1584
1584
1585
1585
spin_lock_init (& omap_domain -> lock );
1586
1586
1587
+ omap_domain -> domain .pgsize_bitmap = OMAP_IOMMU_PGSIZES ;
1588
+
1587
1589
omap_domain -> domain .geometry .aperture_start = 0 ;
1588
1590
omap_domain -> domain .geometry .aperture_end = (1ULL << 32 ) - 1 ;
1589
1591
omap_domain -> domain .geometry .force_aperture = true;
@@ -1735,7 +1737,6 @@ static const struct iommu_ops omap_iommu_ops = {
1735
1737
.release_device = omap_iommu_release_device ,
1736
1738
.device_group = generic_single_device_group ,
1737
1739
.of_xlate = omap_iommu_of_xlate ,
1738
- .pgsize_bitmap = OMAP_IOMMU_PGSIZES ,
1739
1740
.default_domain_ops = & (const struct iommu_domain_ops ) {
1740
1741
.attach_dev = omap_iommu_attach_dev ,
1741
1742
.map_pages = omap_iommu_map ,
Original file line number Diff line number Diff line change @@ -1081,6 +1081,8 @@ static struct iommu_domain *rk_iommu_domain_alloc_paging(struct device *dev)
1081
1081
spin_lock_init (& rk_domain -> dt_lock );
1082
1082
INIT_LIST_HEAD (& rk_domain -> iommus );
1083
1083
1084
+ rk_domain -> domain .pgsize_bitmap = RK_IOMMU_PGSIZE_BITMAP ;
1085
+
1084
1086
rk_domain -> domain .geometry .aperture_start = 0 ;
1085
1087
rk_domain -> domain .geometry .aperture_end = DMA_BIT_MASK (32 );
1086
1088
rk_domain -> domain .geometry .force_aperture = true;
@@ -1171,7 +1173,6 @@ static const struct iommu_ops rk_iommu_ops = {
1171
1173
.probe_device = rk_iommu_probe_device ,
1172
1174
.release_device = rk_iommu_release_device ,
1173
1175
.device_group = generic_single_device_group ,
1174
- .pgsize_bitmap = RK_IOMMU_PGSIZE_BITMAP ,
1175
1176
.of_xlate = rk_iommu_of_xlate ,
1176
1177
.default_domain_ops = & (const struct iommu_domain_ops ) {
1177
1178
.attach_dev = rk_iommu_attach_device ,
Original file line number Diff line number Diff line change @@ -557,6 +557,7 @@ static struct iommu_domain *s390_domain_alloc_paging(struct device *dev)
557
557
}
558
558
zdev -> end_dma = zdev -> start_dma + aperture_size - 1 ;
559
559
560
+ s390_domain -> domain .pgsize_bitmap = SZ_4K ;
560
561
s390_domain -> domain .geometry .force_aperture = true;
561
562
s390_domain -> domain .geometry .aperture_start = 0 ;
562
563
s390_domain -> domain .geometry .aperture_end = max_tbl_size (s390_domain );
@@ -1158,7 +1159,6 @@ static struct iommu_domain blocking_domain = {
1158
1159
.domain_alloc_paging = s390_domain_alloc_paging, \
1159
1160
.probe_device = s390_iommu_probe_device, \
1160
1161
.device_group = generic_device_group, \
1161
- .pgsize_bitmap = SZ_4K, \
1162
1162
.get_resv_regions = s390_iommu_get_resv_regions, \
1163
1163
.default_domain_ops = &(const struct iommu_domain_ops) { \
1164
1164
.attach_dev = s390_iommu_attach_device, \
Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ static struct iommu_domain *sprd_iommu_domain_alloc_paging(struct device *dev)
143
143
144
144
spin_lock_init (& dom -> pgtlock );
145
145
146
+ dom -> domain .pgsize_bitmap = SPRD_IOMMU_PAGE_SIZE ;
147
+
146
148
dom -> domain .geometry .aperture_start = 0 ;
147
149
dom -> domain .geometry .aperture_end = SZ_256M - 1 ;
148
150
dom -> domain .geometry .force_aperture = true;
@@ -410,7 +412,6 @@ static const struct iommu_ops sprd_iommu_ops = {
410
412
.probe_device = sprd_iommu_probe_device ,
411
413
.device_group = generic_single_device_group ,
412
414
.of_xlate = sprd_iommu_of_xlate ,
413
- .pgsize_bitmap = SPRD_IOMMU_PAGE_SIZE ,
414
415
.owner = THIS_MODULE ,
415
416
.default_domain_ops = & (const struct iommu_domain_ops ) {
416
417
.attach_dev = sprd_iommu_attach_device ,
Original file line number Diff line number Diff line change @@ -697,6 +697,8 @@ sun50i_iommu_domain_alloc_paging(struct device *dev)
697
697
698
698
refcount_set (& sun50i_domain -> refcnt , 1 );
699
699
700
+ sun50i_domain -> domain .pgsize_bitmap = SZ_4K ;
701
+
700
702
sun50i_domain -> domain .geometry .aperture_start = 0 ;
701
703
sun50i_domain -> domain .geometry .aperture_end = DMA_BIT_MASK (32 );
702
704
sun50i_domain -> domain .geometry .force_aperture = true;
@@ -842,7 +844,6 @@ static int sun50i_iommu_of_xlate(struct device *dev,
842
844
843
845
static const struct iommu_ops sun50i_iommu_ops = {
844
846
.identity_domain = & sun50i_iommu_identity_domain ,
845
- .pgsize_bitmap = SZ_4K ,
846
847
.device_group = generic_single_device_group ,
847
848
.domain_alloc_paging = sun50i_iommu_domain_alloc_paging ,
848
849
.of_xlate = sun50i_iommu_of_xlate ,
Original file line number Diff line number Diff line change @@ -318,6 +318,8 @@ static struct iommu_domain *tegra_smmu_domain_alloc_paging(struct device *dev)
318
318
319
319
spin_lock_init (& as -> lock );
320
320
321
+ as -> domain .pgsize_bitmap = SZ_4K ;
322
+
321
323
/* setup aperture */
322
324
as -> domain .geometry .aperture_start = 0 ;
323
325
as -> domain .geometry .aperture_end = 0xffffffff ;
@@ -1002,7 +1004,6 @@ static const struct iommu_ops tegra_smmu_ops = {
1002
1004
.probe_device = tegra_smmu_probe_device ,
1003
1005
.device_group = tegra_smmu_device_group ,
1004
1006
.of_xlate = tegra_smmu_of_xlate ,
1005
- .pgsize_bitmap = SZ_4K ,
1006
1007
.default_domain_ops = & (const struct iommu_domain_ops ) {
1007
1008
.attach_dev = tegra_smmu_attach_dev ,
1008
1009
.map_pages = tegra_smmu_map ,
You can’t perform that action at this time.
0 commit comments