Commit 6ffb575b authored by Linus Torvalds's avatar Linus Torvalds

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
parents 5a6d9249 9b07d27d
...@@ -121,7 +121,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev) ...@@ -121,7 +121,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev)
void swiotlb_init(bool addressing_limited, unsigned int flags); void swiotlb_init(bool addressing_limited, unsigned int flags);
void __init swiotlb_exit(void); void __init swiotlb_exit(void);
unsigned int swiotlb_max_segment(void);
size_t swiotlb_max_mapping_size(struct device *dev); size_t swiotlb_max_mapping_size(struct device *dev);
bool is_swiotlb_active(struct device *dev); bool is_swiotlb_active(struct device *dev);
void __init swiotlb_adjust_size(unsigned long size); void __init swiotlb_adjust_size(unsigned long size);
...@@ -140,10 +139,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev) ...@@ -140,10 +139,6 @@ static inline bool is_swiotlb_force_bounce(struct device *dev)
static inline void swiotlb_exit(void) static inline void swiotlb_exit(void)
{ {
} }
static inline unsigned int swiotlb_max_segment(void)
{
return 0;
}
static inline size_t swiotlb_max_mapping_size(struct device *dev) static inline size_t swiotlb_max_mapping_size(struct device *dev)
{ {
return SIZE_MAX; return SIZE_MAX;
......
...@@ -156,14 +156,6 @@ setup_io_tlb_npages(char *str) ...@@ -156,14 +156,6 @@ setup_io_tlb_npages(char *str)
} }
early_param("swiotlb", setup_io_tlb_npages); early_param("swiotlb", setup_io_tlb_npages);
unsigned int swiotlb_max_segment(void)
{
if (!io_tlb_default_mem.nslabs)
return 0;
return rounddown(io_tlb_default_mem.nslabs << IO_TLB_SHIFT, PAGE_SIZE);
}
EXPORT_SYMBOL_GPL(swiotlb_max_segment);
unsigned long swiotlb_size_or_default(void) unsigned long swiotlb_size_or_default(void)
{ {
return default_nslabs << IO_TLB_SHIFT; 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, ...@@ -300,7 +292,8 @@ static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start,
return; return;
} }
static void *swiotlb_memblock_alloc(unsigned long nslabs, unsigned int flags, static void __init *swiotlb_memblock_alloc(unsigned long nslabs,
unsigned int flags,
int (*remap)(void *tlb, unsigned long nslabs)) int (*remap)(void *tlb, unsigned long nslabs))
{ {
size_t bytes = PAGE_ALIGN(nslabs << IO_TLB_SHIFT); size_t bytes = PAGE_ALIGN(nslabs << IO_TLB_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment