Messages in this thread | | | Subject | Re: [PATCH v2 3/4] iommu: Delete iommu_dma_free_cpu_cached_iovas() | From | Robin Murphy <> | Date | Thu, 25 Mar 2021 12:52:34 +0000 |
| |
On 2021-03-25 12:30, John Garry wrote: > Function iommu_dma_free_cpu_cached_iovas() no longer has any caller, so > delete it. > > With that, function free_cpu_cached_iovas() may be made static.
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: John Garry <john.garry@huawei.com> > --- > drivers/iommu/dma-iommu.c | 9 --------- > drivers/iommu/iova.c | 3 ++- > include/linux/dma-iommu.h | 8 -------- > include/linux/iova.h | 5 ----- > 4 files changed, 2 insertions(+), 23 deletions(-) > > diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c > index af765c813cc8..9da7e9901bec 100644 > --- a/drivers/iommu/dma-iommu.c > +++ b/drivers/iommu/dma-iommu.c > @@ -53,15 +53,6 @@ struct iommu_dma_cookie { > > static DEFINE_STATIC_KEY_FALSE(iommu_deferred_attach_enabled); > > -void iommu_dma_free_cpu_cached_iovas(unsigned int cpu, > - struct iommu_domain *domain) > -{ > - struct iommu_dma_cookie *cookie = domain->iova_cookie; > - struct iova_domain *iovad = &cookie->iovad; > - > - free_cpu_cached_iovas(cpu, iovad); > -} > - > static void iommu_dma_entry_dtor(unsigned long data) > { > struct page *freelist = (struct page *)data; > diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c > index c78312560425..8a493ee92c79 100644 > --- a/drivers/iommu/iova.c > +++ b/drivers/iommu/iova.c > @@ -22,6 +22,7 @@ static unsigned long iova_rcache_get(struct iova_domain *iovad, > unsigned long size, > unsigned long limit_pfn); > static void init_iova_rcaches(struct iova_domain *iovad); > +static void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad); > static void free_iova_rcaches(struct iova_domain *iovad); > static void fq_destroy_all_entries(struct iova_domain *iovad); > static void fq_flush_timeout(struct timer_list *t); > @@ -998,7 +999,7 @@ static void free_iova_rcaches(struct iova_domain *iovad) > /* > * free all the IOVA ranges cached by a cpu (used when cpu is unplugged) > */ > -void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad) > +static void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad) > { > struct iova_cpu_rcache *cpu_rcache; > struct iova_rcache *rcache; > diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h > index 706b68d1359b..2112f21f73d8 100644 > --- a/include/linux/dma-iommu.h > +++ b/include/linux/dma-iommu.h > @@ -37,9 +37,6 @@ void iommu_dma_compose_msi_msg(struct msi_desc *desc, > > void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); > > -void iommu_dma_free_cpu_cached_iovas(unsigned int cpu, > - struct iommu_domain *domain); > - > #else /* CONFIG_IOMMU_DMA */ > > struct iommu_domain; > @@ -81,10 +78,5 @@ static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_he > { > } > > -static inline void iommu_dma_free_cpu_cached_iovas(unsigned int cpu, > - struct iommu_domain *domain) > -{ > -} > - > #endif /* CONFIG_IOMMU_DMA */ > #endif /* __DMA_IOMMU_H */ > diff --git a/include/linux/iova.h b/include/linux/iova.h > index 4be6c0ab4997..71d8a2de6635 100644 > --- a/include/linux/iova.h > +++ b/include/linux/iova.h > @@ -157,7 +157,6 @@ int init_iova_flush_queue(struct iova_domain *iovad, > iova_flush_cb flush_cb, iova_entry_dtor entry_dtor); > struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn); > void put_iova_domain(struct iova_domain *iovad); > -void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad); > #else > static inline int iova_cache_get(void) > { > @@ -234,10 +233,6 @@ static inline void put_iova_domain(struct iova_domain *iovad) > { > } > > -static inline void free_cpu_cached_iovas(unsigned int cpu, > - struct iova_domain *iovad) > -{ > -} > #endif > > #endif >
| |