diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-03-23 22:36:37 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-24 18:01:49 +0100 |
commit | 7575a49f209190ca640e0da792565a1bcb641f3e (patch) | |
tree | db47f9fe06fefd279841941c5ff6f8d63dc54c45 /arch/mips/mm/cache.c | |
parent | [MIPS] SPARSEMEM: The first pfn of zone should be min_low_pfn, not 0. (diff) | |
download | linux-7575a49f209190ca640e0da792565a1bcb641f3e.tar.xz linux-7575a49f209190ca640e0da792565a1bcb641f3e.zip |
[MIPS] Implement flush_anon_page().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1994 - 2003 by Ralf Baechle + * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org) + * Copyright (C) 2007 MIPS Technologies, Inc. */ #include <linux/init.h> #include <linux/kernel.h> @@ -88,6 +89,19 @@ void __flush_dcache_page(struct page *page) EXPORT_SYMBOL(__flush_dcache_page); +void __flush_anon_page(struct page *page, unsigned long vmaddr) +{ + if (pages_do_alias((unsigned long)page_address(page), vmaddr)) { + void *kaddr; + + kaddr = kmap_coherent(page, vmaddr); + flush_data_cache_page((unsigned long)kaddr); + kunmap_coherent(kaddr); + } +} + +EXPORT_SYMBOL(__flush_anon_page); + void __update_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) { |