@@ -64,7 +64,6 @@ struct ipmmu_vmsa_device {
64
64
struct ipmmu_vmsa_domain * domains [IPMMU_CTX_MAX ];
65
65
s8 utlb_ctx [IPMMU_UTLB_MAX ];
66
66
67
- struct iommu_group * group ;
68
67
struct dma_iommu_mapping * mapping ;
69
68
};
70
69
@@ -872,29 +871,18 @@ static void ipmmu_release_device(struct device *dev)
872
871
arm_iommu_release_mapping (mmu -> mapping );
873
872
}
874
873
875
- static struct iommu_group * ipmmu_find_group (struct device * dev )
876
- {
877
- struct ipmmu_vmsa_device * mmu = to_ipmmu (dev );
878
- struct iommu_group * group ;
879
-
880
- if (mmu -> group )
881
- return iommu_group_ref_get (mmu -> group );
882
-
883
- group = iommu_group_alloc ();
884
- if (!IS_ERR (group ))
885
- mmu -> group = group ;
886
-
887
- return group ;
888
- }
889
-
890
874
static const struct iommu_ops ipmmu_ops = {
891
875
.identity_domain = & ipmmu_iommu_identity_domain ,
892
876
.domain_alloc_paging = ipmmu_domain_alloc_paging ,
893
877
.probe_device = ipmmu_probe_device ,
894
878
.release_device = ipmmu_release_device ,
895
879
.probe_finalize = ipmmu_probe_finalize ,
880
+ /*
881
+ * FIXME: The device grouping is a fixed property of the hardware's
882
+ * ability to isolate and control DMA, it should not depend on kconfig.
883
+ */
896
884
.device_group = IS_ENABLED (CONFIG_ARM ) && !IS_ENABLED (CONFIG_IOMMU_DMA )
897
- ? generic_device_group : ipmmu_find_group ,
885
+ ? generic_device_group : generic_single_device_group ,
898
886
.pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K ,
899
887
.of_xlate = ipmmu_of_xlate ,
900
888
.default_domain_ops = & (const struct iommu_domain_ops ) {
0 commit comments