aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2005-02-07 04:03:06 +0000
committerNate Lawson <njl@FreeBSD.org>2005-02-07 04:03:06 +0000
commit8b888c66d783322d211fafd971960772cebd42f5 (patch)
tree7d75b848c043900b2ee4bcaba9000c1e323baacf
parent98c926b20fcc0953abe69be05b43e9cfc95b2c47 (diff)
downloadsrc-8b888c66d783322d211fafd971960772cebd42f5.tar.gz
src-8b888c66d783322d211fafd971960772cebd42f5.zip
Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them.
Notes
Notes: svn path=/head/; revision=141429
-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 f1b97feada18..30ba2e9a340d 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 b8cd3d7cd4f8..259f68bda454 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. */