]> www.infradead.org Git - users/jedix/linux-maple.git/commit
remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop
authorRichard Maina <quic_rmaina@quicinc.com>
Wed, 29 May 2024 18:09:58 +0000 (11:09 -0700)
committerBjorn Andersson <andersson@kernel.org>
Wed, 29 May 2024 19:59:14 +0000 (12:59 -0700)
commit568b13b65078e2b557ccf47674a354cecd1db641
treea732ad63ebb0296bdbe0968ea3ac934afcf2d684
parent2e3f0d693875db698891ffe89a18121bda5b95b8
remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop

When remoteproc goes down unexpectedly this results in a state where any
acquired hwspinlocks will remain locked possibly resulting in deadlock.
In order to ensure all locks are freed we include a call to
qcom_smem_bust_hwspin_lock_by_host() during remoteproc shutdown.

For qcom_q6v5_pas remoteprocs, each remoteproc has an assigned smem
host_id. Remoteproc can pass this id to smem to try and bust the lock on
remoteproc stop.

This edge case only occurs with q6v5_pas watchdog crashes. The error
fatal case has handling to clear the hwspinlock before the error fatal
interrupt is triggered.

Signed-off-by: Richard Maina <quic_rmaina@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-4-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/remoteproc/qcom_q6v5_pas.c