summaryrefslogtreecommitdiff
path: root/sys/dev/lockstat.c
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-02-15 20:32:47 +0000
committerad <ad@NetBSD.org>2007-02-15 20:32:47 +0000
commit087fdb908075d6767f5c8d7e894a2ea1321324c1 (patch)
tree2fb75a4202e951c109e95658cc88522a46175204 /sys/dev/lockstat.c
parent2a34d8467ad784c4d69989029a92852227356505 (diff)
Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
have each CPU register at attach, so we can figure out the topology for the scheduler.
Diffstat (limited to 'sys/dev/lockstat.c')
-rw-r--r--sys/dev/lockstat.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/lockstat.c b/sys/dev/lockstat.c
index 7b905bc8763..27d72eafa9a 100644
--- a/sys/dev/lockstat.c
+++ b/sys/dev/lockstat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lockstat.c,v 1.6 2007/02/09 21:55:26 ad Exp $ */
+/* $NetBSD: lockstat.c,v 1.7 2007/02/15 20:32:47 ad Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.6 2007/02/09 21:55:26 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.7 2007/02/15 20:32:47 ad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -176,7 +176,7 @@ lockstat_unlock(int unbusy)
void
lockstat_init_tables(lsenable_t *le)
{
- int i, ncpu, per, slop, cpuno;
+ int i, per, slop, cpuno;
CPU_INFO_ITERATOR cii;
struct cpu_info *ci;
lscpu_t *lc;
@@ -184,13 +184,11 @@ lockstat_init_tables(lsenable_t *le)
KASSERT(!lockstat_enabled);
- ncpu = 0;
for (CPU_INFO_FOREACH(cii, ci)) {
if (ci->ci_lockstat != NULL) {
free(ci->ci_lockstat, M_LOCKSTAT);
ci->ci_lockstat = NULL;
}
- ncpu++;
}
if (le == NULL)