Merge to Fedora kernel-2.6.7-1.441
[linux-2.6.git] / arch / arm / mm / fault-armv.c
index 81485b5..d03940c 100644 (file)
@@ -8,6 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -75,7 +76,7 @@ no_pmd:
        return 0;
 }
 
-void __flush_dcache_page(struct page *page)
+static void __flush_dcache_page(struct page *page)
 {
        struct address_space *mapping = page_mapping(page);
        struct mm_struct *mm = current->active_mm;
@@ -111,6 +112,17 @@ void __flush_dcache_page(struct page *page)
        flush_dcache_mmap_unlock(mapping);
 }
 
+void flush_dcache_page(struct page *page)
+{
+       struct address_space *mapping = page_mapping(page);
+
+       if (mapping && !mapping_mapped(mapping))
+               set_bit(PG_dcache_dirty, &page->flags);
+       else
+               __flush_dcache_page(page);
+}
+EXPORT_SYMBOL(flush_dcache_page);
+
 static void
 make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, int dirty)
 {