OSDN Git Service

dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code
authorChristoph Hellwig <hch@lst.de>
Fri, 14 Jun 2019 14:17:27 +0000 (16:17 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Jun 2019 12:28:05 +0000 (14:28 +0200)
commitd98849aff87911013aadb730138ab728b52fc547
tree14dbf44779970bf7754648fb04c5b2c9bf40ba6f
parentc2f2124e0d447ad02a41a92361b3734366797680
dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code

DMA_ATTR_NO_KERNEL_MAPPING is generally implemented by allocating
normal cacheable pages or CMA memory, and then returning the page
pointer as the opaque handle.  Lift that code from the xtensa and
generic dma remapping implementations into the generic dma-direct
code so that we don't even call arch_dma_alloc for these allocations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/xtensa/kernel/pci-dma.c
include/linux/dma-noncoherent.h
kernel/dma/direct.c
kernel/dma/remap.c