dma-mapping-fast: Remap contiguous pages only when needed
When a CPU mapping is determined for the contiguous pages allocated with
DMA_ATTR_FORCE_CONTIGUOUS, the pages are remapped into the
vmalloc space, independent of the device's coherency settings. In
cases where the device accessing the memory is I/O coherent this is
unnecessary, as the kernel logical mappings can be used for coherent
CPU accesses.
Thus, only remap the contiguous pages when the CPU needs an uncached
mapping to access the memory--when the device is non I/O coherent--or
when the pages are in high memory.
Change-Id: I6179adbfbda5cb639c1da87c72424ddbee9821f1
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment