Skip to content

Commit 103a443

Browse files
committed
remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq
Bugzilla: https://bugzilla.redhat.com/2150444 commit 0ad7e3e Author: Siddharth Gupta <sidgup@codeaurora.org> Date: Tue Jul 5 17:38:18 2022 +0530 remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq Due to firmware bugs on the Q6 the hardware watchdog irq can be triggered multiple times. As the remoteproc framework schedules work items for the recovery process, if the other threads do not get a chance to run before recovery is completed the proceeding threads will see the state of the remoteproc as running and kill the remoteproc while it is running. This can result in various SMMU and NOC errors. This change sets the state of the remoteproc to offline whenever a watchdog irq is received. Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/1657022900-2049-6-git-send-email-quic_sibis@quicinc.com Signed-off-by: Eric Chanudet <echanude@redhat.com>
1 parent e15ab87 commit 103a443

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/remoteproc/qcom_q6v5.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static irqreturn_t q6v5_wdog_interrupt(int irq, void *data)
112112
else
113113
dev_err(q6v5->dev, "watchdog without message\n");
114114

115+
q6v5->running = false;
115116
rproc_report_crash(q6v5->rproc, RPROC_WATCHDOG);
116117

117118
return IRQ_HANDLED;
@@ -123,6 +124,9 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *data)
123124
size_t len;
124125
char *msg;
125126

127+
if (!q6v5->running)
128+
return IRQ_HANDLED;
129+
126130
msg = qcom_smem_get(QCOM_SMEM_HOST_ANY, q6v5->crash_reason, &len);
127131
if (!IS_ERR(msg) && len > 0 && msg[0])
128132
dev_err(q6v5->dev, "fatal error received: %s\n", msg);

0 commit comments

Comments
 (0)