Page MenuHomeFreeBSD

D61431.1794485171.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61431.1794485171.diff

diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -169,6 +169,7 @@
static int acpi_cpu_read_ivar(device_t dev, device_t child, int index,
uintptr_t *result);
static int acpi_cpu_shutdown(device_t dev);
+static int acpi_cpu_resume(device_t dev);
static void acpi_cpu_cx_probe(struct acpi_cpu_softc *sc);
static void acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc);
static int acpi_cpu_cx_cst(struct acpi_cpu_softc *sc);
@@ -198,7 +199,7 @@
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, acpi_cpu_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
- DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_resume, acpi_cpu_resume),
/* Bus interface */
DEVMETHOD(bus_add_child, acpi_cpu_add_child),
@@ -511,13 +512,18 @@
}
static void
-enable_idle(struct acpi_cpu_softc *sc)
+set_bm_rld(struct acpi_cpu_softc *sc)
{
+ if (sc->cpu_cx_count > sc->cpu_non_c3 + 1 &&
+ (cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0)
+ AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 1);
+}
- if (sc->cpu_cx_count > sc->cpu_non_c3 + 1 &&
- (cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0)
- AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 1);
- sc->cpu_disable_idle = FALSE;
+static void
+enable_idle(struct acpi_cpu_softc *sc)
+{
+ set_bm_rld(sc);
+ sc->cpu_disable_idle = FALSE;
}
#if defined(__i386__) || defined(__amd64__)
@@ -529,6 +535,18 @@
}
#endif
+static int
+acpi_cpu_resume(device_t dev)
+{
+ /*
+ * XXX It probably makes more sense to do this once in the S3/S4 resume
+ * path, as BM_RLD is a global PM1_CNT bit only lost there, rather than
+ * for each acpi_cpu.
+ */
+ set_bm_rld(device_get_softc(dev));
+ return (bus_generic_resume(dev));
+}
+
/*
* Find the processor associated with a given ACPI ID.
*/

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 12, 12:06 PM (13 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41675562
Default Alt Text
D61431.1794485171.diff (1 KB)

Event Timeline