Skip to content

Commit 6ffb575

Browse files
committed
Merge tag 'dma-mapping-6.3-2022-02-27' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping updates from Christoph Hellwig: - remove a not very useful and now unused swiotlb API (Christoph Hellwig) - fix a section mismatch (Randy Dunlap) * tag 'dma-mapping-6.3-2022-02-27' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: mark swiotlb_memblock_alloc() as __init swiotlb: remove swiotlb_max_segment
2 parents 5a6d924 + 9b07d27 commit 6ffb575

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
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: 2 additions & 9 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;
@@ -300,7 +292,8 @@ static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start,
300292
return;
301293
}
302294

303-
static void *swiotlb_memblock_alloc(unsigned long nslabs, unsigned int flags,
295+
static void __init *swiotlb_memblock_alloc(unsigned long nslabs,
296+
unsigned int flags,
304297
int (*remap)(void *tlb, unsigned long nslabs))
305298
{
306299
size_t bytes = PAGE_ALIGN(nslabs << IO_TLB_SHIFT);

0 commit comments

Comments
 (0)