remoteproc: qcom: Move glink_ssr notification after stop
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 16 Jul 2019 05:03:27 +0000 (22:03 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 24 Jul 2019 23:01:14 +0000 (16:01 -0700)
commit1417dba1034d644953238add381e31ada3a3a199
tree4154310550240d5288d08af3eeca4f9d5ed9cbbb
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
remoteproc: qcom: Move glink_ssr notification after stop

glink_ssr is used to signal a remote processor "A" about the stopping of
another remote processor "B", so that in the event that remote processor
B is ever booted again the fifos of the glink channel between A and B is
in a known state.

But if remote processor A receives this notification before B is
actually stopped the newly reset fifo indices will be interpreted as
there being "data" on the channel and either side of the channel will
enter a fatal error handler.

Move the glink_ssr notification to the "unprepare" state of the
rproc_subdev to avoid this issue.

This has the side effect of us not notifying the dying remote processor
itself about its fate, which has been seen to block in certain resource
constraint scenarios.

Tested-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/qcom_common.c