dma-direct: add an explicit dma_direct_get_required_mask
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Sep 2018 11:26:13 +0000 (13:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 1 Oct 2018 14:27:15 +0000 (07:27 -0700)
commita20bb058375147cb639c7aa17ef86ad68b32d847
treefb2e006f2c9bd963f515fdeeb99c12adf6ded318
parentc6d4381220a0087ce19dbf6984d92c451bd6b364
dma-direct: add an explicit dma_direct_get_required_mask

This is somewhat modelled after the powerpc version, and differs from
the legacy fallback in use fls64 instead of pointlessly splitting up the
address into low and high dwords and in that it takes (__)phys_to_dma
into account.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
include/linux/dma-direct.h
kernel/dma/direct.c