summaryrefslogtreecommitdiff
path: root/include/linux/dma-noncoherent.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-01 14:34:33 +0300
committerChristoph Hellwig <hch@lst.de>2020-09-25 07:20:47 +0300
commitefa70f2fdc842e63a0a13223e0e83cedcc2117f1 (patch)
treeef21550627a0a50be9edf10c53542f9c59a61896 /include/linux/dma-noncoherent.h
parent5a84292271402cffe0717bc58e2ad9a0c7977272 (diff)
downloadlinux-efa70f2fdc842e63a0a13223e0e83cedcc2117f1.tar.xz
dma-mapping: add a new dma_alloc_pages API
This API is the equivalent of alloc_pages, except that the returned memory is guaranteed to be DMA addressable by the passed in device. The implementation will also be used to provide a more sensible replacement for DMA_ATTR_NON_CONSISTENT flag. Additionally dma_alloc_noncoherent is switched over to use dma_alloc_pages as its backend. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> (MIPS part)
Diffstat (limited to 'include/linux/dma-noncoherent.h')
-rw-r--r--include/linux/dma-noncoherent.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h
index 0888656369a4..e61283e06576 100644
--- a/include/linux/dma-noncoherent.h
+++ b/include/linux/dma-noncoherent.h
@@ -31,9 +31,6 @@ static __always_inline bool dma_alloc_need_uncached(struct device *dev,
return false;
if (attrs & DMA_ATTR_NO_KERNEL_MAPPING)
return false;
- if (IS_ENABLED(CONFIG_DMA_NONCOHERENT_CACHE_SYNC) &&
- (attrs & DMA_ATTR_NON_CONSISTENT))
- return false;
return true;
}