Re: [PATCH 2/2] firmware: arm_scmi: Fix SCMI Power Control driver removal

From: Sudeep Holla

Date: Tue Nov 17 2026 - 09:10:06 EST


On Tue, Nov 17, 2026 at 11:35:38AM +0000, Cristian Marussi wrote:
> On Mon, Nov 16, 2026 at 06:14:50PM +0000, Sudeep Holla wrote:
> > On Mon, Nov 16, 2026 at 08:42:11AM +0000, Cristian Marussi wrote:

[...]

> >
> > Just wondering if it is better to stop receiving notifications from firmware
> > first and then cancel any pending work ? Basically reverse order of probe
> > for remove.
> >
>
> I think the order is irrelevant given the dead_srcu gating, BUT indeed I
> kept this order so as to keep the undo in reverse order: in fact the
> probe at first issues some INIT_WORK, but the real schedule_work happens
> only later after a notif is received, so the order is:
>
> - init_srcu
> - static WORK init
> - register SCMI notif callback
> - RX notify msg
> - register reboot notifier
> - schedule delayed work
>
> Also, even if the notifiers are inhibited by dead_srcu, I felt better to
> cancel that work as soon as possible.
>
> Thoughts ?
>

All valid points, with that I am OK to leave it as is. I was mainly thinking
of avoiding any further notifications when the device is being removed. So
doing that as early as possible would avoid handling of any late notifications
from the SCMI firmware.

--
Regards,
Sudeep