Source-Changes-HG archive

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

[src/trunk]: src/sys When retrieving the current frequency, scan all availabl...



details:   https://anonhg.NetBSD.org/src/rev/41342b5e29f2
branches:  trunk
changeset: 756976:41342b5e29f2
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Mon Aug 09 04:27:07 2010 +0000

description:
When retrieving the current frequency, scan all available P-states.
Only use the dynamic maximum when setting a frequency.

diffstat:

 sys/arch/x86/acpi/acpi_cpu_md.c |  6 +++---
 sys/dev/acpi/acpi_cpu_pstate.c  |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 50657cbe6f76 -r 41342b5e29f2 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c   Mon Aug 09 04:18:48 2010 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c   Mon Aug 09 04:27:07 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 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_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -365,7 +365,7 @@
 
                mutex_enter(&sc->sc_mtx);
 
-               for (i = sc->sc_pstate_max; i < sc->sc_pstate_count; i++) {
+               for (i = 0; i < sc->sc_pstate_count; i++) {
 
                        ps = &sc->sc_pstate[i];
 
diff -r 50657cbe6f76 -r 41342b5e29f2 sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c    Mon Aug 09 04:18:48 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c    Mon Aug 09 04:27:07 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.5 2010/08/09 04:27:07 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_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.5 2010/08/09 04:27:07 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -525,7 +525,7 @@
 
                mutex_enter(&sc->sc_mtx);
 
-               for (i = sc->sc_pstate_max; i < sc->sc_pstate_count; i++) {
+               for (i = 0; i < sc->sc_pstate_count; i++) {
 
                        if (sc->sc_pstate[i].ps_freq == 0)
                                continue;



Home | Main Index | Thread Index | Old Index