Daniele reported that issue previously fixed in c41f9ea998f3 ("drivers: dma-coherent: Account dma_pfn_offset when used with device tree") reappear shortly after 43fc509c3efb ("dma-coherent: introduce interface for default DMA pool") where fix was accidentally dropped. Lets put fix back in place and respect dma-ranges for reserved memory. Fixes: 43fc509c3efb ("dma-coherent: introduce interface for default DMA pool")
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -162,7 +162,7 @@ int dma_release_from_dev_coherent(struct device *dev, int order, void *vaddr); · 161 unmodified lines | ||
| 162 | 162 | int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma, |
| 163 | 163 | void *cpu_addr, size_t size, int *ret); |
| 164 | 164 | |
| 165 | −void *dma_alloc_from_global_coherent(ssize_t size, dma_addr_t *dma_handle); | |
| 165 | +void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size, dma_addr_t *dma_handle); | |
| 166 | 166 | int dma_release_from_global_coherent(int order, void *vaddr); |
| 167 | 167 | int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr, |
| 168 | 168 | size_t size, int *ret); |
| @@ -172,7 +172,7 @@ int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr, · 3 unmodified lines | ||
| 172 | 172 | #define dma_release_from_dev_coherent(dev, order, vaddr) (0) |
| 173 | 173 | #define dma_mmap_from_dev_coherent(dev, vma, vaddr, order, ret) (0) |
| 174 | 174 | |
| 175 | −static inline void *dma_alloc_from_global_coherent(ssize_t size, | |
| 175 | +static inline void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size, | |
| 176 | 176 | dma_addr_t *dma_handle) |
| 177 | 177 | { |
| 178 | 178 | return NULL; |