Module Name: src Committed By: skrll Date: Thu Jan 23 17:32:03 UTC 2014
Modified Files: src/sys/kern: subr_pcu.c Log Message: Pass PCU_LOADED to pcu_state_load in the "this CPU already has our PCU state loaded" of pcu_load. ok, gimpy@ and rmind@ To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_pcu.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/kern/subr_pcu.c diff -u src/sys/kern/subr_pcu.c:1.16 src/sys/kern/subr_pcu.c:1.17 --- src/sys/kern/subr_pcu.c:1.16 Tue Nov 26 20:29:40 2013 +++ src/sys/kern/subr_pcu.c Thu Jan 23 17:32:03 2014 @@ -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 @@ pcu_load(const pcu_ops_t *pcu) /* 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; }