@@ -1310,7 +1310,8 @@ static u32 iotlb_init_entry(struct iotlb_entry *e, u32 da, u32 pa, int pgsz)
1310
1310
}
1311
1311
1312
1312
static int omap_iommu_map (struct iommu_domain * domain , unsigned long da ,
1313
- phys_addr_t pa , size_t bytes , int prot , gfp_t gfp )
1313
+ phys_addr_t pa , size_t bytes , size_t count ,
1314
+ int prot , gfp_t gfp , size_t * mapped )
1314
1315
{
1315
1316
struct omap_iommu_domain * omap_domain = to_omap_domain (domain );
1316
1317
struct device * dev = omap_domain -> dev ;
@@ -1348,13 +1349,15 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da,
1348
1349
oiommu = iommu -> iommu_dev ;
1349
1350
iopgtable_clear_entry (oiommu , da );
1350
1351
}
1352
+ } else {
1353
+ * mapped = bytes ;
1351
1354
}
1352
1355
1353
1356
return ret ;
1354
1357
}
1355
1358
1356
1359
static size_t omap_iommu_unmap (struct iommu_domain * domain , unsigned long da ,
1357
- size_t size , struct iommu_iotlb_gather * gather )
1360
+ size_t size , size_t count , struct iommu_iotlb_gather * gather )
1358
1361
{
1359
1362
struct omap_iommu_domain * omap_domain = to_omap_domain (domain );
1360
1363
struct device * dev = omap_domain -> dev ;
@@ -1730,8 +1733,8 @@ static const struct iommu_ops omap_iommu_ops = {
1730
1733
.pgsize_bitmap = OMAP_IOMMU_PGSIZES ,
1731
1734
.default_domain_ops = & (const struct iommu_domain_ops ) {
1732
1735
.attach_dev = omap_iommu_attach_dev ,
1733
- .map = omap_iommu_map ,
1734
- .unmap = omap_iommu_unmap ,
1736
+ .map_pages = omap_iommu_map ,
1737
+ .unmap_pages = omap_iommu_unmap ,
1735
1738
.iova_to_phys = omap_iommu_iova_to_phys ,
1736
1739
.free = omap_iommu_domain_free ,
1737
1740
}
0 commit comments