*参照元 [#r6be3104] #backlinks *説明 [#d6ade5fc] -パス: [[linux-4.4.1/arch/arm/mm/flush.c]] -FIXME: これは何? --説明 **引数 [#n0930724] -struct address_space *mapping -- --[[linux-4.4.1/address_space]] -struct page *page -- --[[linux-4.4.1/page]] **返り値 [#lc5d50ad] -なし **参考 [#qf69f3d3] *実装 [#v2e067b9] void __flush_dcache_page(struct address_space *mapping, struct page *page) { /* * Writeback any data associated with the kernel mapping of this * page. This ensures that data in the physical page is mutually * coherent with the kernels mapping. */ if (!PageHighMem(page)) { size_t page_size = PAGE_SIZE << compound_order(page); __cpuc_flush_dcache_area(page_address(page), page_size); - --[[linux-4.4.1/PageHighMem()]] --[[linux-4.4.1/PAGE_SIZE]] --[[linux-4.4.1/compound_order()]] --[[linux-4.4.1/__cpuc_flush_dcache_area()]] --[[linux-4.4.1/page_address()]] } else { unsigned long i; if (cache_is_vipt_nonaliasing()) { for (i = 0; i < (1 << compound_order(page)); i++) { void *addr = kmap_atomic(page + i); __cpuc_flush_dcache_area(addr, PAGE_SIZE); kunmap_atomic(addr); } - --[[linux-4.4.1/cache_is_vipt_nonaliasing()]] --[[linux-4.4.1/compound_order()]] --[[linux-4.4.1/kmap_atomic()]] --[[linux-4.4.1/__cpuc_flush_dcache_area()]] --[[linux-4.4.1/kunmap_atomic()]] } else { for (i = 0; i < (1 << compound_order(page)); i++) { void *addr = kmap_high_get(page + i); if (addr) { __cpuc_flush_dcache_area(addr, PAGE_SIZE); kunmap_high(page + i); } } - --[[linux-4.4.1/compound_order()]] --[[linux-4.4.1/kmap_high_get()]] --[[linux-4.4.1/__cpuc_flush_dcache_area()]] --[[linux-4.4.1/kunmap_high()]] } } /* * If this is a page cache page, and we have an aliasing VIPT cache, * we only need to do one flush - which would be at the relevant * userspace colour, which is congruent with page->index. */ if (mapping && cache_is_vipt_aliasing()) flush_pfn_alias(page_to_pfn(page), page->index << PAGE_CACHE_SHIFT); - --[[linux-4.4.1/cache_is_vipt_aliasing()]] --[[linux-4.4.1/flush_pfn_alias()]] --[[linux-4.4.1/page_to_pfn()]] } *コメント [#ve545de4]