@@ -465,31 +465,6 @@ static void uacce_release(struct device *dev)
465
465
kfree (uacce );
466
466
}
467
467
468
- static unsigned int uacce_enable_sva (struct device * parent , unsigned int flags )
469
- {
470
- int ret ;
471
-
472
- if (!(flags & UACCE_DEV_SVA ))
473
- return flags ;
474
-
475
- flags &= ~UACCE_DEV_SVA ;
476
-
477
- ret = iommu_dev_enable_feature (parent , IOMMU_DEV_FEAT_IOPF );
478
- if (ret ) {
479
- dev_err (parent , "failed to enable IOPF feature! ret = %pe\n" , ERR_PTR (ret ));
480
- return flags ;
481
- }
482
- return flags | UACCE_DEV_SVA ;
483
- }
484
-
485
- static void uacce_disable_sva (struct uacce_device * uacce )
486
- {
487
- if (!(uacce -> flags & UACCE_DEV_SVA ))
488
- return ;
489
-
490
- iommu_dev_disable_feature (uacce -> parent , IOMMU_DEV_FEAT_IOPF );
491
- }
492
-
493
468
/**
494
469
* uacce_alloc() - alloc an accelerator
495
470
* @parent: pointer of uacce parent device
@@ -509,8 +484,6 @@ struct uacce_device *uacce_alloc(struct device *parent,
509
484
if (!uacce )
510
485
return ERR_PTR (- ENOMEM );
511
486
512
- flags = uacce_enable_sva (parent , flags );
513
-
514
487
uacce -> parent = parent ;
515
488
uacce -> flags = flags ;
516
489
uacce -> ops = interface -> ops ;
@@ -533,7 +506,6 @@ struct uacce_device *uacce_alloc(struct device *parent,
533
506
return uacce ;
534
507
535
508
err_with_uacce :
536
- uacce_disable_sva (uacce );
537
509
kfree (uacce );
538
510
return ERR_PTR (ret );
539
511
}
@@ -596,9 +568,6 @@ void uacce_remove(struct uacce_device *uacce)
596
568
unmap_mapping_range (q -> mapping , 0 , 0 , 1 );
597
569
}
598
570
599
- /* disable sva now since no opened queues */
600
- uacce_disable_sva (uacce );
601
-
602
571
if (uacce -> cdev )
603
572
cdev_device_del (uacce -> cdev , & uacce -> dev );
604
573
xa_erase (& uacce_xa , uacce -> dev_id );
0 commit comments