Skip to content

Commit 59103c7

Browse files
Xiang Chenjoergroedel
authored andcommitted
iommu/arm-smmu-v3: Implement the unmap_pages() IOMMU driver callback
Implement the unmap_pages() callback for ARM SMMUV3 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 ARM SMMUV3 driver as it will no longer be used. Signed-off-by: Xiang Chen <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 75cc101 commit 59103c7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,16 +2450,17 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
24502450
return ops->map(ops, iova, paddr, size, prot, gfp);
24512451
}
24522452

2453-
static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
2454-
size_t size, struct iommu_iotlb_gather *gather)
2453+
static size_t arm_smmu_unmap_pages(struct iommu_domain *domain, unsigned long iova,
2454+
size_t pgsize, size_t pgcount,
2455+
struct iommu_iotlb_gather *gather)
24552456
{
24562457
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
24572458
struct io_pgtable_ops *ops = smmu_domain->pgtbl_ops;
24582459

24592460
if (!ops)
24602461
return 0;
24612462

2462-
return ops->unmap(ops, iova, size, gather);
2463+
return ops->unmap_pages(ops, iova, pgsize, pgcount, gather);
24632464
}
24642465

24652466
static void arm_smmu_flush_iotlb_all(struct iommu_domain *domain)
@@ -2823,7 +2824,7 @@ static struct iommu_ops arm_smmu_ops = {
28232824
.domain_free = arm_smmu_domain_free,
28242825
.attach_dev = arm_smmu_attach_dev,
28252826
.map = arm_smmu_map,
2826-
.unmap = arm_smmu_unmap,
2827+
.unmap_pages = arm_smmu_unmap_pages,
28272828
.flush_iotlb_all = arm_smmu_flush_iotlb_all,
28282829
.iotlb_sync = arm_smmu_iotlb_sync,
28292830
.iova_to_phys = arm_smmu_iova_to_phys,

0 commit comments

Comments
 (0)