summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-07 04:03:06 +0000
committernjl <njl@FreeBSD.org>2005-02-07 04:03:06 +0000
commitcea0f165287b23cf9191e08758f9dcd9c9a68722 (patch)
tree7d75b848c043900b2ee4bcaba9000c1e323baacf
parent885a9694bc1a30c0841c38f6367dc1cf43e219ee (diff)
downloadFreeBSD-src-cea0f165287b23cf9191e08758f9dcd9c9a68722.zip
FreeBSD-src-cea0f165287b23cf9191e08758f9dcd9c9a68722.tar.gz
Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them.
-rw-r--r--sys/dev/acpica/acpi_cpu.c24
-rw-r--r--sys/dev/acpica/acpi_perf.c7
2 files changed, 13 insertions, 18 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index f1b97fe..30ba2e9 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -94,8 +94,7 @@ struct acpi_cpu_device {
#define PM_USEC(x) ((x) >> 2) /* ~4 clocks per usec (3.57955 Mhz) */
-#define ACPI_CPU_NOTIFY_PERF_STATES 0x80 /* _PSS changed. */
-#define ACPI_CPU_NOTIFY_CX_STATES 0x81 /* _CST changed. */
+#define ACPI_NOTIFY_CX_STATES 0x81 /* _CST changed. */
#define CPU_QUIRK_NO_C3 (1<<0) /* C3-type states are not usable. */
#define CPU_QUIRK_NO_BM_CTRL (1<<2) /* No bus mastering control. */
@@ -848,8 +847,7 @@ acpi_cpu_idle()
}
/*
- * Re-evaluate the _PSS and _CST objects when we are notified that they
- * have changed.
+ * Re-evaluate the _CST object when we are notified that it changed.
*
* XXX Re-evaluation disabled until locking is done.
*/
@@ -858,19 +856,11 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context)
{
struct acpi_cpu_softc *sc = (struct acpi_cpu_softc *)context;
- switch (notify) {
- case ACPI_CPU_NOTIFY_PERF_STATES:
- device_printf(sc->cpu_dev, "Performance states changed\n");
- /* acpi_cpu_px_available(sc); */
- break;
- case ACPI_CPU_NOTIFY_CX_STATES:
- device_printf(sc->cpu_dev, "Cx states changed\n");
- /* acpi_cpu_cx_cst(sc); */
- break;
- default:
- device_printf(sc->cpu_dev, "Unknown notify %#x\n", notify);
- break;
- }
+ if (notify != ACPI_NOTIFY_CX_STATES)
+ return;
+
+ device_printf(sc->cpu_dev, "Cx states changed\n");
+ /* acpi_cpu_cx_cst(sc); */
}
static int
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c
index b8cd3d7..259f68b 100644
--- a/sys/dev/acpica/acpi_perf.c
+++ b/sys/dev/acpica/acpi_perf.c
@@ -87,6 +87,8 @@ struct acpi_perf_softc {
(bus_space_write_4(rman_get_bustag((reg)), \
rman_get_bushandle((reg)), 0, (val)))
+#define ACPI_NOTIFY_PERF_STATES 0x80 /* _PSS changed. */
+
static void acpi_perf_identify(driver_t *driver, device_t parent);
static int acpi_perf_probe(device_t dev);
static int acpi_perf_attach(device_t dev);
@@ -144,7 +146,7 @@ acpi_perf_identify(driver_t *driver, device_t parent)
if (ACPI_FAILURE(AcpiEvaluateObject(handle, "_PSS", NULL, NULL)))
return;
if (BUS_ADD_CHILD(parent, 0, "acpi_perf", 0) == NULL)
- device_printf(parent, "acpi_perf: add child failed\n");
+ device_printf(parent, "add acpi_perf child failed\n");
}
static int
@@ -322,6 +324,9 @@ acpi_px_notify(ACPI_HANDLE h, UINT32 notify, void *context)
struct acpi_perf_softc *sc;
sc = context;
+ if (notify != ACPI_NOTIFY_PERF_STATES)
+ return;
+
acpi_px_available(sc);
/* TODO: Implement notification when frequency changes. */
OpenPOWER on IntegriCloud