patch-2.1.101 linux/arch/mips/sni/pcimt_scache.c

Next file: linux/arch/mips/sni/setup.c
Previous file: linux/arch/mips/sni/pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/arch/mips/sni/pcimt_scache.c linux/arch/mips/sni/pcimt_scache.c
@@ -0,0 +1,34 @@
+/*
+ * arch/mips/sni/pcimt_scache.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (c) 1997 by Ralf Baechle
+ *
+ * $Id: pcimt_scache.c,v 1.1 1998/03/04 08:47:29 ralf Exp $
+ */
+#include <linux/init.h>
+#include <asm/bcache.h>
+#include <asm/sni.h>
+
+__initfunc(void sni_pcimt_sc_init(void))
+{
+	unsigned int cacheconf, sc_size;
+
+	cacheconf = *(volatile unsigned int *)PCIMT_CACHECONF;
+	if ((cacheconf & 7) == 0) {
+		printk("No second level cache detected\n");
+		printk("WARNING: not activating second level cache, "
+		       "tell ralf@gnu.org\n");
+		return;
+	}
+	if ((cacheconf & 7) >= 6) {
+		printk("Invalid second level cache size detected\n");
+		return;
+	}
+	
+	sc_size = 128 << (cacheconf & 7);
+	printk("%dkb second level cache detected.\n", sc_size);
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov