aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-06-04 15:07:47 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-06-22 19:23:14 +0000
commit5bec087167e3934d7df06b4f98ed18c82349ddd2 (patch)
tree74e8058d18a3e23d626e9c4dbb36c4e7b43bfa41
parentdf8ca3f89aa2b2c374886cc39b24c76796d7db9a (diff)
amdsmu(4), acpi_spmc(4): Fix ordering of calls
The AMD SMU is supposed to be notified of suspension the SPMC has been, and conversely on resume, as expressed in comments. Fix the EVENTHANDLER(9) priorities used so that they match the comments. Lower values indeed indicate higher priority in this subsystem. Reviewed by: obiwac Fixes: 2c60fce365f4 ("amdsmu: Sleep entry/exit hints for PMFW") Event: Halifax Hackathon 202606 Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/dev/acpica/acpi_spmc.c4
-rw-r--r--sys/dev/amdsmu/amdsmu.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
index 611a9a09a6eb..d4d13d57d36e 100644
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -473,9 +473,9 @@ acpi_spmc_attach(device_t dev)
"will not check for them before suspend\n", error);
sc->eh_suspend = EVENTHANDLER_REGISTER(acpi_post_dev_suspend,
- acpi_spmc_suspend, dev, 0);
+ acpi_spmc_suspend, dev, EVENTHANDLER_PRI_ANY);
sc->eh_resume = EVENTHANDLER_REGISTER(acpi_pre_dev_resume,
- acpi_spmc_resume, dev, 0);
+ acpi_spmc_resume, dev, EVENTHANDLER_PRI_ANY);
return (0);
}
diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c
index 5029336af9cb..ffffe0b5219f 100644
--- a/sys/dev/amdsmu/amdsmu.c
+++ b/sys/dev/amdsmu/amdsmu.c
@@ -458,9 +458,9 @@ amdsmu_attach(device_t dev)
* event as we want this to be called before the SPMC hook.
*/
sc->eh_suspend = EVENTHANDLER_REGISTER(acpi_post_dev_suspend,
- amdsmu_suspend, dev, -10);
+ amdsmu_suspend, dev, EVENTHANDLER_PRI_LAST);
sc->eh_resume = EVENTHANDLER_REGISTER(acpi_pre_dev_resume,
- amdsmu_resume, dev, 10);
+ amdsmu_resume, dev, EVENTHANDLER_PRI_FIRST);
#endif
return (0);