lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9852e410-eec8-1d82-8704-cd7bc8b0a07b@arm.com>
Date:   Thu, 25 Mar 2021 12:52:34 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     John Garry <john.garry@...wei.com>, joro@...tes.org,
        will@...nel.org, dwmw2@...radead.org, baolu.lu@...ux.intel.com
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        linuxarm@...wei.com
Subject: Re: [PATCH v2 3/4] iommu: Delete iommu_dma_free_cpu_cached_iovas()

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@....com>

> Signed-off-by: John Garry <john.garry@...wei.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ