The branch main has been updated by olce:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5bec087167e3934d7df06b4f98ed18c82349ddd2

commit 5bec087167e3934d7df06b4f98ed18c82349ddd2
Author:     Olivier Certner <[email protected]>
AuthorDate: 2026-06-04 15:07:47 +0000
Commit:     Olivier Certner <[email protected]>
CommitDate: 2026-06-22 19:23:14 +0000

    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
---
 sys/dev/acpica/acpi_spmc.c | 4 ++--
 sys/dev/amdsmu/amdsmu.c    | 4 ++--
 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);

Reply via email to