dma-direct: refactor the !coherent checks in dma_direct_alloc
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 07:47:31 +0000 (09:47 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Dec 2021 11:49:57 +0000 (12:49 +0100)
commita86d10942db2e0099a369b367fe62898f95987a8
tree35f17ff18883950dfe06a5b73ce9f18ea8c10af8
parentd541ae55d538265861ef729a64d2d816d34ef1e2
dma-direct: refactor the !coherent checks in dma_direct_alloc

Add a big central !dev_is_dma_coherent(dev) block to deal with as much
as of the uncached allocation schemes and document the schemes a bit
better.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c