Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING
DMA_ATTR_NO_KERNEL_MAPPING is to avoid creating a kernel mapping for the allocated buffer, but current implementation is that PTE of allocated buffer in kernel page table is valid. So we should set invalid for PTE of allocate buffer so that there are no kernel mapping for the allocated buffer. In some cases, we don't hope the allocated buffer to be read by cpu or speculative execution, so we use DMA_ATTR_NO_KERNEL_MAPPING to get no kernel mapping in order to achieve this goal. Signed-off-by: Walter Wu <walter-zh.wu@mediatek.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org>
- Loading branch information