Source-Changes-HG archive

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

[src/netbsd-6]: src/sys Pull up following revision(s) (requested by jruoho in...



details:   https://anonhg.NetBSD.org/src/rev/5e676ec21230
branches:  netbsd-6
changeset: 776503:5e676ec21230
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Nov 25 08:23:31 2013 +0000

description:
Pull up following revision(s) (requested by jruoho in ticket #987):
        sys/arch/x86/acpi/acpi_cpu_md.c: revision 1.74
        sys/dev/acpi/acpi_cpu_tstate.c: revision 1.32
As discussed with bouyer@, fix a too eager T-state validation check to
accomodate new Intel CPUs.
Allow 4-bit range for MSR_THERM_CONTROL.

diffstat:

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

diffs (62 lines):

diff -r 4ffb4b0265bd -r 5e676ec21230 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c   Mon Nov 18 02:38:15 2013 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c   Mon Nov 25 08:23:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.71.2.1 2012/12/13 23:41:57 riz Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.71.2.2 2013/11/25 08:23:31 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 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.71.2.1 2012/12/13 23:41:57 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.71.2.2 2013/11/25 08:23:31 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -992,7 +992,7 @@
        uint8_t i;
 
        val = ts->ts_control;
-       val = val & __BITS(1, 4);
+       val = val & __BITS(0, 4);
 
        wrmsr(MSR_THERM_CONTROL, val);
 
diff -r 4ffb4b0265bd -r 5e676ec21230 sys/dev/acpi/acpi_cpu_tstate.c
--- a/sys/dev/acpi/acpi_cpu_tstate.c    Mon Nov 18 02:38:15 2013 +0000
+++ b/sys/dev/acpi/acpi_cpu_tstate.c    Mon Nov 25 08:23:31 2013 +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.30.8.1 2013/11/25 08:23:31 bouyer 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.30.8.1 2013/11/25 08:23:31 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -334,9 +334,14 @@
                *p = val[i];
 
        /*
-        * The minimum should be around 100 / 8 = 12.5 %.
+        * The minimum should be either 12.5 % or 6.5 %,
+        * the latter 4-bit dynamic range being available
+        * in some newer models; see Section 14.5.3.1 in
+        *
+        *      Intel 64 and IA-32 Architectures Software
+        *      Developer's Manual. Volume 3B, Part 2. 2013.
         */
-        if (ts->ts_percent < 10 || ts->ts_percent > 100)
+        if (ts->ts_percent < 6 || ts->ts_percent > 100)
                return AE_BAD_DECIMAL_CONSTANT;
 
        if (ts->ts_latency == 0 || ts->ts_latency > 1000)



Home | Main Index | Thread Index | Old Index