*参照元 [#wfde4532]
#backlinks

*説明 [#k8dd8a6f]
-パス: [[linux-4.4.1/arch/arm/mm/flush.c]]
-パス: 複数あり
--CONFIG_MMU が無効: [[linux-4.4.1/arch/arm/mm/nommu.c]]
--CONFIG_MMU が有効: [[linux-4.4.1/arch/arm/mm/flush.c]]

-FIXME: これは何?
--説明


**引数 [#m7cde16f]
-struct page *page
--
--[[linux-4.4.1/page]]


**返り値 [#b8106671]
-なし


**参考 [#hc3d6f43]


*実装 [#o367d59f]

**CONFIG_MMU が無効: arch/arm/mm/nommu.c [#df471a7b]
 void flush_dcache_page(struct page *page)
 {
         __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
-
--[[linux-4.4.1/__cpuc_flush_dcache_area()]]
--[[linux-4.4.1/page_address()]]
--[[linux-4.4.1/PAGE_SIZE]]

 }
 EXPORT_SYMBOL(flush_dcache_page);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]


**CONFIG_MMU が有効: arch/arm/mm/flush.c [#t8d2d2df]
 /*
  * Ensure cache coherency between kernel mapping and userspace mapping
  * of this page.
  *
  * We have three cases to consider:
  *  - VIPT non-aliasing cache: fully coherent so nothing required.
  *  - VIVT: fully aliasing, so we need to handle every alias in our
  *          current VM view.
  *  - VIPT aliasing: need to handle one alias in our current VM view.
  *
  * If we need to handle aliasing:
  *  If the page only exists in the page cache and there are no user
  *  space mappings, we can be lazy and remember that we may have dirty
  *  kernel cache lines for later.  Otherwise, we assume we have
  *  aliasing mappings.
  *
  * Note that we disable the lazy flush for SMP configurations where
  * the cache maintenance operations are not automatically broadcasted.
  */
 void flush_dcache_page(struct page *page)
 {
         struct address_space *mapping;
 
-
--[[linux-4.4.1/address_space]]

         /*
          * The zero page is never written to, so never has any dirty
          * cache lines, and therefore never needs to be flushed.
          */
         if (page == ZERO_PAGE(0))
                 return;
 
-
--[[linux-4.4.1/ZERO_PAGE()]]

         mapping = page_mapping(page);
 
-
--[[linux-4.4.1/page_mapping()]]

         if (!cache_ops_need_broadcast() &&
             mapping && !page_mapped(page))
                 clear_bit(PG_dcache_clean, &page->flags);
-
--[[linux-4.4.1/cache_ops_need_broadcast()]]
--[[linux-4.4.1/page_mapped()]]
--[[linux-4.4.1/clear_bit()]]

         else {
                 __flush_dcache_page(mapping, page);
-
--[[linux-4.4.1/__flush_dcache_page()]]

                 if (mapping && cache_is_vivt())
                         __flush_dcache_aliases(mapping, page);
-
--[[linux-4.4.1/cache_is_vivt()]]
--[[linux-4.4.1/__flush_dcache_aliases()]]

                 else if (mapping)
                         __flush_icache_all();
-
--[[linux-4.4.1/__flush_icache_all()]]

                 set_bit(PG_dcache_clean, &page->flags);
-
--[[linux-4.4.1/set_bit()]]

         }
 }
 EXPORT_SYMBOL(flush_dcache_page);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]


*コメント [#waa4e05d]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS