Skip to content

Commit a93a962

Browse files
YongjiXiemstsirkin
authored andcommitted
iova: Export alloc_iova_fast() and free_iova_fast()
Export alloc_iova_fast() and free_iova_fast() so that some modules can make use of the per-CPU cache to get rid of rbtree spinlock in alloc_iova() and free_iova() during IOVA allocation. Signed-off-by: Xie Yongji <[email protected]> Acked-by: Jason Wang <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 6105d1f commit a93a962

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/iova.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
521521

522522
return new_iova->pfn_lo;
523523
}
524+
EXPORT_SYMBOL_GPL(alloc_iova_fast);
524525

525526
/**
526527
* free_iova_fast - free iova pfn range into rcache
@@ -538,6 +539,7 @@ free_iova_fast(struct iova_domain *iovad, unsigned long pfn, unsigned long size)
538539

539540
free_iova(iovad, pfn);
540541
}
542+
EXPORT_SYMBOL_GPL(free_iova_fast);
541543

542544
#define fq_ring_for_each(i, fq) \
543545
for ((i) = (fq)->head; (i) != (fq)->tail; (i) = ((i) + 1) % IOVA_FQ_SIZE)

0 commit comments

Comments
 (0)