[PATCH 0/2] PM: sleep: make the async callback state explicit

From: Jaidev Shastri via B4 Relay

Date: Mon Sep 21 2026 - 21:28:14 EST


The dpm_*() phase functions publish pm_transition and reset async_error
before scheduling the asynchronous device callbacks, which read both from
other CPUs.

async_schedule_dev() contains full barriers, so neither patch changes
behaviour. The first states the publication with a release/acquire pair on
pm_transition.event. The second uses WRITE_ONCE() for the async_error reset,
so that every access to that variable follows the convention its readers and
the failure paths already use.

Found with MBCheck, a static herd7-based memory consistency checker.
Compile-tested on arm64 with W=1, no new warnings.

---
Jaidev Shastri (2):
PM: sleep: publish pm_transition with release semantics
PM: sleep: reset async_error with WRITE_ONCE()

drivers/base/power/main.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
---
base-commit: 93f51579e7df248780214094418f205253383cc5
change-id: 20260921-mb-pm-main-ed2f0afaa744

Best regards,
--
Jaidev Shastri <jaidevshastri@xxxxxx>