diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-19 17:53:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-19 17:53:40 +0000 |
commit | 90fdb320e64210bdbea1cbe460e0fd5a61de71ad (patch) | |
tree | d58d3e0e09bd2abce80e0a9ed2d88472969ba063 /sys/dev/acpi | |
parent | c9eacd92073efd8ad00f150bc65934fcd0b10192 (diff) |
Count number of cpus found (potentially not attached) and store that
in sysctl hw.ncpufound; ok miod kettenis
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpimadt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpimadt.c b/sys/dev/acpi/acpimadt.c index e0a8c9fd66b..6397c462617 100644 --- a/sys/dev/acpi/acpimadt.c +++ b/sys/dev/acpi/acpimadt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpimadt.c,v 1.22 2009/02/16 20:11:06 kettenis Exp $ */ +/* $OpenBSD: acpimadt.c,v 1.23 2009/04/19 17:53:39 deraadt Exp $ */ /* * Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org> * @@ -240,8 +240,10 @@ acpimadt_attach(struct device *parent, struct device *self, void *aux) memset(&caa, 0, sizeof(struct cpu_attach_args)); if (lapic_cpu_number() == entry->madt_lapic.apic_id) caa.cpu_role = CPU_ROLE_BP; - else + else { caa.cpu_role = CPU_ROLE_AP; + ncpusfound++; + } caa.caa_name = "cpu"; caa.cpu_number = entry->madt_lapic.apic_id; #ifdef MULTIPROCESSOR |