@@ -651,8 +651,8 @@ static int apple_dart_domain_add_streams(struct apple_dart_domain *domain,
651
651
true);
652
652
}
653
653
654
- static int apple_dart_attach_dev (struct iommu_domain * domain ,
655
- struct device * dev )
654
+ static int apple_dart_attach_dev_paging (struct iommu_domain * domain ,
655
+ struct device * dev )
656
656
{
657
657
int ret , i ;
658
658
struct apple_dart_stream_map * stream_map ;
@@ -748,13 +748,10 @@ static void apple_dart_release_device(struct device *dev)
748
748
kfree (cfg );
749
749
}
750
750
751
- static struct iommu_domain * apple_dart_domain_alloc ( unsigned int type )
751
+ static struct iommu_domain * apple_dart_domain_alloc_paging ( struct device * dev )
752
752
{
753
753
struct apple_dart_domain * dart_domain ;
754
754
755
- if (type != IOMMU_DOMAIN_DMA && type != IOMMU_DOMAIN_UNMANAGED )
756
- return NULL ;
757
-
758
755
dart_domain = kzalloc (sizeof (* dart_domain ), GFP_KERNEL );
759
756
if (!dart_domain )
760
757
return NULL ;
@@ -975,7 +972,7 @@ static void apple_dart_get_resv_regions(struct device *dev,
975
972
static const struct iommu_ops apple_dart_iommu_ops = {
976
973
.identity_domain = & apple_dart_identity_domain ,
977
974
.blocked_domain = & apple_dart_blocked_domain ,
978
- .domain_alloc = apple_dart_domain_alloc ,
975
+ .domain_alloc_paging = apple_dart_domain_alloc_paging ,
979
976
.probe_device = apple_dart_probe_device ,
980
977
.release_device = apple_dart_release_device ,
981
978
.device_group = apple_dart_device_group ,
@@ -985,7 +982,7 @@ static const struct iommu_ops apple_dart_iommu_ops = {
985
982
.pgsize_bitmap = -1UL , /* Restricted during dart probe */
986
983
.owner = THIS_MODULE ,
987
984
.default_domain_ops = & (const struct iommu_domain_ops ) {
988
- .attach_dev = apple_dart_attach_dev ,
985
+ .attach_dev = apple_dart_attach_dev_paging ,
989
986
.map_pages = apple_dart_map_pages ,
990
987
.unmap_pages = apple_dart_unmap_pages ,
991
988
.flush_iotlb_all = apple_dart_flush_iotlb_all ,
0 commit comments