*参照元 [#d3b9aa1d] #backlinks *説明 [#d73f2a48] -パス: [[linux-4.4.1/arch/arm/mm/dma-mapping.c]] -FIXME: これは何? --説明 **引数 [#a9e068d3] -struct page *page -- --[[linux-4.4.1/page]] -unsigned long off -- -size_t size -- -enum dma_data_direction dir - --[[linux-4.4.1/dma_data_direction]] **返り値 [#xef8930d] -なし **参考 [#secbed66] *実装 [#h69b9480] static void __dma_page_dev_to_cpu(struct page *page, unsigned long off, size_t size, enum dma_data_direction dir) { phys_addr_t paddr = page_to_phys(page) + off; - --[[linux-4.4.1/phys_addr_t]] --[[linux-4.4.1/page_to_phys]] /* FIXME: non-speculating: not required */ /* in any case, don't bother invalidating if DMA to device */ if (dir != DMA_TO_DEVICE) { outer_inv_range(paddr, paddr + size); - --[[linux-4.4.1/outer_inv_range()]] dma_cache_maint_page(page, off, size, dir, dmac_unmap_area); - --[[linux-4.4.1/dma_cache_maint_page()]] --[[linux-4.4.1/dmac_unmap_area()]] } /* * Mark the D-cache clean for these pages to avoid extra flushing. */ if (dir != DMA_TO_DEVICE && size >= PAGE_SIZE) { unsigned long pfn; size_t left = size; pfn = page_to_pfn(page) + off / PAGE_SIZE; off %= PAGE_SIZE; - --[[linux-4.4.1/page_to_pfn()]] --[[linux-4.4.1/PAGE_SIZE]] if (off) { pfn++; left -= PAGE_SIZE - off; } while (left >= PAGE_SIZE) { page = pfn_to_page(pfn++); set_bit(PG_dcache_clean, &page->flags); left -= PAGE_SIZE; } - --[[linux-4.4.1/set_bit()]] } } *コメント [#j56cfdb3]