aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Wibo <obiwac@FreeBSD.org>2026-09-16 18:28:22 +0000
committerAymeric Wibo <obiwac@FreeBSD.org>2026-09-16 18:29:49 +0000
commit9b4caca81de24e31fe06e9aecc656f7c6b30edb5 (patch)
treee3682e46a47a78ca73c7fb21f3347c112259dd91
parent29fcb8556681a8920d6b61ade35e4d1a238ea443 (diff)
acpi: Don't compile CPU_VENDOR_{AMD,HYGON} cases on non-x86_64
Fixes build on aarch64. Fixes: 5f68acc931a4 ("acpi: Warn if no amdsmu(4) loaded after suspend-to-idle resume") Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/dev/acpica/acpi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 33d4572b1d2e..795c727aba6f 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -3664,13 +3664,14 @@ static void
check_post_suspend_to_idle(device_t dev)
{
devclass_t dc;
-#if defined(__x86_64__)
+#if defined(__amd64__)
u_int vendor_id = cpu_vendor_id;
#else
u_int vendor_id = 0;
#endif
switch (vendor_id) {
+#if defined(__amd64__)
case CPU_VENDOR_AMD:
case CPU_VENDOR_HYGON:
dc = devclass_find("amdsmu");
@@ -3682,6 +3683,7 @@ check_post_suspend_to_idle(device_t dev)
"amdsmu(4) is not attached; unable to verify S0i3 entry. "
"It is unlikely the system entered a deep sleep state.\n");
break;
+#endif
default:
device_printf(dev,
"Resumed from suspend-to-idle on a processor FreeBSD does "