diff options
Diffstat (limited to 'arch/mips/mm/cache.c')
-rw-r--r-- | arch/mips/mm/cache.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 31819c58bffa..4e8f1b683376 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1994 - 2003 by Ralf Baechle | 6 | * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (C) 2007 MIPS Technologies, Inc. | ||
7 | */ | 8 | */ |
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
@@ -88,6 +89,19 @@ void __flush_dcache_page(struct page *page) | |||
88 | 89 | ||
89 | EXPORT_SYMBOL(__flush_dcache_page); | 90 | EXPORT_SYMBOL(__flush_dcache_page); |
90 | 91 | ||
92 | void __flush_anon_page(struct page *page, unsigned long vmaddr) | ||
93 | { | ||
94 | if (pages_do_alias((unsigned long)page_address(page), vmaddr)) { | ||
95 | void *kaddr; | ||
96 | |||
97 | kaddr = kmap_coherent(page, vmaddr); | ||
98 | flush_data_cache_page((unsigned long)kaddr); | ||
99 | kunmap_coherent(kaddr); | ||
100 | } | ||
101 | } | ||
102 | |||
103 | EXPORT_SYMBOL(__flush_anon_page); | ||
104 | |||
91 | void __update_cache(struct vm_area_struct *vma, unsigned long address, | 105 | void __update_cache(struct vm_area_struct *vma, unsigned long address, |
92 | pte_t pte) | 106 | pte_t pte) |
93 | { | 107 | { |