From: Bjorn Andersson <andersson@kernel.org>
To: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Cc: Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Trilok Soni <quic_tsoni@quicinc.com>,
Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
Rajendra Nayak <quic_rjendra@quicinc.com>,
Elliot Berman <quic_eberman@quicinc.com>,
Guru Das Srinagesh <quic_gurus@quicinc.com>
Subject: Re: [PATCH v1 2/3] remoteproc: qcom: q6v5: Do not report crash if SSR is disabled
Date: Wed, 28 Dec 2022 10:22:40 -0600 [thread overview]
Message-ID: <20221228162240.y2eaki6tzhkprxg3@builder.lan> (raw)
In-Reply-To: <1a548f4e7373c12159f8d866dc0e12d224460036.1662995608.git.quic_gokukris@quicinc.com>
On Mon, Sep 19, 2022 at 09:00:39AM -0700, Gokul krishna Krishnakumar wrote:
> In case recovery is disabled, do not report the rproc crash
> to the framework. If recovery is enabled after we start the
> crash handler we may end up in a weird state by informing
> clients of a crash twice, resulting in undefined behaviour.
>
Afaict rproc_report_crash() schedules work which does nothing useful if
!rproc->recovery_disabled.
Can you please help me understand the issue you're seeing, and
preferably spell out what the resulting weird state is.
Thanks,
Bjorn
> Change-Id: If0d9bf5aa2c6f9e25adcefaca14b2de60fcb1a7a
> Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
> ---
> drivers/remoteproc/qcom_q6v5.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
> index 89f5384..1b9e1e1 100644
> --- a/drivers/remoteproc/qcom_q6v5.c
> +++ b/drivers/remoteproc/qcom_q6v5.c
> @@ -103,6 +103,8 @@ static void qcom_q6v5_crash_handler_work(struct work_struct *work)
>
> mutex_lock(&rproc->lock);
>
> + rproc->state = RPROC_CRASHED;
> +
> list_for_each_entry_reverse(subdev, &rproc->subdevs, node) {
> if (subdev->stop)
> subdev->stop(subdev, true);
> @@ -139,8 +141,8 @@ static irqreturn_t q6v5_wdog_interrupt(int irq, void *data)
> q6v5->running = false;
> if (q6v5->rproc->recovery_disabled)
> schedule_work(&q6v5->crash_handler);
> -
> - rproc_report_crash(q6v5->rproc, RPROC_WATCHDOG);
> + else
> + rproc_report_crash(q6v5->rproc, RPROC_WATCHDOG);
>
> return IRQ_HANDLED;
> }
> @@ -163,8 +165,8 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *data)
> q6v5->running = false;
> if (q6v5->rproc->recovery_disabled)
> schedule_work(&q6v5->crash_handler);
> -
> - rproc_report_crash(q6v5->rproc, RPROC_FATAL_ERROR);
> + else
> + rproc_report_crash(q6v5->rproc, RPROC_FATAL_ERROR);
>
> return IRQ_HANDLED;
> }
> --
> 2.7.4
>
next prev parent reply other threads:[~2022-12-28 16:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 18:35 [PATCH v1 0/3] Handle coprocessor crash Gokul krishna Krishnakumar
2022-09-13 18:35 ` [PATCH v1 1/3] remoteproc: qcom: q6v5: Send subdevice notifications before panic Gokul krishna Krishnakumar
2022-09-19 16:00 ` Gokul krishna Krishnakumar
2022-09-23 7:03 ` Peng Fan
2022-12-28 16:20 ` Bjorn Andersson
2022-09-13 18:35 ` [PATCH v1 2/3] remoteproc: qcom: q6v5: Do not report crash if SSR is disabled Gokul krishna Krishnakumar
2022-09-19 16:00 ` Gokul krishna Krishnakumar
2022-09-23 7:05 ` Peng Fan
2022-12-28 16:22 ` Bjorn Andersson [this message]
2022-09-13 18:35 ` [PATCH v1 3/3] remoteproc: qcom: q6v5: Avoid setting smem bit in case of crash shutdown Gokul krishna Krishnakumar
2022-09-19 16:00 ` Gokul krishna Krishnakumar
2022-09-19 16:00 ` [PATCH v1 0/3] Handle coprocessor crash Gokul krishna Krishnakumar
2022-12-28 18:18 ` (subset) " Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221228162240.y2eaki6tzhkprxg3@builder.lan \
--to=andersson@kernel.org \
--cc=agross@kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=quic_eberman@quicinc.com \
--cc=quic_gokukris@quicinc.com \
--cc=quic_gurus@quicinc.com \
--cc=quic_rjendra@quicinc.com \
--cc=quic_satyap@quicinc.com \
--cc=quic_tsoni@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).