summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-10-23 22:37:36 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-10-23 22:37:36 +0000
commite5e5b51f9f11601c89829a05ae2cdd02cdbbc648 (patch)
tree6aec37780619a8a816ac02da6e2ac49257c7a0d7
parentd19fc02a228ee4c87dfc1ea4674ea22f052500da (diff)
Notes
-rw-r--r--sys/dev/acpica/acpi_cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index ad88620e7931..7860d73519b5 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -255,6 +255,7 @@ acpi_cpu_attach(device_t dev)
static void
acpi_cpu_init_throttling(void *arg)
{
+ int cpu_temp_speed;
ACPI_LOCK;
@@ -267,6 +268,14 @@ acpi_cpu_init_throttling(void *arg)
cpu_economy_state = cpu_performance_state / 2;
if (cpu_economy_state == 0) /* 0 is 'reserved' */
cpu_economy_state++;
+ if (TUNABLE_INT_FETCH("hw.acpi.cpu.performance_speed",
+ &cpu_temp_speed) && cpu_temp_speed > 0 &&
+ cpu_temp_speed <= cpu_max_state)
+ cpu_performance_state = cpu_temp_speed;
+ if (TUNABLE_INT_FETCH("hw.acpi.cpu.economy_speed",
+ &cpu_temp_speed) && cpu_temp_speed > 0 &&
+ cpu_temp_speed <= cpu_max_state)
+ cpu_economy_state = cpu_temp_speed;
/* register performance profile change handler */
EVENTHANDLER_REGISTER(powerprofile_change, acpi_cpu_powerprofile, NULL, 0);