@@ -588,7 +588,8 @@ static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain *sun50i_domain,
588
588
}
589
589
590
590
static int sun50i_iommu_map (struct iommu_domain * domain , unsigned long iova ,
591
- phys_addr_t paddr , size_t size , int prot , gfp_t gfp )
591
+ phys_addr_t paddr , size_t size , size_t count ,
592
+ int prot , gfp_t gfp , size_t * mapped )
592
593
{
593
594
struct sun50i_iommu_domain * sun50i_domain = to_sun50i_domain (domain );
594
595
struct sun50i_iommu * iommu = sun50i_domain -> iommu ;
@@ -615,13 +616,14 @@ static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova,
615
616
616
617
* pte_addr = sun50i_mk_pte (paddr , prot );
617
618
sun50i_table_flush (sun50i_domain , pte_addr , 1 );
619
+ * mapped = size ;
618
620
619
621
out :
620
622
return ret ;
621
623
}
622
624
623
625
static size_t sun50i_iommu_unmap (struct iommu_domain * domain , unsigned long iova ,
624
- size_t size , struct iommu_iotlb_gather * gather )
626
+ size_t size , size_t count , struct iommu_iotlb_gather * gather )
625
627
{
626
628
struct sun50i_iommu_domain * sun50i_domain = to_sun50i_domain (domain );
627
629
phys_addr_t pt_phys ;
@@ -838,8 +840,8 @@ static const struct iommu_ops sun50i_iommu_ops = {
838
840
.iotlb_sync_map = sun50i_iommu_iotlb_sync_map ,
839
841
.iotlb_sync = sun50i_iommu_iotlb_sync ,
840
842
.iova_to_phys = sun50i_iommu_iova_to_phys ,
841
- .map = sun50i_iommu_map ,
842
- .unmap = sun50i_iommu_unmap ,
843
+ .map_pages = sun50i_iommu_map ,
844
+ .unmap_pages = sun50i_iommu_unmap ,
843
845
.free = sun50i_iommu_domain_free ,
844
846
}
845
847
};
0 commit comments