aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Jones <thj@FreeBSD.org>2022-10-11 08:30:34 +0000
committerTom Jones <thj@FreeBSD.org>2022-10-11 08:31:22 +0000
commiteee0f7aea42564fe005c74f004d63f8cc170ef59 (patch)
treee6d6bc93523e00b0f9ef9cef2adc327568c1ff41
parentbab2efd47be84fa3be5a4e1f5aebb973936922ad (diff)
downloadsrc-eee0f7aea42564fe005c74f004d63f8cc170ef59.tar.gz
src-eee0f7aea42564fe005c74f004d63f8cc170ef59.zip
acpi: Put CPPC workaround behind i386/amd64 if def
While CPPC is available on arm64 platforms with ACPI we don't know if we need to work around issues with firmware there.
-rw-r--r--sys/dev/acpica/acpi_cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index 49d2bd11fdaa..ea99cfdeb90f 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -153,7 +153,9 @@ static struct sysctl_ctx_list cpu_sysctl_ctx;
static struct sysctl_oid *cpu_sysctl_tree;
static int cpu_cx_generic;
static int cpu_cx_lowest_lim;
+#if defined(__i386__) || defined(__amd64__)
static bool cppc_notify;
+#endif
static struct acpi_cpu_softc **cpu_softc;
ACPI_SERIAL_DECL(cpu, "ACPI CPU");
@@ -985,11 +987,13 @@ acpi_cpu_startup(void *arg)
NULL, 0, acpi_cpu_global_cx_lowest_sysctl, "A",
"Global lowest Cx sleep state to use");
+#if defined(__i386__) || defined(__amd64__)
/* Add sysctl handler to control registering for CPPC notifications */
cppc_notify = 1;
SYSCTL_ADD_BOOL(&cpu_sysctl_ctx, SYSCTL_CHILDREN(cpu_sysctl_tree),
OID_AUTO, "cppc_notify", CTLFLAG_RDTUN | CTLFLAG_MPSAFE,
&cppc_notify, 0, "Register for CPPC Notifications");
+#endif
/* Take over idling from cpu_idle_default(). */
cpu_cx_lowest_lim = 0;