summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorGordon Willem Klok <gwk@cvs.openbsd.org>2007-01-31 23:30:52 +0000
committerGordon Willem Klok <gwk@cvs.openbsd.org>2007-01-31 23:30:52 +0000
commit21863e52dc1f57db88c638692064e42cf6eb19be (patch)
treeecd20330ba66f373ec27b0e499a06b741629522b /sys/dev/acpi
parent63034cae876e861e61d3f799f694fd2113f446dc (diff)
Introduce acpi_hasprocfvs thats "ACPI Has Processor Frequency and Voltage
Scalling" a global flag set by acicpu attach to indicate that ACPI is handling fvs through the _PSS objects. This will fix disappearing EST/powernow when booting kernels with acpi enabled, as acpicpu isnt compiled into GENERIC yet. Also in cases where acpicpu is built in and legacy EST/powernow work but acpi is missing the _PSS object, the legacy routines will be used. tested by dim@, and Nick Nauwelaerts <nick AT nauwelaerts.net> ok marco@, dim@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c3
-rw-r--r--sys/dev/acpi/acpicpu.c13
-rw-r--r--sys/dev/acpi/acpivar.h4
3 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index a6c1c72ef2f..136654cb68b 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.76 2007/01/22 19:47:11 mk Exp $ */
+/* $OpenBSD: acpi.c,v 1.77 2007/01/31 23:30:51 gwk Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -47,6 +47,7 @@ int acpi_debug = 16;
#endif
int acpi_enabled = 0;
int acpi_poll_enabled = 0;
+int acpi_hasprocfvs = 0;
#define ACPIEN_RETRIES 15
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c
index 95b45c9a242..ab668065df8 100644
--- a/sys/dev/acpi/acpicpu.c
+++ b/sys/dev/acpi/acpicpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpicpu.c,v 1.18 2006/12/29 04:28:44 marco Exp $ */
+/* $OpenBSD: acpicpu.c,v 1.19 2007/01/31 23:30:51 gwk Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -135,6 +135,7 @@ acpicpu_attach(struct device *parent, struct device *self, void *aux)
if (setperf_prio < 30) {
cpu_setperf = acpicpu_setperf;
setperf_prio = 30;
+ acpi_hasprocfvs = 1;
}
acpicpu_sc[sc->sc_dev.dv_unit] = sc;
}
@@ -277,11 +278,11 @@ acpicpu_setperf(int level) {
sc = acpicpu_sc[cpu_number()];
- dnprintf(10, "%s: acpicpu setperf level %d\n",
+ dnprintf(10, "%s: acpicpu setperf level %d\n",
sc->sc_devnode->parent->name, level);
if (level < 0 || level > 100) {
- dnprintf(10, "%s: acpicpu setperf illegal percentage\n",
+ dnprintf(10, "%s: acpicpu setperf illegal percentage\n",
sc->sc_devnode->parent->name);
return;
}
@@ -291,12 +292,12 @@ acpicpu_setperf(int level) {
idx = 0; /* compensate */
if (idx > sc->sc_pss_len) {
/* XXX should never happen */
- printf("%s: acpicpu setperf index out of range\n",
+ printf("%s: acpicpu setperf index out of range\n",
sc->sc_devnode->parent->name);
return;
}
- dnprintf(10, "%s: acpicpu setperf index %d\n",
+ dnprintf(10, "%s: acpicpu setperf index %d\n",
sc->sc_devnode->parent->name, idx);
pss = &sc->sc_pss[idx];
@@ -351,6 +352,6 @@ acpicpu_setperf(int level) {
if (status == pss->pss_status)
cpuspeed = pss->pss_core_freq;
else
- printf("%s: acpicpu setperf failed to alter frequency\n",
+ printf("%s: acpicpu setperf failed to alter frequency\n",
sc->sc_devnode->parent->name);
}
diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h
index b96470c14c5..aa5d9e5f9ea 100644
--- a/sys/dev/acpi/acpivar.h
+++ b/sys/dev/acpi/acpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivar.h,v 1.33 2006/12/26 23:58:08 marco Exp $ */
+/* $OpenBSD: acpivar.h,v 1.34 2007/01/31 23:30:51 gwk Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -31,6 +31,8 @@ extern int acpi_debug;
#define dnprintf(n,x...)
#endif
+extern int acpi_hasprocfvs;
+
struct klist;
struct acpiec_softc;