Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Add comment.
details: https://anonhg.NetBSD.org/src/rev/b425199d2b03
branches: trunk
changeset: 771228:b425199d2b03
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Nov 15 07:43:37 2011 +0000
description:
Add comment.
diffstat:
sys/dev/acpi/acpi_cpu_pstate.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 696d1824321c -r b425199d2b03 sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c Tue Nov 15 07:20:30 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c Tue Nov 15 07:43:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.52 2011/10/18 05:08:24 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.53 2011/11/15 07:43:37 jruoho 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_pstate.c,v 1.52 2011/10/18 05:08:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.53 2011/11/15 07:43:37 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpufreq.h>
@@ -337,6 +337,15 @@
if (ps->ps_freq == 0 || ps->ps_freq > 9999)
return AE_BAD_DECIMAL_CONSTANT;
+ /*
+ * Sanity check also the latency levels. Some systems may
+ * report a value zero, but we keep one microsecond as the
+ * lower bound; see for instance AMD family 12h,
+ *
+ * Advanced Micro Devices: BIOS and Kernel Developer's
+ * Guide (BKDG) for AMD Family 12h Processors. Section
+ * 2.5.3.1.9.2, Revision 3.02, October, 2011.
+ */
if (ps->ps_latency == 0 || ps->ps_latency > 1000)
ps->ps_latency = 1;
Home |
Main Index |
Thread Index |
Old Index