dma-mapping: add a dma_mmap_pages helper
Add a helper to map memory allocated using dma_alloc_pages into a user address space, similar to the dma_alloc_attrs function for coherent allocations. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Tested-by: Ricardo Ribalda <ribalda@chromium.org>
This commit is contained in:
@@ -563,6 +563,16 @@ Free a region of memory previously allocated using dma_alloc_pages().
|
||||
dev, size, dma_handle and dir must all be the same as those passed into
|
||||
dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().
|
||||
|
||||
::
|
||||
|
||||
int
|
||||
dma_mmap_pages(struct device *dev, struct vm_area_struct *vma,
|
||||
size_t size, struct page *page)
|
||||
|
||||
Map an allocation returned from dma_alloc_pages() into a user address space.
|
||||
dev and size must be the same as those passed into dma_alloc_pages().
|
||||
page must be the pointer returned by dma_alloc_pages().
|
||||
|
||||
::
|
||||
|
||||
void *
|
||||
|
||||
Reference in New Issue
Block a user