Module Name: src
Committed By: jruoho
Date: Wed Nov 20 13:39:59 UTC 2013
Modified Files:
src/sys/dev/acpi: acpi_cpu_tstate.c
Log Message:
As discussed with bouyer@, fix a too eager T-state validation check to
accomodate new Intel CPUs.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 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_tstate.c
diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.31 src/sys/dev/acpi/acpi_cpu_tstate.c:1.32
--- src/sys/dev/acpi/acpi_cpu_tstate.c:1.31 Fri Apr 27 04:38:24 2012
+++ src/sys/dev/acpi/acpi_cpu_tstate.c Wed Nov 20 13:39:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_tstate.c,v 1.31 2012/04/27 04:38:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_tstate.c,v 1.32 2013/11/20 13:39:59 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.31 2012/04/27 04:38:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.32 2013/11/20 13:39:59 jruoho Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -329,9 +329,14 @@ acpicpu_tstate_tss_add(struct acpicpu_ts
*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)