diff options
author | njl <njl@FreeBSD.org> | 2007-01-07 21:53:42 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2007-01-07 21:53:42 +0000 |
commit | 198bd4c0fc478412c60f02355042f40cb9ab32de (patch) | |
tree | 16075cfd1c6adf88fd5fbbfe69ad4675109b22ae /sys/dev/acpica/acpivar.h | |
parent | 3ab35533ebd385ba1714469942e7e0cd6b965e49 (diff) | |
download | FreeBSD-src-198bd4c0fc478412c60f02355042f40cb9ab32de.zip FreeBSD-src-198bd4c0fc478412c60f02355042f40cb9ab32de.tar.gz |
Re-work Cx handling to be per-cpu and asymmetrical, fixing support on
modern dual-core systems as well.
- Parse the _CST packages for each cpu and track all the states individually,
on a per-cpu basis.
- Revert to generic FADT/P_BLK based Cx control if the _CST package
is not present on all cpus. In that case, the new driver will
still support per-cpu Cx state handling. The driver will determine the
highest Cx level that can be supported by all the cpus and configure the
available Cx state based on that.
- Fixed the case where multiple cpus in the system share the same
registers for Cx state handling. To do that, added a new flag
parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that
enable the caller to add the RF_SHAREABLE flag. This flag could also be
useful to other callers (acpi_throttle?) in the tree but this change is
not yet made.
- For Core Duo cpus, both cores seems to be taken out of C3 state when
any one of the cores need to transition out. This broke the short sleep
detection logic. It is disabled now if there is more than one cpu in
the system for now as it fixed it in my case. This quirk may need to
be re-enabled later differently.
- Added support to control cx_lowest on a per-cpu basis. There is still
a generic cx_lowest to enable changing cx_lowest for all cpus with a single
sysctl and for ease of use. Sample output for the new sysctl:
dev.cpu.0.cx_supported: C1/1 C2/1 C3/57
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 0.00% 43.16% 56.83%
dev.cpu.1.cx_supported: C1/1 C2/1 C3/57
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 0.00% 45.65% 54.34%
hw.acpi.cpu.cx_lowest: C3
This work was done by Stephane E. Potvin with some simple reworking by
myself. Thank you.
Submitted by: Stephane E. Potvin <sepotvin / videotron.ca>
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r-- | sys/dev/acpica/acpivar.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index df3940a..c1e9812 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -312,7 +312,8 @@ ACPI_STATUS acpi_Startup(void); void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, uint8_t notify); int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, - ACPI_GENERIC_ADDRESS *gas, struct resource **res); + ACPI_GENERIC_ADDRESS *gas, struct resource **res, + u_int flags); struct acpi_parse_resource_set { void (*set_init)(device_t dev, void *arg, void **context); @@ -418,7 +419,7 @@ int acpi_PkgInt(ACPI_OBJECT *res, int idx, ACPI_INTEGER *dst); int acpi_PkgInt32(ACPI_OBJECT *res, int idx, uint32_t *dst); int acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size); int acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, - int *rid, struct resource **dst); + int *rid, struct resource **dst, u_int flags); ACPI_HANDLE acpi_GetReference(ACPI_HANDLE scope, ACPI_OBJECT *obj); /* Default number of task queue threads to start. */ |