aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault-armv.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-25 06:23:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-01 13:20:07 -0500
commit421fe93cc4b06b2f5e875cbe0f692800d4862ee5 (patch)
tree88c5985799273a7c854159246d715e1ad85646f9 /arch/arm/mm/fault-armv.c
parentb7dc0b2cfc6e9bc7270915c642a8a8e999b6095e (diff)
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.c7
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)
151 if (!pfn_valid(pfn)) 151 if (!pfn_valid(pfn))
152 return; 152 return;
153 153
154 /*
155 * The zero page is never written to, so never has any dirty
156 * cache lines, and therefore never needs to be flushed.
157 */
154 page = pfn_to_page(pfn); 158 page = pfn_to_page(pfn);
159 if (page == ZERO_PAGE(0))
160 return;
161
155 mapping = page_mapping(page); 162 mapping = page_mapping(page);
156#ifndef CONFIG_SMP 163#ifndef CONFIG_SMP
157 if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) 164 if (test_and_clear_bit(PG_dcache_dirty, &page->flags))