Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi If XPSS is used, only invalidate P-states if th...
details: https://anonhg.NetBSD.org/src/rev/1d0c1871f5e2
branches: trunk
changeset: 757144:1d0c1871f5e2
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Aug 16 10:07:09 2010 +0000
description:
If XPSS is used, only invalidate P-states if the control MSR address is zero.
If the status address is zero, we will bluntly bypass the transition check.
diffstat:
sys/dev/acpi/acpi_cpu_pstate.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diffs (58 lines):
diff -r a37dec541cd5 -r 1d0c1871f5e2 sys/dev/acpi/acpi_cpu_pstate.c
--- a/sys/dev/acpi/acpi_cpu_pstate.c Mon Aug 16 10:00:56 2010 +0000
+++ b/sys/dev/acpi/acpi_cpu_pstate.c Mon Aug 16 10:07:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.21 2010/08/16 07:38:38 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.22 2010/08/16 10:07:09 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.21 2010/08/16 07:38:38 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.22 2010/08/16 10:07:09 jruoho Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -610,11 +610,6 @@
*/
if ((sc->sc_flags & ACPICPU_FLAG_P_XPSS) != 0) {
- if (reg[i]->reg_addr == 0) {
- rv = AE_AML_ILLEGAL_ADDRESS;
- goto out;
- }
-
if (reg[i]->reg_bitwidth != 64) {
rv = AE_AML_BAD_RESOURCE_VALUE;
goto out;
@@ -649,13 +644,24 @@
(void)memcpy(&sc->sc_pstate_control, reg[0], size);
(void)memcpy(&sc->sc_pstate_status, reg[1], size);
+ if ((sc->sc_flags & ACPICPU_FLAG_P_XPSS) == 0)
+ goto out;
+
+ /*
+ * In XPSS the control address can not be zero,
+ * but the status address may be. Comparable to
+ * T-states, in this we can ignore the status
+ * check during the P-state (FFH) transition.
+ */
+ if (sc->sc_pstate_control.reg_addr == 0) {
+ rv = AE_BAD_RESOURCE_VALUE;
+ goto out;
+ }
+
/*
* If XPSS is present, copy the MSR addresses
* to the P-state structures for convenience.
*/
- if ((sc->sc_flags & ACPICPU_FLAG_P_XPSS) == 0)
- goto out;
-
for (i = 0; i < sc->sc_pstate_count; i++) {
ps = &sc->sc_pstate[i];
Home |
Main Index |
Thread Index |
Old Index