Skip to content

Commit 9ea1a2c

Browse files
Isaac J. Manjarresjoergroedel
authored andcommitted
iommu/arm-smmu: Implement the unmap_pages() IOMMU driver callback
Implement the unmap_pages() callback for the ARM SMMU driver to allow calls from iommu_unmap to unmap multiple pages of the same size in one call. Also, remove the unmap() callback for the SMMU driver, as it will no longer be used. Signed-off-by: Isaac J. Manjarres <[email protected]> Suggested-by: Will Deacon <[email protected]> Signed-off-by: Georgi Djakov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 23c30be commit 9ea1a2c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/iommu/arm/arm-smmu/arm-smmu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,8 +1215,9 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
12151215
return ret;
12161216
}
12171217

1218-
static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
1219-
size_t size, struct iommu_iotlb_gather *gather)
1218+
static size_t arm_smmu_unmap_pages(struct iommu_domain *domain, unsigned long iova,
1219+
size_t pgsize, size_t pgcount,
1220+
struct iommu_iotlb_gather *iotlb_gather)
12201221
{
12211222
struct io_pgtable_ops *ops = to_smmu_domain(domain)->pgtbl_ops;
12221223
struct arm_smmu_device *smmu = to_smmu_domain(domain)->smmu;
@@ -1226,7 +1227,7 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
12261227
return 0;
12271228

12281229
arm_smmu_rpm_get(smmu);
1229-
ret = ops->unmap(ops, iova, size, gather);
1230+
ret = ops->unmap_pages(ops, iova, pgsize, pgcount, iotlb_gather);
12301231
arm_smmu_rpm_put(smmu);
12311232

12321233
return ret;
@@ -1583,7 +1584,7 @@ static struct iommu_ops arm_smmu_ops = {
15831584
.domain_free = arm_smmu_domain_free,
15841585
.attach_dev = arm_smmu_attach_dev,
15851586
.map = arm_smmu_map,
1586-
.unmap = arm_smmu_unmap,
1587+
.unmap_pages = arm_smmu_unmap_pages,
15871588
.flush_iotlb_all = arm_smmu_flush_iotlb_all,
15881589
.iotlb_sync = arm_smmu_iotlb_sync,
15891590
.iova_to_phys = arm_smmu_iova_to_phys,

0 commit comments

Comments
 (0)