]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/mm/cache.c
x86: add cpu init function defintions to cpu.h
[linux-2.6-omap-h63xx.git] / arch / mips / mm / cache.c
index abf99b1eba136b3742ff10b791c45f8d0684ed4f..81f30ac2bff95fe7c406e3dcf7429899c0e74380 100644 (file)
@@ -3,11 +3,14 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
+ * Copyright (C) 1994 - 2003, 06, 07 by Ralf Baechle (ralf@linux-mips.org)
  * Copyright (C) 2007 MIPS Technologies, Inc.
  */
+#include <linux/fs.h>
+#include <linux/fcntl.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/linkage.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
@@ -44,8 +47,6 @@ void (*_dma_cache_wback)(unsigned long start, unsigned long size);
 void (*_dma_cache_inv)(unsigned long start, unsigned long size);
 
 EXPORT_SYMBOL(_dma_cache_wback_inv);
-EXPORT_SYMBOL(_dma_cache_wback);
-EXPORT_SYMBOL(_dma_cache_inv);
 
 #endif /* CONFIG_DMA_NONCOHERENT */
 
@@ -155,12 +156,14 @@ void __init cpu_cache_init(void)
                tx39_cache_init();
                return;
        }
-       if (cpu_has_sb1_cache) {
-               extern void __weak sb1_cache_init(void);
-
-               sb1_cache_init();
-               return;
-       }
 
        panic(cache_panic);
 }
+
+int __weak __uncached_access(struct file *file, unsigned long addr)
+{
+       if (file->f_flags & O_SYNC)
+               return 1;
+
+       return addr >= __pa(high_memory);
+}