Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Append Intel's Turbo Boost to the debug printfs if we de...
details: https://anonhg.NetBSD.org/src/rev/27c6a79e0ba6
branches: trunk
changeset: 762826:27c6a79e0ba6
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Mar 02 06:17:08 2011 +0000
description:
Append Intel's Turbo Boost to the debug printfs if we detect it.
diffstat:
sys/arch/x86/acpi/acpi_cpu_md.c | 14 ++++++++++----
sys/dev/acpi/acpi_cpu.c | 14 ++++++++------
2 files changed, 18 insertions(+), 10 deletions(-)
diffs (87 lines):
diff -r f8bfa877f7b0 -r 27c6a79e0ba6 sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c Wed Mar 02 03:42:56 2011 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c Wed Mar 02 06:17:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.50 2011/03/01 05:02:16 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.51 2011/03/02 06:17:09 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_md.c,v 1.50 2011/03/01 05:02:16 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.51 2011/03/02 06:17:09 jruoho Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -533,6 +533,7 @@
/*
* If the so-called Turbo Boost is present,
* the P0-state is always the "turbo state".
+ * It is shown as the P1 frequency + 1 MHz.
*
* For discussion, see:
*
@@ -540,8 +541,13 @@
* in Intel Core(tm) Microarchitectures (Nehalem)
* Based Processors. White Paper, November 2008.
*/
- if ((sc->sc_flags & ACPICPU_FLAG_P_TURBO) != 0)
- sc->sc_pstate[0].ps_flags |= ACPICPU_FLAG_P_TURBO;
+ if ((sc->sc_flags & ACPICPU_FLAG_P_TURBO) != 0) {
+
+ ps = &sc->sc_pstate[0];
+
+ if (ps->ps_freq == sc->sc_pstate[1].ps_freq + 1)
+ ps->ps_flags |= ACPICPU_FLAG_P_TURBO;
+ }
msr.ps_control_addr = MSR_PERF_CTL;
msr.ps_control_mask = __BITS(0, 15);
diff -r f8bfa877f7b0 -r 27c6a79e0ba6 sys/dev/acpi/acpi_cpu.c
--- a/sys/dev/acpi/acpi_cpu.c Wed Mar 02 03:42:56 2011 +0000
+++ b/sys/dev/acpi/acpi_cpu.c Wed Mar 02 06:17:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.34 2011/03/01 13:38:45 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.35 2011/03/02 06:17:08 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.c,v 1.34 2011/03/01 13:38:45 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.35 2011/03/02 06:17:08 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -800,10 +800,10 @@
continue;
aprint_verbose_dev(sc->sc_dev, "C%d: %3s, "
- "lat %3u us, pow %5u mW, %s\n", i,
+ "lat %3u us, pow %5u mW%s\n", i,
acpicpu_debug_print_method(cs->cs_method),
cs->cs_latency, cs->cs_power,
- (cs->cs_flags != 0) ? "bus master check" : "");
+ (cs->cs_flags != 0) ? ", bus master check" : "");
}
method = sc->sc_pstate_control.reg_spaceid;
@@ -816,9 +816,11 @@
continue;
aprint_verbose_dev(sc->sc_dev, "P%d: %3s, "
- "lat %3u us, pow %5u mW, %4u MHz\n", i,
+ "lat %3u us, pow %5u mW, %4u MHz%s\n", i,
acpicpu_debug_print_method(method),
- ps->ps_latency, ps->ps_power, ps->ps_freq);
+ ps->ps_latency, ps->ps_power, ps->ps_freq,
+ (ps->ps_flags & ACPICPU_FLAG_P_TURBO) != 0 ?
+ ", turbo boost" : "");
}
method = sc->sc_tstate_control.reg_spaceid;
Home |
Main Index |
Thread Index |
Old Index