Skip to content

Commit dc2e692

Browse files
rleonmszyprow
authored andcommitted
iommu: add kernel-doc for iommu_unmap_fast
Add kernel-doc section for iommu_unmap_fast to document existing limitation of underlying functions which can't split individual ranges. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Acked-by: Will Deacon <will@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
1 parent 5c87cff commit dc2e692

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/iommu/iommu.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,6 +2618,25 @@ size_t iommu_unmap(struct iommu_domain *domain,
26182618
}
26192619
EXPORT_SYMBOL_GPL(iommu_unmap);
26202620

2621+
/**
2622+
* iommu_unmap_fast() - Remove mappings from a range of IOVA without IOTLB sync
2623+
* @domain: Domain to manipulate
2624+
* @iova: IO virtual address to start
2625+
* @size: Length of the range starting from @iova
2626+
* @iotlb_gather: range information for a pending IOTLB flush
2627+
*
2628+
* iommu_unmap_fast() will remove a translation created by iommu_map().
2629+
* It can't subdivide a mapping created by iommu_map(), so it should be
2630+
* called with IOVA ranges that match what was passed to iommu_map(). The
2631+
* range can aggregate contiguous iommu_map() calls so long as no individual
2632+
* range is split.
2633+
*
2634+
* Basically iommu_unmap_fast() is the same as iommu_unmap() but for callers
2635+
* which manage the IOTLB flushing externally to perform a batched sync.
2636+
*
2637+
* Returns: Number of bytes of IOVA unmapped. iova + res will be the point
2638+
* unmapping stopped.
2639+
*/
26212640
size_t iommu_unmap_fast(struct iommu_domain *domain,
26222641
unsigned long iova, size_t size,
26232642
struct iommu_iotlb_gather *iotlb_gather)

0 commit comments

Comments
 (0)