Module Name: src
Committed By: jruoho
Date: Mon Aug 16 04:31:21 UTC 2010
Modified Files:
src/sys/dev/acpi: acpi_cpu_pstate.c acpi_cpu_tstate.c
Log Message:
Do not error out neither in P-states nor in T-states if the method for the
dynamic maximum is nonexistent. Unsurprisingly, there is vagueness in the
standards; in ACPI 3.0 and 4.0 it is clearly indicated that also these methods
must be present, but the earlier standards are less stringent. Without too
much effort, at least one old P4-system was located that lacks _PPC.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_cpu_pstate.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/acpi_cpu_tstate.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/acpi_cpu_pstate.c
diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.19 src/sys/dev/acpi/acpi_cpu_pstate.c:1.20
--- src/sys/dev/acpi/acpi_cpu_pstate.c:1.19 Sat Aug 14 17:27:34 2010
+++ src/sys/dev/acpi/acpi_cpu_pstate.c Mon Aug 16 04:31:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.19 2010/08/14 17:27:34 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.20 2010/08/16 04:31:21 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <[email protected]>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.19 2010/08/14 17:27:34 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.20 2010/08/16 04:31:21 jruoho Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -60,8 +60,11 @@
ACPI_STATUS rv;
/*
- * Three control methods are mandatory
- * for P-states; _PSS, _PCT, and _PPC.
+ * The ACPI 3.0 and 4.0 specifications mandate three
+ * objects for P-states: _PSS, _PCT, and _PPC. A less
+ * strict wording is however used in the earlier 2.0
+ * standard, and some systems conforming to ACPI 2.0
+ * do not have _PPC, the method for dynamic maximum.
*/
rv = acpicpu_pstate_pss(sc);
@@ -77,12 +80,7 @@
goto fail;
}
- rv = acpicpu_pstate_max(sc);
-
- if (rv != 0) {
- str = "_PPC";
- goto fail;
- }
+ (void)acpicpu_pstate_max(sc);
sc->sc_flags |= ACPICPU_FLAG_P;
sc->sc_pstate_current = sc->sc_pstate[0].ps_freq;
Index: src/sys/dev/acpi/acpi_cpu_tstate.c
diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.9 src/sys/dev/acpi/acpi_cpu_tstate.c:1.10
--- src/sys/dev/acpi/acpi_cpu_tstate.c:1.9 Sun Aug 15 08:53:19 2010
+++ src/sys/dev/acpi/acpi_cpu_tstate.c Mon Aug 16 04:31:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.10 2010/08/16 04:31:21 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <[email protected]>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.9 2010/08/15 08:53:19 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.10 2010/08/16 04:31:21 jruoho Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -63,10 +63,6 @@
if ((sc->sc_flags & ACPICPU_FLAG_PIIX4) != 0)
return;
- /*
- * If either _TSS, _PTC, or _TPC is not
- * available, we have to resort to FADT.
- */
rv = acpicpu_tstate_tss(sc);
if (ACPI_FAILURE(rv)) {
@@ -81,12 +77,12 @@
goto out;
}
- rv = acpicpu_tstate_change(sc);
-
- if (ACPI_FAILURE(rv)) {
- str = "_TPC";
- goto out;
- }
+ /*
+ * Comparable to P-states, the _TPC object may
+ * be absent in some systems, even though it is
+ * required by ACPI 3.0 along with _TSS and _PTC.
+ */
+ (void)acpicpu_tstate_change(sc);
out:
if (ACPI_FAILURE(rv)) {