diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index a44ef73d45e2..d5c86902b09f 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.129 2009/08/18 21:38:41 cegger Exp $ */ +/* $NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.129 2009/08/18 21:38:41 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -244,8 +244,11 @@ acpi_probe(void) rv = AcpiInitializeTables(acpi_initial_tables, 128, 0); if (ACPI_FAILURE(rv)) { +#ifdef ACPI_DEBUG printf("ACPI: unable to initialize ACPI tables: %s\n", AcpiFormatException(rv)); +#endif + AcpiTerminate(); return 0; } @@ -253,6 +256,7 @@ acpi_probe(void) if (ACPI_FAILURE(rv)) { printf("ACPI: unable to reallocate root table: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } @@ -265,12 +269,14 @@ acpi_probe(void) if (ACPI_FAILURE(rv)) { printf("ACPI: unable to load tables: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } rsdt = acpi_map_rsdt(); if (rsdt == NULL) { printf("ACPI: unable to map RSDT\n"); + AcpiTerminate(); return 0; } @@ -284,6 +290,7 @@ acpi_probe(void) rsdt->AslCompilerRevision); printf("ACPI: not used. set acpi_force_load to use anyway.\n"); acpi_unmap_rsdt(rsdt); + AcpiTerminate(); return 0; } @@ -296,6 +303,7 @@ acpi_probe(void) if (ACPI_FAILURE(rv)) { printf("ACPI: unable to initialise SystemMemory handler: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, @@ -303,6 +311,7 @@ acpi_probe(void) if (ACPI_FAILURE(rv)) { printf("ACPI: unable to initialise SystemIO handler: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } rv = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, @@ -310,6 +319,7 @@ acpi_probe(void) if (ACPI_FAILURE(rv)) { printf("ACPI: unabled to initialise PciConfig handler: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } #endif @@ -317,6 +327,7 @@ acpi_probe(void) rv = AcpiEnableSubsystem(~(ACPI_NO_HARDWARE_INIT|ACPI_NO_ACPI_ENABLE)); if (ACPI_FAILURE(rv)) { printf("ACPI: unable to enable: %s\n", AcpiFormatException(rv)); + AcpiTerminate(); return 0; } diff --git a/sys/dev/acpi/acpi_osd.h b/sys/dev/acpi/acpi_osd.h index ff5388a0a9a1..ef1267f1a696 100644 --- a/sys/dev/acpi/acpi_osd.h +++ b/sys/dev/acpi/acpi_osd.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_osd.h,v 1.1 2001/09/28 02:09:23 thorpej Exp $ */ +/* $NetBSD: acpi_osd.h,v 1.2 2009/08/23 15:16:16 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -45,4 +45,3 @@ void acpi_osd_debugger(void); /* Osd/OsdSchedule.c */ void acpi_osd_sched_init(void); -void acpi_osd_sched_fini(void); diff --git a/sys/dev/acpi/acpica/OsdEnvironment.c b/sys/dev/acpi/acpica/OsdEnvironment.c index 0e175a28d207..ae25157a8404 100644 --- a/sys/dev/acpi/acpica/OsdEnvironment.c +++ b/sys/dev/acpi/acpica/OsdEnvironment.c @@ -1,4 +1,4 @@ -/* $NetBSD: OsdEnvironment.c,v 1.4 2009/08/18 16:41:02 jmcneill Exp $ */ +/* $NetBSD: OsdEnvironment.c,v 1.5 2009/08/23 15:16:16 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: OsdEnvironment.c,v 1.4 2009/08/18 16:41:02 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: OsdEnvironment.c,v 1.5 2009/08/23 15:16:16 jmcneill Exp $"); #include @@ -77,9 +77,6 @@ AcpiOsInitialize(void) ACPI_STATUS AcpiOsTerminate(void) { - /* Tear down the Osd Scheduler. */ - acpi_osd_sched_fini(); - return acpi_md_OsTerminate(); } diff --git a/sys/dev/acpi/acpica/OsdSchedule.c b/sys/dev/acpi/acpica/OsdSchedule.c index 3d10a06233e5..2b212bb6ac67 100644 --- a/sys/dev/acpi/acpica/OsdSchedule.c +++ b/sys/dev/acpi/acpica/OsdSchedule.c @@ -1,4 +1,4 @@ -/* $NetBSD: OsdSchedule.c,v 1.11 2009/08/18 16:41:02 jmcneill Exp $ */ +/* $NetBSD: OsdSchedule.c,v 1.12 2009/08/23 15:16:16 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.11 2009/08/18 16:41:02 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.12 2009/08/23 15:16:16 jmcneill Exp $"); #include #include @@ -79,17 +79,6 @@ acpi_osd_sched_init(void) cv_init(&acpi_osd_sleep_cv, "acpislp"); } -/* - * acpi_osd_sched_fini: - * - * Clean up the ACPICA Osd scheduler. Called from AcpiOsdTerminate(). - */ -void -acpi_osd_sched_fini(void) -{ - sysmon_task_queue_fini(); -} - /* * AcpiOsGetThreadId: *