参照元

説明

引数

返り値

参考

実装

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)

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS