1 --- a/arch/mips/Kconfig
2 +++ b/arch/mips/Kconfig
3 @@ -198,7 +198,6 @@ config MIPS_MALTA
7 - select MIPS_CPU_SCACHE
8 select PCI_GT64XXX_PCI0
11 @@ -1395,13 +1394,6 @@ config IP22_CPU_SCACHE
16 -# Support for a MIPS32 / MIPS64 style S-caches
18 -config MIPS_CPU_SCACHE
22 config R5000_CPU_SCACHE
25 --- a/arch/mips/kernel/cpu-probe.c
26 +++ b/arch/mips/kernel/cpu-probe.c
27 @@ -755,6 +755,8 @@ static inline void cpu_probe_mips(struct
29 c->cputype = CPU_25KF;
30 __cpu_name[cpu] = "MIPS 25Kc";
31 + /* Probe for L2 cache */
32 + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
36 --- a/arch/mips/mm/Makefile
37 +++ b/arch/mips/mm/Makefile
38 @@ -31,6 +31,5 @@ obj-$(CONFIG_CPU_VR41XX) += c-r4k.o cex-
39 obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
40 obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
41 obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
42 -obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
44 EXTRA_CFLAGS += -Werror
45 --- a/arch/mips/mm/c-r4k.c
46 +++ b/arch/mips/mm/c-r4k.c
47 @@ -1121,7 +1121,6 @@ static void __init loongson2_sc_init(voi
49 extern int r5k_sc_init(void);
50 extern int rm7k_sc_init(void);
51 -extern int mips_sc_init(void);
53 static void __cpuinit setup_scache(void)
55 @@ -1175,29 +1174,17 @@ static void __cpuinit setup_scache(void)
59 - if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
60 - c->isa_level == MIPS_CPU_ISA_M32R2 ||
61 - c->isa_level == MIPS_CPU_ISA_M64R1 ||
62 - c->isa_level == MIPS_CPU_ISA_M64R2) {
63 -#ifdef CONFIG_MIPS_CPU_SCACHE
64 - if (mips_sc_init ()) {
65 - scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
66 - printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
68 - way_string[c->scache.ways], c->scache.linesz);
71 - if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
72 - panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
82 + if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
83 + c->isa_level == MIPS_CPU_ISA_M64R1) &&
84 + !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
85 + panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
87 /* compute a couple of other cache variables */
88 c->scache.waysize = scache_size / c->scache.ways;