Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Only set userlocal register if l == curlw...



details:   https://anonhg.NetBSD.org/src/rev/8c3f41c97655
branches:  trunk
changeset: 764251:8c3f41c97655
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Apr 14 15:44:39 2011 +0000

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

diffstat:

 sys/arch/mips/mips/cpu_subr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r b581fdb0fc66 -r 8c3f41c97655 sys/arch/mips/mips/cpu_subr.c
--- a/sys/arch/mips/mips/cpu_subr.c     Thu Apr 14 15:42:02 2011 +0000
+++ b/sys/arch/mips/mips/cpu_subr.c     Thu Apr 14 15:44:39 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index