summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-06-26 18:12:24 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-06-26 18:12:24 +0000
commit5540f4970fd1fdb082f42515c0ceb112e95fc98b (patch)
tree423d79320ddf731f7e252aa8332507ab3476168c /sys
parent9c6818c61341b35b8d47058a12aba5e7db7951fc (diff)
Completely skip entries for disabled LAPICs so they don't overwrite
legit enabled ones problem reported by Pedro Caetano (pedrocaetano (at) binaryflows.com) ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpimadt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpi/acpimadt.c b/sys/dev/acpi/acpimadt.c
index 5b65ec575f8..f2247286f4e 100644
--- a/sys/dev/acpi/acpimadt.c
+++ b/sys/dev/acpi/acpimadt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpimadt.c,v 1.31 2015/02/09 08:15:19 kettenis Exp $ */
+/* $OpenBSD: acpimadt.c,v 1.32 2015/06/26 18:12:23 guenther Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
@@ -239,14 +239,14 @@ acpimadt_attach(struct device *parent, struct device *self, void *aux)
entry->madt_lapic.apic_id,
entry->madt_lapic.flags);
+ if ((entry->madt_lapic.flags & ACPI_PROC_ENABLE) == 0)
+ break;
+
lapic_map[entry->madt_lapic.acpi_proc_id] =
entry->madt_lapic.apic_id;
acpi_lapic_flags[entry->madt_lapic.acpi_proc_id] =
entry->madt_lapic.flags;
- if ((entry->madt_lapic.flags & ACPI_PROC_ENABLE) == 0)
- break;
-
memset(&caa, 0, sizeof(struct cpu_attach_args));
if (lapic_cpu_number() == entry->madt_lapic.apic_id)
caa.cpu_role = CPU_ROLE_BP;