参照元

説明

引数

返り値

参考

実装

CONFIG_MMU 無効: arch/arm/mm/nommu.c

void flush_kernel_dcache_page(struct page *page)
{
        __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
}
EXPORT_SYMBOL(flush_kernel_dcache_page);

CONFIG_MMU 有効: arch/arm/mm/flush.c

/*
 * Ensure cache coherency for the kernel mapping of this page. We can
 * assume that the page is pinned via kmap.
 *
 * If the page only exists in the page cache and there are no user
 * space mappings, this is a no-op since the page was already marked
 * dirty at creation.  Otherwise, we need to flush the dirty kernel
 * cache lines directly.
 */
void flush_kernel_dcache_page(struct page *page)
{
        if (cache_is_vivt() || cache_is_vipt_aliasing()) {
                struct address_space *mapping;
                mapping = page_mapping(page);
                if (!mapping || mapping_mapped(mapping)) {
                        void *addr;

                        addr = page_address(page);
                        /*
                         * kmap_atomic() doesn't set the page virtual
                         * address for highmem pages, and
                         * kunmap_atomic() takes care of cache
                         * flushing already.
                         */
                        if (!IS_ENABLED(CONFIG_HIGHMEM) || addr)
                                __cpuc_flush_dcache_area(addr, PAGE_SIZE);
                }
        }
}
EXPORT_SYMBOL(flush_kernel_dcache_page);

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-04-11 (月) 11:46:23