Thread (3 messages) flat view 3 messages, 1 author, 3d ago
DORMANTno replies

[PATCH 0/2] soc: xilinx: zynqmp_power: order callback state against probe

From: Jaidev Shastri via B4 Relay <devnull+jaidevshastri.vt.edu@kernel.org>
Date: 2026-09-22 01:02:47
Also in: b4-sent, lkml

zynqmp_pm_probe() registers the event manager callbacks and the mailbox rx
callback before it has finished storing the state those callbacks read.

The first patch closes a real window. mbox_request_channel_byname() starts
the channel before it returns, so a message the firmware already has pending
is delivered while rx_chan is still NULL and the IPI is never acknowledged.
The mailbox API gives the callback no way to reach the channel from its
struct mbox_client, so the channel is stored under a spinlock shared with the
callback and the acknowledgement is deferred until probe has published it.

The second orders the two work-struct pointers that the event manager and
mailbox callbacks dereference as soon as they run.

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

---
Jaidev Shastri (2):
      soc: xilinx: zynqmp_power: do not use rx_chan before probe has stored it
      soc: xilinx: zynqmp_power: publish the callback work pointers

 drivers/soc/xilinx/zynqmp_power.c | 113 +++++++++++++++++++++++++++-----------
 1 file changed, 81 insertions(+), 32 deletions(-)
---
base-commit: 93f51579e7df248780214094418f205253383cc5
change-id: 20260921-mb-zynqmp-power-34da13724341

Best regards,
--  
Jaidev Shastri [off-list ref]


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help