From f817953a3b823fa389d329615dddd5be8cf64e71 Mon Sep 17 00:00:00 2001 From: Chris Goldsworthy Date: Sat, 12 Nov 2022 18:31:41 -0800 Subject: [PATCH] dma-mapping-fast: IOMMU helper clean up iommu_put_dma_cookie() is now called by the IOMMU framework code before each driver's domain free callback function is invoked. Remove iommu_put_dma_cookie() accordingly. qcom_iommu_put_resv_regions() is now replaced by iommu_put_resv_regions(), drop all references to our qcom_ function versions. Change-Id: Ib9c1c431faf4988707e449ad00c1e3fe7ee2dd47 Signed-off-by: Chris Goldsworthy --- drivers/iommu/dma-mapping-fast.c | 4 +--- include/linux/qcom-iommu-util.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/dma-mapping-fast.c b/drivers/iommu/dma-mapping-fast.c index aa777b60322c..962e81b5e082 100644 --- a/drivers/iommu/dma-mapping-fast.c +++ b/drivers/iommu/dma-mapping-fast.c @@ -980,7 +980,7 @@ static void fast_smmu_reserve_iommu_regions(struct device *dev, bitmap_set(fast->clean_bitmap, lo, hi - lo + 1); } spin_unlock_irqrestore(&mapping->lock, flags); - qcom_iommu_put_resv_regions(dev, &resv_regions); + iommu_put_resv_regions(dev, &resv_regions); fast_smmu_reserve_msi_iova(dev, fast); } @@ -992,8 +992,6 @@ void fast_smmu_put_dma_cookie(struct iommu_domain *domain) if (!fast) return; - iommu_put_dma_cookie(domain); - if (fast->iovad) { put_iova_domain(fast->iovad); kfree(fast->iovad); diff --git a/include/linux/qcom-iommu-util.h b/include/linux/qcom-iommu-util.h index db5a07cdda7a..4bbb597dbcf8 100644 --- a/include/linux/qcom-iommu-util.h +++ b/include/linux/qcom-iommu-util.h @@ -112,9 +112,8 @@ int qcom_iommu_get_fast_iova_range(struct device *dev, dma_addr_t *ret_iova_base, dma_addr_t *ret_iova_end); -/* Remove once these functions are exported by upstream kernel */ +/* Remove once this function is exported by upstream kernel */ void qcom_iommu_get_resv_regions(struct device *dev, struct list_head *list); -void qcom_iommu_put_resv_regions(struct device *dev, struct list_head *list); phys_addr_t qcom_iommu_iova_to_phys_hard(struct iommu_domain *domain, struct qcom_iommu_atos_txn *txn);