From: Xiang Chen chenxiang66@hisilicon.com
Use function free_rcached_iovas() to free all rcached iovas instead.
Signed-off-by: Xiang Chen chenxiang66@hisilicon.com --- drivers/iommu/iova.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index f595867..59926d5 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -503,16 +503,12 @@ alloc_iova_fast(struct iova_domain *iovad, unsigned long size, retry: new_iova = alloc_iova(iovad, size, limit_pfn, true); if (!new_iova) { - unsigned int cpu; - if (!flush_rcache) return 0;
/* Try replenishing IOVAs by flushing rcache. */ flush_rcache = false; - for_each_online_cpu(cpu) - free_cpu_cached_iovas(cpu, iovad); - free_global_cached_iovas(iovad); + free_rcache_cached_iovas(iovad); goto retry; }