From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org
Cc: sudeep.holla@kernel.org, philip.radford@arm.com,
james.quinlan@broadcom.com, f.fainelli@gmail.com,
vincent.guittot@linaro.org, etienne.carriere@foss.st.com,
peng.fan@oss.nxp.com, michal.simek@amd.com,
dan.carpenter@linaro.org, gatien.chevallier@foss.st.com,
Cristian Marussi <cristian.marussi@arm.com>
Subject: Re: [RFC PATCH 0/4] Rework SCMI transport drivers probing sequence
Date: Thu, 19 Mar 2026 11:46:18 +0000 [thread overview]
Message-ID: <abviCkBeX9uzsgxy@pluto> (raw)
In-Reply-To: <20260317165811.3352752-1-cristian.marussi@arm.com>
On Tue, Mar 17, 2026 at 04:58:07PM +0000, Cristian Marussi wrote:
> Hi,
>
Hi,
a clarification replying to myself down-below... O_o
> when the SCMI transports were split out into standalone drivers [1] the
> probe sequence was laid out in such a way that:
>
> - the transport drivers would have probed first, triggered by the firmware
> driven discovery process (DT/ACPI)
>
> - afterwards the control would have been passed to the core SCMI stack
> driver via the creation of a dedicated device that would have inherited
> the original firmware descriptor (since that same DT/ACPI node would
> have still needed by the SCMI core driver to be parsed)
>
> The tricky part came around with some transport driver like virtio and
> optee since they are, in turn, upfront dependent on an external distinct
> kernel subsystem; IOW these have first to undergo their own subsystem
> specific probe/initialization to become fully operational as transports:
> this kind of initialization sequencing of course must deal with the
> possibility of probe deferrals BUT at that time we avoid this by using the
> trick in virtio/optee transports to register the next stage transport
> drivers ONLY at the end of the subsystem specific probe routine, from
> within the probe itself.
>
> This behaviour has 2 issues:
>
> - it is frowned upon and can lead to hangs in the driver core whenever
> some core locking is changed as exposed in [2]
> - it limits these transport drivers to a single instance probing since of
> course you cannot register the same driver more than once
>
> All of this was tolerable because optee/virtio are generally only employed
> in a single SCMI instance scenario AND because no hang where triggered in
> the core driver subsystem... (not saying that was perfectly fine :P)
>
> This RFC series aims to solve both of the above issue by:
>
> - moving the problematic platform driver registation away from the probe
> into its own module_init/exit
>
> - introducing an optional mechanism for the transport drivers to provide
> to the SCMI core some sort of transport specific handle so that multiple
> instances can be supported and multiple probed transports instances can
> be registered and identified by the core. (who is who)
> Note that at the same time this optional handle-mechanism is used to
> synchronize the drivers probing sequences and possibly trigger, when
> needed, the probe deferrals, if the transport driver has still to
> undergo its own subsystem initialization and as such is still NOT fully
> operational.
Implementation issues aside, one thing that I failed to make clear about
this series is that, while this series addresses the platform registration
@probe-time issue above and enables the capability to technically support
multiple SCMI instances also for optee/virtio transports (like it is
already for mailbox and smc), the multi instance support for optee/virtio,
as of now, still suffers from some 'structural' limitations that make it
unfit for production and useful ONLY on a testing scenario (...like in my
virtio based setup :D)
The crux of the matter lays in the fact that there is still not a way
in such transports to be able to match a specific probed transport instance
(device) with the corresponding SCMI DT top node instance descriptor that
usually, in a multi instance scenario, describes a different set of
protocols, or the same set of protocols enumerating a different set of
resources...so, e.g., if you want to match and reference by phandle a
specific clock domain from a specific instance you cannot really be sure
that the instance reference that you have is the instance that you wanted
since depends on how that was associated during the probe.
(in mailbox and smc you have an explicit channel/shmem association ...)
Still a lot to reason about this as of now...any suggestion about this
is even more very much welcome :P
Thanks,
Cristian
prev parent reply other threads:[~2026-03-19 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 16:58 [RFC PATCH 0/4] Rework SCMI transport drivers probing sequence Cristian Marussi
2026-03-17 16:58 ` [RFC PATCH 1/4] firmware: arm_scmi: Add transport instance handle Cristian Marussi
2026-03-17 16:58 ` [RFC PATCH 2/4] firmware: arm_scmi: Propagate " Cristian Marussi
2026-03-17 16:58 ` [RFC PATCH 3/4] firmware: arm_scmi: virtio: Rework transport probe sequence Cristian Marussi
2026-03-17 16:58 ` [RFC PATCH 4/4] firmware: arm_scmi: optee: " Cristian Marussi
2026-03-19 11:46 ` Cristian Marussi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abviCkBeX9uzsgxy@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=etienne.carriere@foss.st.com \
--cc=f.fainelli@gmail.com \
--cc=gatien.chevallier@foss.st.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=peng.fan@oss.nxp.com \
--cc=philip.radford@arm.com \
--cc=sudeep.holla@kernel.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox