patch-2.1.125 linux/arch/m68k/mm/memory.c

Next file: linux/arch/ppc/config.in
Previous file: linux/arch/m68k/mac/via6522.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.124/linux/arch/m68k/mm/memory.c linux/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 @@
  * 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 @@
 		      "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 @@
 		      "movec %/d0,%/cacr"
 		      : : "i" (FLUSH_I)
 		      : "d0");
+#ifdef CONFIG_M68K_L2_CACHE
+    if(mach_l2_flush)
+    	mach_l2_flush(1);
+#endif
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov