* 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>
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;
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)
{