Module Name: src
Committed By: skrll
Date: Sun Oct 31 16:26:26 UTC 2021
Modified Files:
src/sys/kern: kern_lock.c
Log Message:
Revert the 2015 change I made that allowed sleeping in the idle lwp
if it wasn't running yet, e.g. in cpu_hatch
---
sys/kern/kern_lock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 40557427de86..c0c9d8adaf9e 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -89,8 +89,7 @@ assert_sleepable(void)
} while (pctr != lwp_pctr());
reason = NULL;
- if (idle && !cold &&
- kcpuset_isset(kcpuset_running, cpu_index(curcpu()))) {
+ if (idle && !cold) {
reason = "idle";
}
if (cpu_intr_p()) {
--
2.25.1
To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 src/sys/kern/kern_lock.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/kern_lock.c
diff -u src/sys/kern/kern_lock.c:1.172 src/sys/kern/kern_lock.c:1.173
--- src/sys/kern/kern_lock.c:1.172 Tue Dec 22 01:57:29 2020
+++ src/sys/kern/kern_lock.c Sun Oct 31 16:26:26 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lock.c,v 1.172 2020/12/22 01:57:29 ad Exp $ */
+/* $NetBSD: kern_lock.c,v 1.173 2021/10/31 16:26:26 skrll Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009, 2020 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.172 2020/12/22 01:57:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.173 2021/10/31 16:26:26 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_lockdebug.h"
@@ -89,8 +89,7 @@ assert_sleepable(void)
} while (pctr != lwp_pctr());
reason = NULL;
- if (idle && !cold &&
- kcpuset_isset(kcpuset_running, cpu_index(curcpu()))) {
+ if (idle && !cold) {
reason = "idle";
}
if (cpu_intr_p()) {