Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 -14
-5
include/linux/swiotlb.h
··· 121 121 122 122 void swiotlb_init(bool addressing_limited, unsigned int flags); 123 123 void __init swiotlb_exit(void); 124 - unsigned int swiotlb_max_segment(void); 125 124 size_t swiotlb_max_mapping_size(struct device *dev); 126 125 bool is_swiotlb_active(struct device *dev); 127 126 void __init swiotlb_adjust_size(unsigned long size); ··· 138 139 } 139 140 static inline void swiotlb_exit(void) 140 141 { 141 - } 142 - static inline unsigned int swiotlb_max_segment(void) 143 - { 144 - return 0; 145 142 } 146 143 static inline size_t swiotlb_max_mapping_size(struct device *dev) 147 144 {
+2 -9
kernel/dma/swiotlb.c
··· 156 156 } 157 157 early_param("swiotlb", setup_io_tlb_npages); 158 158 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 - 167 159 unsigned long swiotlb_size_or_default(void) 168 160 { 169 161 return default_nslabs << IO_TLB_SHIFT; ··· 292 300 return; 293 301 } 294 302 295 - static void *swiotlb_memblock_alloc(unsigned long nslabs, unsigned int flags, 303 + static void __init *swiotlb_memblock_alloc(unsigned long nslabs, 304 + unsigned int flags, 296 305 int (*remap)(void *tlb, unsigned long nslabs)) 297 306 { 298 307 size_t bytes = PAGE_ALIGN(nslabs << IO_TLB_SHIFT);