1 --- a/arch/mips/Kconfig
2 +++ b/arch/mips/Kconfig
7 - select MIPS_CPU_SCACHE
8 select PCI_GT64XXX_PCI0
11 @@ -1421,13 +1420,6 @@
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
30 c->cputype = CPU_25KF;
31 + /* Probe for L2 cache */
32 + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
36 --- a/arch/mips/mm/c-r4k.c
37 +++ b/arch/mips/mm/c-r4k.c
40 extern int r5k_sc_init(void);
41 extern int rm7k_sc_init(void);
42 -extern int mips_sc_init(void);
44 static void __cpuinit setup_scache(void)
46 @@ -1157,29 +1156,17 @@
50 - if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
51 - c->isa_level == MIPS_CPU_ISA_M32R2 ||
52 - c->isa_level == MIPS_CPU_ISA_M64R1 ||
53 - c->isa_level == MIPS_CPU_ISA_M64R2) {
54 -#ifdef CONFIG_MIPS_CPU_SCACHE
55 - if (mips_sc_init ()) {
56 - scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
57 - printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
59 - way_string[c->scache.ways], c->scache.linesz);
62 - if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
63 - panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
73 + if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
74 + c->isa_level == MIPS_CPU_ISA_M64R1) &&
75 + !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
76 + panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
78 /* compute a couple of other cache variables */
79 c->scache.waysize = scache_size / c->scache.ways;
81 --- a/arch/mips/mm/Makefile
82 +++ b/arch/mips/mm/Makefile
84 obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
85 obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
86 obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
87 -obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
89 EXTRA_CFLAGS += -Werror