*参照元 [#cd33b4d3] #backlinks *説明 [#ef7af344] -パス: [[linux-2.6.33/]] -パス: [[linux-2.6.33/include/asm-generic/dma-mapping-common.h]] -FIXME: これは何? --説明 **引数 [#gbb36c45] -struct device *dev -- --[[linux-2.6.33/device]] -void *ptr -- -size_t size -- -enum dma_data_direction dir -- --[[linux-2.6.33/dma_data_direction]] -struct dma_attrs *attrs -- --[[linux-2.6.33/dma_attrs]] **返り値 [#l22cec99] -dma_addr_t -- --[[linux-2.6.33/dma_addr_t]] **参考 [#k5e927b2] *実装 [#r6573ffa] 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; - --[[linux-2.6.33/dma_map_ops]] --[[linux-2.6.33/get_dma_ops()]] kmemcheck_mark_initialized(ptr, size); - --[[linux-2.6.33/kmemcheck_mark_initialized()]] BUG_ON(!valid_dma_direction(dir)); - --[[linux-2.6.33/valid_dma_direction()]] --[[linux-2.6.33/BUG_ON()]] 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); - --[[linux-2.6.33/virt_to_page()]] --[[linux-2.6.33/debug_dma_map_page()]] return addr; } *コメント [#u0dcd6dd]