Print the state information only once. The per-CPU information was quite
pointless as identical parameters are expected across processors.
This commit is contained in:
parent
7a63961323
commit
675dfd8bb3
@ -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>
|
||||
@ -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 @@ void
|
||||
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 @@ acpicpu_cstate_attach_print(struct acpicpu_softc *sc)
|
||||
i, str, cs->cs_latency, cs->cs_power,
|
||||
(uint32_t)cs->cs_addr, cs->cs_flags);
|
||||
}
|
||||
|
||||
once = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -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>
|
||||
@ -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 @@ acpicpu_pstate_attach_print(struct acpicpu_softc *sc)
|
||||
{
|
||||
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 @@ acpicpu_pstate_attach_print(struct acpicpu_softc *sc)
|
||||
"lat %3u us, pow %5u mW, %4u MHz\n",
|
||||
i, str, ps->ps_latency, ps->ps_power, ps->ps_freq);
|
||||
}
|
||||
|
||||
once = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user