*参照元 [#z1be3c64] #backlinks *説明 [#s326937c] -パス: [[linux-4.4.1/arch/arm64/mm/dma-mapping.c]] -FIXME: これは何? --説明 **引数 [#a13c1f48] -struct device *dev -- --[[linux-4.4.1/device]] -struct page *page -- --[[linux-4.4.1/page]] -unsigned long offset -- -size_t size -- -enum dma_data_direction dir -- --[[linux-4.4.1/dma_data_direction]] -struct dma_attrs *attrs -- --[[linux-4.4.1/dma_attrs]] **返り値 [#ac1732d9] -dma_addr_t -- --[[linux-4.4.1/dma_addr_t]] **参考 [#x4bc6716] *実装 [#me1d8b95] static dma_addr_t __iommu_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs) { bool coherent = is_device_dma_coherent(dev); int prot = dma_direction_to_prot(dir, coherent); dma_addr_t dev_addr = iommu_dma_map_page(dev, page, offset, size, prot); - --[[linux-4.4.1/is_device_dma_coherent()]] --[[linux-4.4.1/dma_direction_to_prot()]] --[[linux-4.4.1/iommu_dma_map_page()]] if (!iommu_dma_mapping_error(dev, dev_addr) && !dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) __iommu_sync_single_for_device(dev, dev_addr, size, dir); - --[[linux-4.4.1/iommu_dma_mapping_error()]] --[[linux-4.4.1/dma_get_attr()]] --[[linux-4.4.1/__iommu_sync_single_for_device()]] return dev_addr; } *コメント [#s4e9d73d]