Skip to content

Commit 5e7b9a6

Browse files
author
Christoph Hellwig
committed
swiotlb: remove swiotlb_max_segment
swiotlb_max_segment has always been a bogus API, so remove it now that the remaining callers are gone. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Robin Murphy <[email protected]>
1 parent 033c40a commit 5e7b9a6

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

include/linux/swiotlb.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev)
121121

122122
void swiotlb_init(bool addressing_limited, unsigned int flags);
123123
void __init swiotlb_exit(void);
124-
unsigned int swiotlb_max_segment(void);
125124
size_t swiotlb_max_mapping_size(struct device *dev);
126125
bool is_swiotlb_active(struct device *dev);
127126
void __init swiotlb_adjust_size(unsigned long size);
@@ -140,10 +139,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev)
140139
static inline void swiotlb_exit(void)
141140
{
142141
}
143-
static inline unsigned int swiotlb_max_segment(void)
144-
{
145-
return 0;
146-
}
147142
static inline size_t swiotlb_max_mapping_size(struct device *dev)
148143
{
149144
return SIZE_MAX;

kernel/dma/swiotlb.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,6 @@ setup_io_tlb_npages(char *str)
156156
}
157157
early_param("swiotlb", setup_io_tlb_npages);
158158

159-
unsigned int swiotlb_max_segment(void)
160-
{
161-
if (!io_tlb_default_mem.nslabs)
162-
return 0;
163-
return rounddown(io_tlb_default_mem.nslabs << IO_TLB_SHIFT, PAGE_SIZE);
164-
}
165-
EXPORT_SYMBOL_GPL(swiotlb_max_segment);
166-
167159
unsigned long swiotlb_size_or_default(void)
168160
{
169161
return default_nslabs << IO_TLB_SHIFT;

0 commit comments

Comments
 (0)