summaryrefslogtreecommitdiffstats
path: root/arch/m68k/mm/memory.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-03 17:49:53 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-03 17:49:53 +0000
commiteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (patch)
tree5746fea1605ff013be9b78a1556aaad7615d664a /arch/m68k/mm/memory.c
parent80ea5b1e15398277650e1197957053b5a71c08bc (diff)
Merge with Linux 2.1.131 plus some more MIPS goodies.
Diffstat (limited to 'arch/m68k/mm/memory.c')
-rw-r--r--arch/m68k/mm/memory.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c
index fb13d8257..39cc1d1a9 100644
--- a/arch/m68k/mm/memory.c
+++ b/arch/m68k/mm/memory.c
@@ -18,6 +18,7 @@
#include <asm/system.h>
#include <asm/traps.h>
#include <asm/io.h>
+#include <asm/machdep.h>
#ifdef CONFIG_AMIGA
#include <asm/amigahw.h>
#endif
@@ -554,6 +555,14 @@ unsigned long mm_ptov (unsigned long paddr)
* this?). So we have to push first and then additionally to invalidate.
*/
+#ifdef CONFIG_M68K_L2_CACHE
+/*
+ * Jes was worried about performance (urhh ???) so its optional
+ */
+
+extern void (*mach_l2_flush)(int) = NULL;
+#endif
+
/*
* cache_clear() semantics: Clear any cache entries for the area in question,
* without writing back dirty entries first. This is useful if the data will
@@ -593,6 +602,10 @@ void cache_clear (unsigned long paddr, int len)
"movec %/d0,%/cacr"
: : "i" (FLUSH_I_AND_D)
: "d0");
+#ifdef CONFIG_M68K_L2_CACHE
+ if(mach_l2_flush)
+ mach_l2_flush(0);
+#endif
}
@@ -641,6 +654,10 @@ void cache_push (unsigned long paddr, int len)
"movec %/d0,%/cacr"
: : "i" (FLUSH_I)
: "d0");
+#ifdef CONFIG_M68K_L2_CACHE
+ if(mach_l2_flush)
+ mach_l2_flush(1);
+#endif
}