@@ -1198,8 +1198,9 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
11981198 return ret ;
11991199}
12001200
1201- static int arm_smmu_map (struct iommu_domain * domain , unsigned long iova ,
1202- phys_addr_t paddr , size_t size , int prot , gfp_t gfp )
1201+ static int arm_smmu_map_pages (struct iommu_domain * domain , unsigned long iova ,
1202+ phys_addr_t paddr , size_t pgsize , size_t pgcount ,
1203+ int prot , gfp_t gfp , size_t * mapped )
12031204{
12041205 struct io_pgtable_ops * ops = to_smmu_domain (domain )-> pgtbl_ops ;
12051206 struct arm_smmu_device * smmu = to_smmu_domain (domain )-> smmu ;
@@ -1209,14 +1210,15 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
12091210 return - ENODEV ;
12101211
12111212 arm_smmu_rpm_get (smmu );
1212- ret = ops -> map (ops , iova , paddr , size , prot , gfp );
1213+ ret = ops -> map_pages (ops , iova , paddr , pgsize , pgcount , prot , gfp , mapped );
12131214 arm_smmu_rpm_put (smmu );
12141215
12151216 return ret ;
12161217}
12171218
1218- static size_t arm_smmu_unmap (struct iommu_domain * domain , unsigned long iova ,
1219- size_t size , struct iommu_iotlb_gather * gather )
1219+ static size_t arm_smmu_unmap_pages (struct iommu_domain * domain , unsigned long iova ,
1220+ size_t pgsize , size_t pgcount ,
1221+ struct iommu_iotlb_gather * iotlb_gather )
12201222{
12211223 struct io_pgtable_ops * ops = to_smmu_domain (domain )-> pgtbl_ops ;
12221224 struct arm_smmu_device * smmu = to_smmu_domain (domain )-> smmu ;
@@ -1226,7 +1228,7 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
12261228 return 0 ;
12271229
12281230 arm_smmu_rpm_get (smmu );
1229- ret = ops -> unmap (ops , iova , size , gather );
1231+ ret = ops -> unmap_pages (ops , iova , pgsize , pgcount , iotlb_gather );
12301232 arm_smmu_rpm_put (smmu );
12311233
12321234 return ret ;
@@ -1320,9 +1322,6 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
13201322 struct arm_smmu_domain * smmu_domain = to_smmu_domain (domain );
13211323 struct io_pgtable_ops * ops = smmu_domain -> pgtbl_ops ;
13221324
1323- if (domain -> type == IOMMU_DOMAIN_IDENTITY )
1324- return iova ;
1325-
13261325 if (!ops )
13271326 return 0 ;
13281327
@@ -1582,8 +1581,8 @@ static struct iommu_ops arm_smmu_ops = {
15821581 .domain_alloc = arm_smmu_domain_alloc ,
15831582 .domain_free = arm_smmu_domain_free ,
15841583 .attach_dev = arm_smmu_attach_dev ,
1585- .map = arm_smmu_map ,
1586- .unmap = arm_smmu_unmap ,
1584+ .map_pages = arm_smmu_map_pages ,
1585+ .unmap_pages = arm_smmu_unmap_pages ,
15871586 .flush_iotlb_all = arm_smmu_flush_iotlb_all ,
15881587 .iotlb_sync = arm_smmu_iotlb_sync ,
15891588 .iova_to_phys = arm_smmu_iova_to_phys ,
0 commit comments