X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Fmm%2Fcache.c;h=abf99b1eba136b3742ff10b791c45f8d0684ed4f;hb=b643b0fdbc59cf6bbb086974b29d2571e9e9f646;hp=1f954a238a6332b0d8aaa0a4dde2fc5903f4f225;hpb=b361735043e3001eadb1d40916fd1a4fca1a9363;p=pandora-kernel.git diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 1f954a238a63..abf99b1eba13 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 #include @@ -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(); + } +} + +EXPORT_SYMBOL(__flush_anon_page); + void __update_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) { @@ -107,8 +121,6 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address, } } -#define __weak __attribute__((weak)) - static char cache_panic[] __initdata = "Yeee, unsupported cache architecture."; void __init cpu_cache_init(void)