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
162int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,162int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,
163 void *cpu_addr, size_t size, int *ret);163 void *cpu_addr, size_t size, int *ret);
164 164
165void *dma_alloc_from_global_coherent(ssize_t size, dma_addr_t *dma_handle);165void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size, dma_addr_t *dma_handle);
166int dma_release_from_global_coherent(int order, void *vaddr);166int dma_release_from_global_coherent(int order, void *vaddr);
167int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,167int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,
168 size_t size, int *ret);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#define dma_release_from_dev_coherent(dev, order, vaddr) (0)172#define dma_release_from_dev_coherent(dev, order, vaddr) (0)
173#define dma_mmap_from_dev_coherent(dev, vma, vaddr, order, ret) (0)173#define dma_mmap_from_dev_coherent(dev, vma, vaddr, order, ret) (0)
174 174
175static inline void *dma_alloc_from_global_coherent(ssize_t size,175static inline void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size,
176 dma_addr_t *dma_handle)176 dma_addr_t *dma_handle)
177{177{
178 return NULL;178 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