diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-25 11:23:04 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-01 19:20:07 +0100 |
commit | 421fe93cc4b06b2f5e875cbe0f692800d4862ee5 (patch) | |
tree | 88c5985799273a7c854159246d715e1ad85646f9 /arch/arm/mm/fault-armv.c | |
parent | ARM: Avoid evaluating page_address() multiple times (diff) | |
download | linux-421fe93cc4b06b2f5e875cbe0f692800d4862ee5.tar.xz linux-421fe93cc4b06b2f5e875cbe0f692800d4862ee5.zip |
ARM: ZERO_PAGE: Avoid flush_dcache_page() for zero page
The zero page is read-only, and has its cache state cleared during
boot. No further maintanence for this page is required.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/fault-armv.c')
-rw-r--r-- | arch/arm/mm/fault-armv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index d0d17b6a3703..4fbc7de8b4ac 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -151,7 +151,14 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) if (!pfn_valid(pfn)) return; + /* + * The zero page is never written to, so never has any dirty + * cache lines, and therefore never needs to be flushed. + */ page = pfn_to_page(pfn); + if (page == ZERO_PAGE(0)) + return; + mapping = page_mapping(page); #ifndef CONFIG_SMP if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) |