Module Name: src
Committed By: jruoho
Date: Tue Feb 22 16:05:31 UTC 2011
Modified Files:
src/sys/dev/acpi: acpi_cpu_cstate.c
Log Message:
After a closer examination, remove entirely the check that was considered in
the revision 1.38. As noted in the specification (ACPI 4.0, p. 314):
The platform must expose a _CST object for either all or none of its
processors. If the _CST object exists, OSPM uses the C state information
specified in the _CST object in lieu of P_LVL2 and P_LVL3 registers
defined in P_BLK and the P_LVLx_LAT values defined in the FADT.
The _CST is seemingly valid on the system under consideration:
Name (_CST, Package (0x02)
{
0x01,
Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO,
0x08, // Bit Width
0x00, // Bit Offset
0x000000000000F800, // Address
0x01, // Access Size
)
},
0x02,
0x0064,
0x00000000
}
})
The check was also unnecessary in the sense that ACPI doesn't use bus_space(9).
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/acpi/acpi_cpu_cstate.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/acpi_cpu_cstate.c
diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.39 src/sys/dev/acpi/acpi_cpu_cstate.c:1.40
--- src/sys/dev/acpi/acpi_cpu_cstate.c:1.39 Tue Feb 22 09:39:48 2011
+++ src/sys/dev/acpi/acpi_cpu_cstate.c Tue Feb 22 16:05:30 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <[email protected]>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.39 2011/02/22 09:39:48 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_cstate.c,v 1.40 2011/02/22 16:05:30 jruoho Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -423,21 +423,6 @@
goto out;
}
- /*
- * Check only that the address is in the mapped space.
- * Systems are allowed to change it when operating
- * with _CST (see ACPI 4.0, pp. 94-95). For instance,
- * the offset of P_LVL3 may change depending on whether
- * acpiacad(4) is connected or disconnected.
- */
- if (ao->ao_pblkaddr != 0) {
-
- if (reg->reg_addr > ao->ao_pblkaddr + ao->ao_pblklen) {
- rv = AE_BAD_ADDRESS;
- goto out;
- }
- }
-
state.cs_addr = reg->reg_addr;
break;