Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 67bc6af9 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 7c6f0d61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment