FROMGIT: 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>
(cherry picked from commit dc2e69294358693cf5fba1a15717863d201d8838
 https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git)
Bug: 416098329
Change-Id: I1ee0fd99f57a0695fbde497dc10bfbe578c9b7a3
This commit is contained in:
Leon Romanovsky
2025-05-05 10:01:41 +03:00
committed by Carlos Llamas
parent 5c59ff3809
commit c64f83e1d6

View File

@@ -2602,6 +2602,25 @@ size_t iommu_unmap(struct iommu_domain *domain,
}
EXPORT_SYMBOL_GPL(iommu_unmap);
/**
* iommu_unmap_fast() - Remove mappings from a range of IOVA without IOTLB sync
* @domain: Domain to manipulate
* @iova: IO virtual address to start
* @size: Length of the range starting from @iova
* @iotlb_gather: range information for a pending IOTLB flush
*
* iommu_unmap_fast() will remove a translation created by iommu_map().
* It can't subdivide a mapping created by iommu_map(), so it should be
* called with IOVA ranges that match what was passed to iommu_map(). The
* range can aggregate contiguous iommu_map() calls so long as no individual
* range is split.
*
* Basically iommu_unmap_fast() is the same as iommu_unmap() but for callers
* which manage the IOTLB flushing externally to perform a batched sync.
*
* Returns: Number of bytes of IOVA unmapped. iova + res will be the point
* unmapping stopped.
*/
size_t iommu_unmap_fast(struct iommu_domain *domain,
unsigned long iova, size_t size,
struct iommu_iotlb_gather *iotlb_gather)