Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern KERNEL_LOCK(9): Limit ipi trace diagnostic to after...
details: https://anonhg.NetBSD.org/src/rev/d33c31d09247
branches: trunk
changeset: 369532:d33c31d09247
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 20 23:37:12 2022 +0000
description:
KERNEL_LOCK(9): Limit ipi trace diagnostic to after init has started.
diffstat:
sys/kern/kern_lock.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 27e4e1061b71 -r d33c31d09247 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c Sat Aug 20 23:26:02 2022 +0000
+++ b/sys/kern/kern_lock.c Sat Aug 20 23:37:12 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lock.c,v 1.177 2022/08/16 21:23:37 riastradh Exp $ */
+/* $NetBSD: kern_lock.c,v 1.178 2022/08/20 23:37:12 riastradh 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.177 2022/08/16 21:23:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.178 2022/08/20 23:37:12 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_lockdebug.h"
@@ -253,8 +253,8 @@
splx(s);
while (__SIMPLELOCK_LOCKED_P(kernel_lock)) {
#ifdef LOCKDEBUG
- if (SPINLOCK_SPINOUT(spins)) {
- extern int start_init_exec;
+ extern int start_init_exec;
+ if (SPINLOCK_SPINOUT(spins) && start_init_exec) {
ipi_msg_t msg = {
.func = kernel_lock_trace_ipi,
};
@@ -262,8 +262,7 @@
ipi_unicast(&msg, kernel_lock_holder);
ipi_wait(&msg);
kpreempt_enable();
- if (start_init_exec)
- _KERNEL_LOCK_ABORT("spinout");
+ _KERNEL_LOCK_ABORT("spinout");
}
SPINLOCK_BACKOFF_HOOK;
SPINLOCK_SPIN_HOOK;
Home |
Main Index |
Thread Index |
Old Index