Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Print the state information only once. The per-...
details: https://anonhg.NetBSD.org/src/rev/de655d6d0a0a
branches: trunk
changeset: 757045:de655d6d0a0a
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Aug 11 16:41:19 2010 +0000
description:
Print the state information only once. The per-CPU information was quite
pointless as identical parameters are expected across processors.
diffstat:
sys/dev/acpi/acpi_cpu_cstate.c | 10 ++++++++--
sys/dev/acpi/acpi_cpu_pstate.c | 10 ++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (82 lines):
diff -r 763661fd4ab5 -r de655d6d0a0a sys/dev/acpi/acpi_cpu_cstate.c
--- a/sys/dev/acpi/acpi_cpu_cstate.c Wed Aug 11 16:22:18 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_cstate.c Wed Aug 11 16:41:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.22 2010/08/11 10:44:07 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.23 2010/08/11 16:41:19 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_cstate.c,v 1.22 2010/08/11 10:44:07 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.23 2010/08/11 16:41:19 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -113,9 +113,13 @@
acpicpu_cstate_attach_print(struct acpicpu_softc *sc)
{
struct acpicpu_cstate *cs;
+ static bool once = false;
const char *str;
int i;
+ if (once != false)
+ return;
+
for (i = 0; i < ACPI_C_STATE_COUNT; i++) {
cs = &sc->sc_cstate[i];
@@ -146,6 +150,8 @@
i, str, cs->cs_latency, cs->cs_power,
(uint32_t)cs->cs_addr, cs->cs_flags);
}
+
+ once = true;
}
static void
diff -r 763661fd4ab5 -r de655d6d0a0a sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c Wed Aug 11 16:22:18 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c Wed Aug 11 16:41:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.11 2010/08/11 16:22:18 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.12 2010/08/11 16:41:19 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_pstate.c,v 1.11 2010/08/11 16:22:18 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.12 2010/08/11 16:41:19 jruoho Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -102,9 +102,13 @@
{
const uint8_t method = sc->sc_pstate_control.reg_spaceid;
struct acpicpu_pstate *ps;
+ static bool once = false;
const char *str;
uint32_t i;
+ if (once != false)
+ return;
+
str = (method != ACPI_ADR_SPACE_SYSTEM_IO) ? "FFH" : "I/O";
for (i = 0; i < sc->sc_pstate_count; i++) {
@@ -118,6 +122,8 @@
"lat %3u us, pow %5u mW, %4u MHz\n",
i, str, ps->ps_latency, ps->ps_power, ps->ps_freq);
}
+
+ once = true;
}
static void
Home |
Main Index |
Thread Index |
Old Index