Module Name:    src
Committed By:   matt
Date:           Thu Apr 14 15:44:39 UTC 2011

Modified Files:
        src/sys/arch/mips/mips: cpu_subr.c

Log Message:
Only set userlocal register if l == curlwp in cpu_set_lwpprivate.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/mips/cpu_subr.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/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.9 src/sys/arch/mips/mips/cpu_subr.c:1.10
--- src/sys/arch/mips/mips/cpu_subr.c:1.9	Thu Apr 14 06:54:57 2011
+++ src/sys/arch/mips/mips/cpu_subr.c	Thu Apr 14 15:44:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.9 2011/04/14 06:54:57 cliff Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.10 2011/04/14 15:44:39 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.9 2011/04/14 06:54:57 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.10 2011/04/14 15:44:39 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -1006,7 +1006,8 @@
 cpu_lwp_setprivate(lwp_t *l, void *v)
 {
 #if (MIPS32R2 + MIPS64R2) > 0
-	if (mips_options.mips_cpu->cpu_cp0flags & MIPS_CP0FL_USERLOCAL) {
+	if (l == curlwp
+	    && (mips_options.mips_cpu->cpu_cp0flags & MIPS_CP0FL_USERLOCAL)) {
 		mipsNN_cp0_userlocal_write(v);
 	}
 #endif

Reply via email to