[PATCH 345] M68k cache mode

From: Geert Uytterhoeven
Date: Thu Jan 01 2004 - 16:50:34 EST


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

--- linux-2.6.0/include/asm-m68k/motorola_pgtable.h 11 Jul 2003 15:18:46 -0000 1.8
+++ linux-m68k-2.6.0/include/asm-m68k/motorola_pgtable.h 16 Oct 2003 20:56:07 -0000
@@ -41,10 +41,14 @@
* 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)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/