Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Pass PCU_LOADED to pcu_state_load in the "this CPU ...



details:   https://anonhg.NetBSD.org/src/rev/5a2bebd91523
branches:  trunk
changeset: 326257:5a2bebd91523
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jan 23 17:32:03 2014 +0000

description:
Pass PCU_LOADED to pcu_state_load in the "this CPU already has our PCU
state loaded" of pcu_load.

ok, gimpy@ and rmind@

diffstat:

 sys/kern/subr_pcu.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 81decd7b60f8 -r 5a2bebd91523 sys/kern/subr_pcu.c
--- a/sys/kern/subr_pcu.c       Thu Jan 23 17:21:06 2014 +0000
+++ b/sys/kern/subr_pcu.c       Thu Jan 23 17:32:03 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pcu.c,v 1.16 2013/11/26 20:29:40 rmind Exp $      */
+/*     $NetBSD: subr_pcu.c,v 1.17 2014/01/23 17:32:03 skrll Exp $      */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.16 2013/11/26 20:29:40 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.17 2014/01/23 17:32:03 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -352,7 +352,10 @@
        /* Does this CPU already have our PCU state loaded? */
        if (ci == curci) {
                KASSERT(curci->ci_pcu_curlwp[id] == l);
-               pcu->pcu_state_load(l, PCU_ENABLE);     /* Re-enable */
+               KASSERT(pcu_used_p(pcu));
+
+               /* Re-enable */
+               pcu->pcu_state_load(l, PCU_LOADED | PCU_ENABLE);
                splx(s);
                return;
        }



Home | Main Index | Thread Index | Old Index