Re: [PATCH] remoteproc: qcom_q6v5_pas: add HPASS ADSP cluster boot-order and SSR coupling

From: Shawn Guo

Date: Mon Aug 10 2026 - 07:34:46 EST


On Mon, Aug 10, 2026 at 07:07:21PM +0800, Shawn Guo wrote:
> Some Qualcomm SoCs (e.g. Nord's HPASS ADSP0/1/2) group multiple PAS
> instances that share clock/reset/NoC resources: one instance (the
> "root") must finish booting before its siblings can cold boot, and any
> member crashing, or being manually stopped on its own, must bring the
> whole group down and back up together - matching the downstream
> coupled-SSR ("MDF") group model, which never leaves the group in a
> partially up/down state and has no notion of restarting a single
> member alone.
>
> Add a shared, kref-managed struct qcom_pas_cluster (mutex, members
> list, waitqueue, booted/restart_pending flags), looked up or created
> order-independently in qcom_pas_probe() keyed by the cluster root's
> device_node (works regardless of which member probes first), and torn
> down via kref_put() in qcom_pas_remove().
>
> Non-root members now wait for the root to finish booting before their
> own qcom_pas_start()/qcom_pas_attach() proceeds (qcom_pas_wait_for_cluster_root()),
> and the root marks the cluster booted once it completes its own boot
> (qcom_pas_cluster_mark_booted()).
>
> A new subdev callback, qcom_pas_cluster_stop(), fans a stop event on
> any one member out to every other member: a real crash is propagated
> via rproc_report_crash() so the whole cluster crashes and automatically
> recovers together, while a manual (non-crash) stop instead force-stops
> every other member via a deferred rproc_shutdown() (run from a
> dedicated work item, since calling it inline would race with the
> target's own concurrently running IRQ-driven state machine). A
> restart_pending latch ensures only the first member to observe the
> stop acts on the rest, and is cleared once the root reboots.
>
> A manual start of a single non-root member is deliberately not turned
> into a whole-cluster boot: qcom_pas_wait_for_cluster_root() just waits
> out its timeout and fails if the root isn't already up, rejecting the
> solo start rather than force-booting the root on the caller's behalf.
> ---
> drivers/remoteproc/qcom_q6v5_pas.c | 271 +++++++++++++++++++++++++++++
> 1 file changed, 271 insertions(+)

Sorry! Please disregard this.

Shawn