Module Name:    src
Committed By:   matt
Date:           Fri Dec 17 04:49:25 UTC 2010

Modified Files:
        src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c

Log Message:
When doing MP, make sure the TLB is global mode (shared among all threads).


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/sys/arch/evbmips/rmixl/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbmips/rmixl/machdep.c
diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.30 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.31
--- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.30	Tue Aug 17 00:52:33 2010
+++ src/sys/arch/evbmips/rmixl/machdep.c	Fri Dec 17 04:49:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.1.2.30 2010/08/17 00:52:33 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.1.2.31 2010/12/17 04:49:24 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.30 2010/08/17 00:52:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.31 2010/12/17 04:49:24 matt Exp $");
 
 #define __INTR_PRIVATE
 
@@ -287,7 +287,13 @@
 	uint32_t r;
 	extern char edata[], end[];
 
-#ifndef MULTIPROCESSOR
+#ifdef MULTIPROCESSOR
+	r = rmixl_mfcr(0x400);
+	r |= __BIT(0);			/* enable global TLB mode */
+	rmixl_mtcr(0x400, r);		/* enable MMU clock gating */
+					/* preserve MMU Thread Mode */
+					/* TLB is not paritioned (global) */
+#else
 	rmixl_mtcr(0, 1);		/* disable all threads except #0 */
 	rmixl_mtcr(0x400, 0);		/* enable MMU clock gating */
 					/* set single MMU Thread Mode */

Reply via email to