dma-direct: fail allocations that can't be made coherent
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Nov 2021 14:47:56 +0000 (15:47 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Dec 2021 11:50:06 +0000 (12:50 +0100)
commit955f58f7406ad912825fc344c7825fd904b124a0
treea23e035d3fd7886c708f7bb0937990e0d30267bd
parenta86d10942db2e0099a369b367fe62898f95987a8
dma-direct: fail allocations that can't be made coherent

If the architecture can't remap or set an address uncached there is no way
to fullfill a request for a coherent allocation.  Return NULL in that case.
Note that this case currently does not happen, so this is a theoretical
fixup and/or a preparation for eventually supporting platforms that
can't support coherent allocations with the generic code.

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