diff options
author | Christoph Hellwig <hch@lst.de> | 2018-09-20 13:26:13 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-10-01 07:27:15 -0700 |
commit | a20bb058375147cb639c7aa17ef86ad68b32d847 (patch) | |
tree | fb2e006f2c9bd963f515fdeeb99c12adf6ded318 /include/linux/dma-direct.h | |
parent | c6d4381220a0087ce19dbf6984d92c451bd6b364 (diff) | |
download | blackbird-op-linux-a20bb058375147cb639c7aa17ef86ad68b32d847.tar.gz blackbird-op-linux-a20bb058375147cb639c7aa17ef86ad68b32d847.zip |
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>
Diffstat (limited to 'include/linux/dma-direct.h')
-rw-r--r-- | include/linux/dma-direct.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h index 86a59ba5a7f3..b79496d8c75b 100644 --- a/include/linux/dma-direct.h +++ b/include/linux/dma-direct.h @@ -55,6 +55,7 @@ static inline void dma_mark_clean(void *addr, size_t size) } #endif /* CONFIG_ARCH_HAS_DMA_MARK_CLEAN */ +u64 dma_direct_get_required_mask(struct device *dev); void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs); void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, |