Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Always declare HALT as available. If ACPI_FADT_...



details:   https://anonhg.NetBSD.org/src/rev/01961ba427ae
branches:  trunk
changeset: 762509:01961ba427ae
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Feb 22 09:39:48 2011 +0000

description:
Always declare HALT as available. If ACPI_FADT_C1_SUPPORTED is not
set in the FADT, print a warning, as it is obviously a BIOS bug.

diffstat:

 sys/dev/acpi/acpi_cpu_cstate.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 5325064b779b -r 01961ba427ae sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c    Tue Feb 22 09:34:13 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c    Tue Feb 22 09:39:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.38 2011/02/22 09:34:13 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -538,8 +538,10 @@
        /*
         * All x86 processors should support C1 (a.k.a. HALT).
         */
-       if ((AcpiGbl_FADT.Flags & ACPI_FADT_C1_SUPPORTED) != 0)
-               cs[ACPI_STATE_C1].cs_method = ACPICPU_C_STATE_HALT;
+       cs[ACPI_STATE_C1].cs_method = ACPICPU_C_STATE_HALT;
+
+       if ((AcpiGbl_FADT.Flags & ACPI_FADT_C1_SUPPORTED) == 0)
+               aprint_debug_dev(sc->sc_dev, "HALT not supported?\n");
 
        if (sc->sc_object.ao_pblkaddr == 0)
                return;



Home | Main Index | Thread Index | Old Index