@@ -410,7 +410,8 @@ static void qcom_iommu_detach_dev(struct iommu_domain *domain, struct device *de
410
410
}
411
411
412
412
static int qcom_iommu_map (struct iommu_domain * domain , unsigned long iova ,
413
- phys_addr_t paddr , size_t size , int prot , gfp_t gfp )
413
+ phys_addr_t paddr , size_t pgsize , size_t pgcount ,
414
+ int prot , gfp_t gfp , size_t * mapped )
414
415
{
415
416
int ret ;
416
417
unsigned long flags ;
@@ -421,13 +422,14 @@ static int qcom_iommu_map(struct iommu_domain *domain, unsigned long iova,
421
422
return - ENODEV ;
422
423
423
424
spin_lock_irqsave (& qcom_domain -> pgtbl_lock , flags );
424
- ret = ops -> map (ops , iova , paddr , size , prot , GFP_ATOMIC );
425
+ ret = ops -> map_pages (ops , iova , paddr , pgsize , pgcount , prot , GFP_ATOMIC , mapped );
425
426
spin_unlock_irqrestore (& qcom_domain -> pgtbl_lock , flags );
426
427
return ret ;
427
428
}
428
429
429
430
static size_t qcom_iommu_unmap (struct iommu_domain * domain , unsigned long iova ,
430
- size_t size , struct iommu_iotlb_gather * gather )
431
+ size_t pgsize , size_t pgcount ,
432
+ struct iommu_iotlb_gather * gather )
431
433
{
432
434
size_t ret ;
433
435
unsigned long flags ;
@@ -444,7 +446,7 @@ static size_t qcom_iommu_unmap(struct iommu_domain *domain, unsigned long iova,
444
446
*/
445
447
pm_runtime_get_sync (qcom_domain -> iommu -> dev );
446
448
spin_lock_irqsave (& qcom_domain -> pgtbl_lock , flags );
447
- ret = ops -> unmap (ops , iova , size , gather );
449
+ ret = ops -> unmap_pages (ops , iova , pgsize , pgcount , gather );
448
450
spin_unlock_irqrestore (& qcom_domain -> pgtbl_lock , flags );
449
451
pm_runtime_put_sync (qcom_domain -> iommu -> dev );
450
452
@@ -582,8 +584,8 @@ static const struct iommu_ops qcom_iommu_ops = {
582
584
.default_domain_ops = & (const struct iommu_domain_ops ) {
583
585
.attach_dev = qcom_iommu_attach_dev ,
584
586
.detach_dev = qcom_iommu_detach_dev ,
585
- .map = qcom_iommu_map ,
586
- .unmap = qcom_iommu_unmap ,
587
+ .map_pages = qcom_iommu_map ,
588
+ .unmap_pages = qcom_iommu_unmap ,
587
589
.flush_iotlb_all = qcom_iommu_flush_iotlb_all ,
588
590
.iotlb_sync = qcom_iommu_iotlb_sync ,
589
591
.iova_to_phys = qcom_iommu_iova_to_phys ,
0 commit comments