Page MenuHomeFreeBSD

D55505.id172666.diff
No OneTemporary

D55505.id172666.diff

diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c
--- a/sys/dev/acpica/acpi_perf.c
+++ b/sys/dev/acpica/acpi_perf.c
@@ -191,9 +191,14 @@
pkg = (ACPI_OBJECT *)buf.Pointer;
if (ACPI_PKG_VALID(pkg, 2)) {
rid = 0;
- error = acpi_PkgGas(dev, pkg, 0, &type, rid, &res, 0);
+ error = acpi_PkgGas(dev, pkg, 0, &type, rid, &res,
+ RF_SHAREABLE);
switch (error) {
case 0:
+#ifdef SYS_RES_FFH
+ if (type == SYS_RES_FFH)
+ device_quiet(dev);
+#endif
bus_release_resource(dev, type, rid, res);
bus_delete_resource(dev, type, rid);
device_set_desc(dev, "ACPI CPU Frequency Control");
@@ -325,14 +330,15 @@
device_printf(dev, "invalid perf register package\n");
goto out;
}
-
error = acpi_PkgGas(sc->dev, pkg, 0, &sc->perf_ctrl_type, sc->px_rid,
- &sc->perf_ctrl, 0);
+ &sc->perf_ctrl, RF_SHAREABLE);
+#ifdef SYS_RES_FFH
+ if (sc->perf_ctrl_type == SYS_RES_FFH) {
+ sc->info_only = TRUE;
+ goto out;
+ }
+#endif
if (error) {
- /*
- * If the register is of type FFixedHW, we can only return
- * info, we can't get or set new settings.
- */
if (error == EOPNOTSUPP) {
sc->info_only = TRUE;
error = 0;
@@ -343,7 +349,13 @@
sc->px_rid++;
error = acpi_PkgGas(sc->dev, pkg, 1, &sc->perf_sts_type, sc->px_rid,
- &sc->perf_status, 0);
+ &sc->perf_status, RF_SHAREABLE);
+#ifdef SYS_RES_FFH
+ if (sc->perf_ctrl_type == SYS_RES_FFH) {
+ sc->info_only = TRUE;
+ goto out;
+ }
+#endif
if (error) {
if (error == EOPNOTSUPP) {
sc->info_only = TRUE;

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 4, 3:45 AM (15 h, 39 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34649939
Default Alt Text
D55505.id172666.diff (1 KB)

Event Timeline