The function returns the maximum size that can be remapped by the SWIOTLB implementation. This function will be later exposed to users through the DMA-API.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -76,6 +76,7 @@ bool swiotlb_map(struct device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, · 75 unmodified lines | ||
| 76 | 76 | size_t size, enum dma_data_direction dir, unsigned long attrs); |
| 77 | 77 | void __init swiotlb_exit(void); |
| 78 | 78 | unsigned int swiotlb_max_segment(void); |
| 79 | +size_t swiotlb_max_mapping_size(struct device *dev); | |
| 79 | 80 | #else |
| 80 | 81 | #define swiotlb_force SWIOTLB_NO_FORCE |
| 81 | 82 | static inline bool is_swiotlb_buffer(phys_addr_t paddr) |
| @@ -95,6 +96,10 @@ static inline unsigned int swiotlb_max_segment(void) · 13 unmodified lines | ||
| 95 | 96 | { |
| 96 | 97 | return 0; |
| 97 | 98 | } |
| 99 | +static inline size_t swiotlb_max_mapping_size(struct device *dev) | |
| 100 | +{ | |
| 101 | + return SIZE_MAX; | |
| 102 | +} | |
| 98 | 103 | #endif /* CONFIG_SWIOTLB */ |
| 99 | 104 | |
| 100 | 105 | extern void swiotlb_print_info(void); |