参照元†
- struct device *dev
- void *ptr
- size_t size
- enum dma_data_direction dir
- struct dma_attrs *attrs
返り値†
CONFIG_HAVE_DMA_ATTRS 有効: include/asm-generic/dma-mapping-common.h†
static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
size_t size,
enum dma_data_direction dir,
struct dma_attrs *attrs)
{
struct dma_map_ops *ops = get_dma_ops(dev);
dma_addr_t addr;
kmemcheck_mark_initialized(ptr, size);
BUG_ON(!valid_dma_direction(dir));
addr = ops->map_page(dev, virt_to_page(ptr),
(unsigned long)ptr & ~PAGE_MASK, size,
dir, attrs);
debug_dma_map_page(dev, virt_to_page(ptr),
(unsigned long)ptr & ~PAGE_MASK, size,
dir, addr, true);
return addr;
}
CONFIG_HAVE_DMA_ATTRS 無効: include/linux/dma-mapping.h†
#define dma_map_single_attrs(dev, cpu_addr, size, dir, attrs) \
dma_map_single(dev, cpu_addr, size, dir)
コメント†