@@ -410,7 +410,8 @@ static void qcom_iommu_detach_dev(struct iommu_domain *domain, struct device *de
410410}
411411
412412static 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 )
414415{
415416 int ret ;
416417 unsigned long flags ;
@@ -421,13 +422,14 @@ static int qcom_iommu_map(struct iommu_domain *domain, unsigned long iova,
421422 return - ENODEV ;
422423
423424 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 );
425426 spin_unlock_irqrestore (& qcom_domain -> pgtbl_lock , flags );
426427 return ret ;
427428}
428429
429430static 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 )
431433{
432434 size_t ret ;
433435 unsigned long flags ;
@@ -444,7 +446,7 @@ static size_t qcom_iommu_unmap(struct iommu_domain *domain, unsigned long iova,
444446 */
445447 pm_runtime_get_sync (qcom_domain -> iommu -> dev );
446448 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 );
448450 spin_unlock_irqrestore (& qcom_domain -> pgtbl_lock , flags );
449451 pm_runtime_put_sync (qcom_domain -> iommu -> dev );
450452
@@ -582,8 +584,8 @@ static const struct iommu_ops qcom_iommu_ops = {
582584 .default_domain_ops = & (const struct iommu_domain_ops ) {
583585 .attach_dev = qcom_iommu_attach_dev ,
584586 .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 ,
587589 .flush_iotlb_all = qcom_iommu_flush_iotlb_all ,
588590 .iotlb_sync = qcom_iommu_iotlb_sync ,
589591 .iova_to_phys = qcom_iommu_iova_to_phys ,
0 commit comments