1 Index: linux-2.6.25/arch/mips/Kconfig
2 ===================================================================
3 --- linux-2.6.25.orig/arch/mips/Kconfig 2008-04-26 21:57:10.000000000 +0100
4 +++ linux-2.6.25/arch/mips/Kconfig 2008-04-26 21:57:13.000000000 +0100
5 @@ -228,7 +228,6 @@ config MIPS_MALTA
9 - select MIPS_CPU_SCACHE
10 select PCI_GT64XXX_PCI0
13 @@ -1421,13 +1420,6 @@ config IP22_CPU_SCACHE
18 -# Support for a MIPS32 / MIPS64 style S-caches
20 -config MIPS_CPU_SCACHE
24 config R5000_CPU_SCACHE
27 Index: linux-2.6.25/arch/mips/kernel/cpu-probe.c
28 ===================================================================
29 --- linux-2.6.25.orig/arch/mips/kernel/cpu-probe.c 2008-04-26 21:56:21.000000000 +0100
30 +++ linux-2.6.25/arch/mips/kernel/cpu-probe.c 2008-04-26 21:57:13.000000000 +0100
31 @@ -704,6 +704,8 @@ static inline void cpu_probe_mips(struct
34 c->cputype = CPU_25KF;
35 + /* Probe for L2 cache */
36 + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
40 Index: linux-2.6.25/arch/mips/mm/c-r4k.c
41 ===================================================================
42 --- linux-2.6.25.orig/arch/mips/mm/c-r4k.c 2008-04-26 21:56:21.000000000 +0100
43 +++ linux-2.6.25/arch/mips/mm/c-r4k.c 2008-04-26 22:08:15.000000000 +0100
44 @@ -1103,7 +1103,6 @@ static void __init loongson2_sc_init(voi
46 extern int r5k_sc_init(void);
47 extern int rm7k_sc_init(void);
48 -extern int mips_sc_init(void);
50 static void __cpuinit setup_scache(void)
52 @@ -1157,29 +1156,17 @@ static void __cpuinit setup_scache(void)
56 - if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
57 - c->isa_level == MIPS_CPU_ISA_M32R2 ||
58 - c->isa_level == MIPS_CPU_ISA_M64R1 ||
59 - c->isa_level == MIPS_CPU_ISA_M64R2) {
60 -#ifdef CONFIG_MIPS_CPU_SCACHE
61 - if (mips_sc_init ()) {
62 - scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
63 - printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
65 - way_string[c->scache.ways], c->scache.linesz);
68 - if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
69 - panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
79 + if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
80 + c->isa_level == MIPS_CPU_ISA_M64R1) &&
81 + !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
82 + panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
84 /* compute a couple of other cache variables */
85 c->scache.waysize = scache_size / c->scache.ways;
87 Index: linux-2.6.25/arch/mips/mm/Makefile
88 ===================================================================
89 --- linux-2.6.25.orig/arch/mips/mm/Makefile 2008-04-26 21:56:21.000000000 +0100
90 +++ linux-2.6.25/arch/mips/mm/Makefile 2008-04-26 21:57:13.000000000 +0100
91 @@ -32,6 +32,5 @@ obj-$(CONFIG_CPU_VR41XX) += c-r4k.o cex-
92 obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
93 obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
94 obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
95 -obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
97 EXTRA_CFLAGS += -Werror