Commit 636dc67c authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Ingo Molnar

add is_buffer_dma_capable helper function

is_buffer_dma_capable helper function is to see if a memory region is
DMA-capable or not. The arugments are the dma_mask (or
coherent_dma_mask) of a device and the address and size of a memory
Signed-off-by: default avatarFUJITA Tomonori <>
Acked-by: default avatarJoerg Roedel <>
Signed-off-by: default avatarIngo Molnar <>
parent e92b4fda
......@@ -48,6 +48,11 @@ static inline int is_device_dma_capable(struct device *dev)
return dev->dma_mask != NULL && *dev->dma_mask != DMA_MASK_NONE;
static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)
return addr + size <= mask;
#include <asm/dma-mapping.h>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment