Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Remove the upper limit for the number of T-states.



details:   https://anonhg.NetBSD.org/src/rev/dd678c7afd3d
branches:  trunk
changeset: 779036:dd678c7afd3d
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Apr 27 04:38:24 2012 +0000

description:
Remove the upper limit for the number of T-states.

diffstat:

 sys/dev/acpi/acpi_cpu.h        |   3 +--
 sys/dev/acpi/acpi_cpu_tstate.c |  12 ++----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diffs (57 lines):

diff -r 82e9df0a9bae -r dd678c7afd3d sys/dev/acpi/acpi_cpu.h
--- a/sys/dev/acpi/acpi_cpu.h   Fri Apr 27 04:32:27 2012 +0000
+++ b/sys/dev/acpi/acpi_cpu.h   Fri Apr 27 04:38:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.h,v 1.43 2011/10/18 05:08:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.h,v 1.44 2012/04/27 04:38:24 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -88,7 +88,6 @@
 /*
  * T-states.
  */
-#define ACPICPU_T_STATE_MAX     0x8
 #define ACPICPU_T_STATE_RETRY   0xA
 #define ACPICPU_T_STATE_UNKNOWN         255
 
diff -r 82e9df0a9bae -r dd678c7afd3d sys/dev/acpi/acpi_cpu_tstate.c
--- a/sys/dev/acpi/acpi_cpu_tstate.c    Fri Apr 27 04:32:27 2012 +0000
+++ b/sys/dev/acpi/acpi_cpu_tstate.c    Fri Apr 27 04:38:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.30 2011/06/22 08:49:54 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.31 2012/04/27 04:38:24 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_tstate.c,v 1.30 2011/06/22 08:49:54 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.31 2012/04/27 04:38:24 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -243,11 +243,6 @@
                goto out;
        }
 
-       if (sc->sc_tstate_count > ACPICPU_T_STATE_MAX) {
-               rv = AE_LIMIT;
-               goto out;
-       }
-
        sc->sc_tstate = kmem_zalloc(sc->sc_tstate_count *
            sizeof(struct acpicpu_tstate), KM_SLEEP);
 
@@ -560,9 +555,6 @@
 
        count = 1 << width;
 
-       if (count > ACPICPU_T_STATE_MAX)
-               return AE_LIMIT;
-
        if (sc->sc_tstate != NULL)
                kmem_free(sc->sc_tstate, sc->sc_tstate_count * size);
 



Home | Main Index | Thread Index | Old Index