summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-04-19 18:02:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-04-19 18:02:58 +0000
commit0c4a2dbb18b1d5de0843e0e04ed970771aa6632b (patch)
treec81a45f67e569d2a3161ba2ccbb02674ba2c1ecb /sys/arch
parent74ee683870532751e5b076004e960d3bdf0610e0 (diff)
Count number of cpus found (potentially not attached) and store that
in sysctl hw.ncpufound; ok miod kettenis
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/mpbios.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c
index 63fb6172255..0367c66de2c 100644
--- a/sys/arch/i386/i386/mpbios.c
+++ b/sys/arch/i386/i386/mpbios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpbios.c,v 1.31 2009/01/13 19:38:44 grange Exp $ */
+/* $OpenBSD: mpbios.c,v 1.32 2009/04/19 18:02:57 deraadt Exp $ */
/* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */
/*-
@@ -744,8 +744,10 @@ mpbios_cpu(const u_int8_t *ent, struct device *self)
/* check for BSP flag */
if (entry->cpu_flags & PROCENTRY_FLAG_BP)
caa.cpu_role = CPU_ROLE_BP;
- else
+ else {
caa.cpu_role = CPU_ROLE_AP;
+ ncpusfound++;
+ }
caa.caa_name = "cpu";
caa.cpu_number = entry->apic_id;