diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 8 | ||||
-rw-r--r-- | sys/dev/acpi/acpicpu.c | 11 | ||||
-rw-r--r-- | sys/dev/acpi/acpivar.h | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 5c396175413..93d802507c3 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.390 2020/08/16 16:08:10 gnezdo Exp $ */ +/* $OpenBSD: acpi.c,v 1.391 2020/08/27 01:08:55 jmatthew Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -1213,8 +1213,6 @@ acpi_attach_common(struct acpi_softc *sc, paddr_t base) /* check if we're running on a sony */ aml_find_node(&aml_root, "GBRT", acpi_foundsony, sc); - aml_walknodes(&aml_root, AML_WALK_PRE, acpi_add_device, sc); - #ifndef SMALL_KERNEL /* try to find smart battery first */ aml_find_node(&aml_root, "_HID", acpi_foundsbs, sc); @@ -1223,6 +1221,8 @@ acpi_attach_common(struct acpi_softc *sc, paddr_t base) /* attach battery, power supply and button devices */ aml_find_node(&aml_root, "_HID", acpi_foundhid, sc); + aml_walknodes(&aml_root, AML_WALK_PRE, acpi_add_device, sc); + #ifndef SMALL_KERNEL #if NWD > 0 /* Attach IDE bay */ @@ -2176,6 +2176,8 @@ acpi_add_device(struct aml_node *node, void *arg) switch (node->value->type) { case AML_OBJTYPE_PROCESSOR: + if (sc->sc_skip_processor != 0) + return 0; if (nacpicpus >= ncpus) return 0; if (aml_evalnode(sc, aaa.aaa_node, 0, NULL, &res) == 0) { diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c index 7357c149ae4..c8bf64edaa3 100644 --- a/sys/dev/acpi/acpicpu.c +++ b/sys/dev/acpi/acpicpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpicpu.c,v 1.87 2020/08/26 17:10:49 kettenis Exp $ */ +/* $OpenBSD: acpicpu.c,v 1.88 2020/08/27 01:08:55 jmatthew Exp $ */ /* * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> @@ -652,9 +652,16 @@ acpicpu_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aa = aux; struct cfdata *cf = match; + struct acpi_softc *acpi = (struct acpi_softc *)parent; - if (acpi_matchhids(aa, acpicpu_hids, cf->cf_driver->cd_name)) + if (acpi_matchhids(aa, acpicpu_hids, cf->cf_driver->cd_name)) { + /* + * Record that we've seen a Device() CPU object, + * so we won't attach any Processor() nodes. + */ + acpi->sc_skip_processor = 1; return (1); + } /* sanity */ if (aa->aaa_name == NULL || diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index f8e8f5fdce9..8b81c9e2cbc 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.110 2020/08/16 16:08:10 gnezdo Exp $ */ +/* $OpenBSD: acpivar.h,v 1.111 2020/08/27 01:08:55 jmatthew Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -278,6 +278,8 @@ struct acpi_softc { int sc_pse; /* passive cooling enabled */ int sc_flags; + + int sc_skip_processor; }; extern struct acpi_softc *acpi_softc; |