]> git.baikalelectronics.ru Git - kernel.git/commit
dma-mapping: add a dma_alloc_need_uncached helper
authorChristoph Hellwig <hch@lst.de>
Fri, 14 Jun 2019 14:06:10 +0000 (16:06 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Jun 2019 06:14:43 +0000 (08:14 +0200)
commitf6d24c9023f0f1dc91a293acdb32a7fd6e6917d4
treedcc65552dd34f276ac4e20104f2f981da996bdc6
parent1a8325df232628ab156c853faa5ceaa9df4dbe8c
dma-mapping: add a dma_alloc_need_uncached helper

Check if we need to allocate uncached memory for a device given the
allocation flags.  Switch over the uncached segment check to this helper
to deal with architectures that do not support the dma_cache_sync
operation and thus should not returned cacheable memory for
DMA_ATTR_NON_CONSISTENT allocations.

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