@@ -764,7 +764,8 @@ __tegra_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
764
764
}
765
765
766
766
static int tegra_smmu_map (struct iommu_domain * domain , unsigned long iova ,
767
- phys_addr_t paddr , size_t size , int prot , gfp_t gfp )
767
+ phys_addr_t paddr , size_t size , size_t count ,
768
+ int prot , gfp_t gfp , size_t * mapped )
768
769
{
769
770
struct tegra_smmu_as * as = to_smmu_as (domain );
770
771
unsigned long flags ;
@@ -774,11 +775,14 @@ static int tegra_smmu_map(struct iommu_domain *domain, unsigned long iova,
774
775
ret = __tegra_smmu_map (domain , iova , paddr , size , prot , gfp , & flags );
775
776
spin_unlock_irqrestore (& as -> lock , flags );
776
777
778
+ if (!ret )
779
+ * mapped = size ;
780
+
777
781
return ret ;
778
782
}
779
783
780
784
static size_t tegra_smmu_unmap (struct iommu_domain * domain , unsigned long iova ,
781
- size_t size , struct iommu_iotlb_gather * gather )
785
+ size_t size , size_t count , struct iommu_iotlb_gather * gather )
782
786
{
783
787
struct tegra_smmu_as * as = to_smmu_as (domain );
784
788
unsigned long flags ;
@@ -995,8 +999,8 @@ static const struct iommu_ops tegra_smmu_ops = {
995
999
.pgsize_bitmap = SZ_4K ,
996
1000
.default_domain_ops = & (const struct iommu_domain_ops ) {
997
1001
.attach_dev = tegra_smmu_attach_dev ,
998
- .map = tegra_smmu_map ,
999
- .unmap = tegra_smmu_unmap ,
1002
+ .map_pages = tegra_smmu_map ,
1003
+ .unmap_pages = tegra_smmu_unmap ,
1000
1004
.iova_to_phys = tegra_smmu_iova_to_phys ,
1001
1005
.free = tegra_smmu_domain_free ,
1002
1006
}
0 commit comments