Skip to content

Commit 149448b

Browse files
John Garryjoergroedel
authored andcommitted
iommu: Delete iommu_dma_free_cpu_cached_iovas()
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. Signed-off-by: John Garry <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 363f266 commit 149448b

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

drivers/iommu/dma-iommu.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ static int __init iommu_dma_forcedac_setup(char *str)
6464
}
6565
early_param("iommu.forcedac", iommu_dma_forcedac_setup);
6666

67-
void iommu_dma_free_cpu_cached_iovas(unsigned int cpu,
68-
struct iommu_domain *domain)
69-
{
70-
struct iommu_dma_cookie *cookie = domain->iova_cookie;
71-
struct iova_domain *iovad = &cookie->iovad;
72-
73-
free_cpu_cached_iovas(cpu, iovad);
74-
}
75-
7667
static void iommu_dma_entry_dtor(unsigned long data)
7768
{
7869
struct page *freelist = (struct page *)data;

drivers/iommu/iova.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ static unsigned long iova_rcache_get(struct iova_domain *iovad,
2222
unsigned long size,
2323
unsigned long limit_pfn);
2424
static void init_iova_rcaches(struct iova_domain *iovad);
25+
static void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad);
2526
static void free_iova_rcaches(struct iova_domain *iovad);
2627
static void fq_destroy_all_entries(struct iova_domain *iovad);
2728
static void fq_flush_timeout(struct timer_list *t);
@@ -1040,7 +1041,7 @@ static void free_iova_rcaches(struct iova_domain *iovad)
10401041
/*
10411042
* free all the IOVA ranges cached by a cpu (used when cpu is unplugged)
10421043
*/
1043-
void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad)
1044+
static void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad)
10441045
{
10451046
struct iova_cpu_rcache *cpu_rcache;
10461047
struct iova_rcache *rcache;

include/linux/dma-iommu.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,5 @@ static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_he
8383
{
8484
}
8585

86-
static inline void iommu_dma_free_cpu_cached_iovas(unsigned int cpu,
87-
struct iommu_domain *domain)
88-
{
89-
}
90-
9186
#endif /* CONFIG_IOMMU_DMA */
9287
#endif /* __DMA_IOMMU_H */

include/linux/iova.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ int init_iova_flush_queue(struct iova_domain *iovad,
157157
iova_flush_cb flush_cb, iova_entry_dtor entry_dtor);
158158
struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn);
159159
void put_iova_domain(struct iova_domain *iovad);
160-
void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad);
161160
#else
162161
static inline int iova_cache_get(void)
163162
{
@@ -234,10 +233,6 @@ static inline void put_iova_domain(struct iova_domain *iovad)
234233
{
235234
}
236235

237-
static inline void free_cpu_cached_iovas(unsigned int cpu,
238-
struct iova_domain *iovad)
239-
{
240-
}
241236
#endif
242237

243238
#endif

0 commit comments

Comments
 (0)