diff options
author | Sibi Sankar <sibis@codeaurora.org> | 2018-10-01 10:25:00 -0400 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-10-06 02:33:46 -0400 |
commit | d3ae96c0e6b042a883927493351b2af6ee05e92c (patch) | |
tree | 62246e7d3c52758132c546faa7f1d576e03ffe00 | |
parent | 1bb89893d4fa8275333b3ed74fb0379d63025f9a (diff) |
remoteproc: qcom: q6v5: Fix a race condition on fatal crash
Currently with GLINK_SSR enabled each fatal crash results in servicing
a crash from wdog as well. This is due to a race that occurs in setting
the running flag in the shutdown path. Fix this by moving the running
flag to the end of fatal interrupt handler.
Crash Logs:
qcom-q6v5-pil 4080000.remoteproc: fatal error without message
remoteproc remoteproc0: crash detected in 4080000.remoteproc: type fatal
error
remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc
remoteproc remoteproc0: recovering 4080000.remoteproc
qcom-q6v5-pil 4080000.remoteproc: watchdog without message
remoteproc remoteproc0: crash detected in 4080000.remoteproc: type watchdog
remoteproc:glink-edge: intent request timed out
qcom_glink_ssr remoteproc:glink-edge.glink_ssr.-1.-1: failed to send
cleanup message
qcom_glink_ssr remoteproc:glink-edge.glink_ssr.-1.-1: timeout waiting
for cleanup done message
qcom-q6v5-pil 4080000.remoteproc: timed out on wait
qcom-q6v5-pil 4080000.remoteproc: port failed halt
remoteproc remoteproc0: stopped remote processor 4080000.remoteproc
qcom-q6v5-pil 4080000.remoteproc: MBA booted, loading mpss
remoteproc remoteproc0: remote processor 4080000.remoteproc is now up
remoteproc remoteproc0: handling crash #2 in 4080000.remoteproc
remoteproc remoteproc0: recovering 4080000.remoteproc
qcom-q6v5-pil 4080000.remoteproc: port failed halt
remoteproc remoteproc0: stopped remote processor 4080000.remoteproc
qcom-q6v5-pil 4080000.remoteproc: MBA booted, loading mpss
remoteproc remoteproc0: remote processor 4080000.remoteproc is now up
Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r-- | drivers/remoteproc/qcom_q6v5.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index e9ab90c19304..edeb2e43209e 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c | |||
@@ -84,6 +84,7 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *data) | |||
84 | else | 84 | else |
85 | dev_err(q6v5->dev, "fatal error without message\n"); | 85 | dev_err(q6v5->dev, "fatal error without message\n"); |
86 | 86 | ||
87 | q6v5->running = false; | ||
87 | rproc_report_crash(q6v5->rproc, RPROC_FATAL_ERROR); | 88 | rproc_report_crash(q6v5->rproc, RPROC_FATAL_ERROR); |
88 | 89 | ||
89 | return IRQ_HANDLED; | 90 | return IRQ_HANDLED; |
@@ -150,8 +151,6 @@ int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5) | |||
150 | { | 151 | { |
151 | int ret; | 152 | int ret; |
152 | 153 | ||
153 | q6v5->running = false; | ||
154 | |||
155 | qcom_smem_state_update_bits(q6v5->state, | 154 | qcom_smem_state_update_bits(q6v5->state, |
156 | BIT(q6v5->stop_bit), BIT(q6v5->stop_bit)); | 155 | BIT(q6v5->stop_bit), BIT(q6v5->stop_bit)); |
157 | 156 | ||