1DMA_MMAP_FROM_COHERE(9) Device drivers infrastructure DMA_MMAP_FROM_COHERE(9)
2
3
4
6 dma_mmap_from_coherent - try to mmap the memory allocated from
7 per-device coherent memory pool to userspace
8
10 int dma_mmap_from_coherent(struct device * dev,
11 struct vm_area_struct * vma, void * vaddr,
12 size_t size, int * ret);
13
15 dev
16 device from which the memory was allocated
17
18 vma
19 vm_area for the userspace memory
20
21 vaddr
22 cpu address returned by dma_alloc_from_coherent
23
24 size
25 size of the memory buffer allocated by dma_alloc_from_coherent
26
27 ret
28 result from remap_pfn_range
29
31 This checks whether the memory was allocated from the per-device
32 coherent memory pool and if so, maps that memory to the provided vma.
33
34 Returns 1 if we correctly mapped the memory, or 0 if the caller should
35 proceed with mapping memory from generic pools.
36
38Kernel Hackers Manual 3.10 June 2019 DMA_MMAP_FROM_COHERE(9)