Module Name: src
Committed By: rin
Date: Sun May 31 09:59:37 UTC 2020
Modified Files:
src/sys/kern: kern_timeout.c
Log Message:
Switch to db_alloc() from kmem_intr_alloc(9).
Fix build failure as a part of crash(8).
Noticed by tnn@, thanks!
To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/kern/kern_timeout.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_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.62 src/sys/kern/kern_timeout.c:1.63
--- src/sys/kern/kern_timeout.c:1.62 Sun May 31 08:33:47 2020
+++ src/sys/kern/kern_timeout.c Sun May 31 09:59:37 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_timeout.c,v 1.62 2020/05/31 08:33:47 rin Exp $ */
+/* $NetBSD: kern_timeout.c,v 1.63 2020/05/31 09:59:37 rin Exp $ */
/*-
* Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.62 2020/05/31 08:33:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.63 2020/05/31 09:59:37 rin Exp $");
/*
* Timeouts are kept in a hierarchical timing wheel. The c_time is the
@@ -102,6 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_timeout
#include <ddb/db_interface.h>
#include <ddb/db_access.h>
#include <ddb/db_cpu.h>
+#include <ddb/db_command.h>
#include <ddb/db_sym.h>
#include <ddb/db_output.h>
#endif
@@ -798,7 +799,7 @@ callout_softclock(void *v)
cc->cc_lwp = NULL;
mutex_spin_exit(cc->cc_lock);
}
-#endif
+#endif /* !CRASH */
#ifdef DDB
static void
@@ -844,14 +845,14 @@ db_show_callout(db_expr_t addr, bool had
#endif
db_printf(" ticks wheel arg func\n");
- ccp = kmem_intr_alloc(ccs, KM_NOSLEEP); /* XXX ddb */
+ ccp = db_alloc(ccs);
if (ccp == NULL) {
db_printf("%s: cannot allocate callout_cpu\n", __func__);
return;
}
- cip = kmem_intr_alloc(cis, KM_NOSLEEP); /* XXX ddb */
+ cip = db_alloc(cis);
if (cip == NULL) {
- kmem_intr_free(ccp, ccs);
+ db_free(ccp, ccs);
db_printf("%s: cannot allocate cpu_info\n", __func__);
return;
}
@@ -877,7 +878,7 @@ db_show_callout(db_expr_t addr, bool had
}
}
- kmem_intr_free(ccp, ccs);
- kmem_intr_free(cip, cis);
+ db_free(ccp, ccs);
+ db_free(cip, cis);
}
#endif /* DDB */