History

dma-mapping: fix handling of dma-ranges for reserved memory (again)

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")

Vladimir Murzin committed 7 years ago

Commit a445e941 parent 320000e3 files · +12 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/dma-mapping.h+2−2
@@ -162,7 +162,7 @@ int dma_release_from_dev_coherent(struct device *dev, int order, void *vaddr); · 161 unmodified lines
162162 int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,
163163 void *cpu_addr, size_t size, int *ret);
164164
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);
166166 int dma_release_from_global_coherent(int order, void *vaddr);
167167 int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,
168168 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
172172 #define dma_release_from_dev_coherent(dev, order, vaddr) (0)
173173 #define dma_mmap_from_dev_coherent(dev, vma, vaddr, order, ret) (0)
174174
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,
176176 dma_addr_t *dma_handle)
177177 {
178178 return NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t