From: Geert Uytterhoeven <geert@linux-m68k.org>

M68k: Use a constant m68k_supervisor_cachemode only if we know it's safe,
otherwise use the value from head.S (from Roman Zippel)



 include/asm-m68k/motorola_pgtable.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff -puN include/asm-m68k/motorola_pgtable.h~68k-345 include/asm-m68k/motorola_pgtable.h
--- 25/include/asm-m68k/motorola_pgtable.h~68k-345	2004-01-01 13:35:07.000000000 -0800
+++ 25-akpm/include/asm-m68k/motorola_pgtable.h	2004-01-01 13:35:07.000000000 -0800
@@ -41,10 +41,14 @@ extern int m68k_pgtable_cachemode;
  * processors >= '040. It is used in pte_mkcache(), and the variable is
  * defined and initialized in head.S */
 
-#if defined(CONFIG_060_WRITETHROUGH)
-extern int m68k_supervisor_cachemode;
-#else
+#if defined(CPU_M68060_ONLY) && defined(CONFIG_060_WRITETHROUGH)
+#define m68k_supervisor_cachemode _PAGE_CACHE040W
+#elif defined(CPU_M68040_OR_M68060_ONLY)
 #define m68k_supervisor_cachemode _PAGE_CACHE040
+#elif defined(CPU_M68020_OR_M68030_ONLY)
+#define m68k_supervisor_cachemode 0
+#else
+extern int m68k_supervisor_cachemode;
 #endif
 
 #if defined(CPU_M68040_OR_M68060_ONLY)

_