Module Name:    src
Committed By:   jruoho
Date:           Wed Jun 22 08:05:10 UTC 2011

Modified Files:
        src/sys/dev/acpi: acpi_cpu_pstate.c acpi_cpu_tstate.c

Log Message:
Contrary to the previous, use aprint_error(9) but suppress warnings
caused by the (optional) BIOS-based dynamic voltage and frequency scaling.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/acpi/acpi_cpu_pstate.c
cvs rdiff -u -r1.28 -r1.29 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.49 src/sys/dev/acpi/acpi_cpu_pstate.c:1.50
--- src/sys/dev/acpi/acpi_cpu_pstate.c:1.49	Sat Jun  4 18:03:10 2011
+++ src/sys/dev/acpi/acpi_cpu_pstate.c	Wed Jun 22 08:05:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.49 2011/06/04 18:03:10 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.50 2011/06/22 08:05:10 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen <jruoho...@iki.fi>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.49 2011/06/04 18:03:10 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.50 2011/06/22 08:05:10 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -965,7 +965,7 @@
 	return 0;
 
 fail:
-	aprint_debug_dev(sc->sc_dev, "failed "
+	aprint_error_dev(sc->sc_dev, "failed "
 	    "to get frequency (err %d)\n", rv);
 
 	mutex_enter(&sc->sc_mtx);
@@ -1099,8 +1099,9 @@
 	return;
 
 fail:
-	aprint_debug_dev(sc->sc_dev, "failed to set "
-	    "frequency to %u (err %d)\n", freq, rv);
+	if (rv != EINVAL)
+		aprint_error_dev(sc->sc_dev, "failed to set "
+		    "frequency to %u (err %d)\n", freq, rv);
 
 	mutex_enter(&sc->sc_mtx);
 	sc->sc_pstate_current = ACPICPU_P_STATE_UNKNOWN;

Index: src/sys/dev/acpi/acpi_cpu_tstate.c
diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.28 src/sys/dev/acpi/acpi_cpu_tstate.c:1.29
--- src/sys/dev/acpi/acpi_cpu_tstate.c:1.28	Sat Jun  4 18:03:10 2011
+++ src/sys/dev/acpi/acpi_cpu_tstate.c	Wed Jun 22 08:05:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.28 2011/06/04 18:03:10 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.29 2011/06/22 08:05:10 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.28 2011/06/04 18:03:10 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.29 2011/06/22 08:05:10 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -740,7 +740,7 @@
 	return 0;
 
 fail:
-	aprint_debug_dev(sc->sc_dev, "failed "
+	aprint_error_dev(sc->sc_dev, "failed "
 	    "to get T-state (err %d)\n", rv);
 
 	mutex_enter(&sc->sc_mtx);
@@ -881,8 +881,9 @@
 	return;
 
 fail:
-	aprint_debug_dev(sc->sc_dev, "failed to "
-	    "throttle to %u %% (err %d)\n", percent, rv);
+	if (rv != EINVAL)
+		aprint_error_dev(sc->sc_dev, "failed to "
+		    "throttle to %u %% (err %d)\n", percent, rv);
 
 	mutex_enter(&sc->sc_mtx);
 	sc->sc_tstate_current = ACPICPU_T_STATE_UNKNOWN;

Reply via email to