From: Chrispine Tinega <dev@chrispinetinega.com>
To: Francesco Valla <francesco@valla.it>
Cc: andersson@kernel.org, mathieu.poirier@linaro.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] remoteproc: k3: Report a remote crash to the remoteproc core
Date: Wed, 18 Nov 2026 22:44:03 +0300 [thread overview]
Message-ID: <20261118194415.1757945-1-dev@chrispinetinega.com> (raw)
In-Reply-To: <av3YQ1tKSABEha9o@bywater>
Hi Francesco,
On Wed, Nov 18, 2026 at 05:57:10PM +0100, Francesco Valla wrote:
> Did you have the chance to take a look at the review sashiko did?
> I think the points about the leaks in IPC mode make sense and are worth
> an investigation, both for the M4 and R5F cases.
I had not, thanks. Both of its points on patch 1 hold, and they have
one cause: v2 reports a crash for a core that Linux did not boot.
1. IPC-only mode. Once a DETACHED or ATTACHED core is RPROC_CRASHED,
rproc_detach() refuses it with -EINVAL. The DSP and R5F remove paths
only detach an RPROC_ATTACHED core, so they skip it and leak its
carveouts and subdevices. The R5F also has no start or stop ops in
this mode. On the M4F and DSP, a shutdown would reset a core that
Linux never started.
2. Probe. All three drivers request the mailbox before
devm_rproc_add(), so a crash queued during probe is never cancelled
if probe then fails. In IPC-only mode the crash work can itself
cause the failure, by setting RPROC_CRASHED before rproc_validate()
runs. A crash the core sent before Linux probed is enough, since it
waits in the mailbox until the channel is opened.
For v3 I report the crash only when the core is RPROC_RUNNING, and keep
the log line otherwise:
case RP_MBOX_CRASH:
if (rproc->state == RPROC_RUNNING)
rproc_report_crash(rproc, RPROC_FATAL_ERROR);
else
dev_err(dev, "K3 rproc %s crashed\n", rproc->name);
break;
An IPC-only core is never RPROC_RUNNING, and no core is before
devm_rproc_add(). A core that Linux booted takes the same path as in
v2, so your stress test still covers it. Patch 2 is unchanged.
Recovering an IPC-only core needs the core to handle a crashed attached
core, for instance as RPROC_FEAT_ATTACH_ON_RECOVERY does. I would leave
that for a separate series.
The review also points at an unbalanced put_device() in
k3_rproc_unprepare(). I think that one is older than this series:
stopping an attached M4F or DSP through sysfs reaches it with no crash
at all. I will check it on a board and send it separately.
v3 builds with W=1 and checkpatch is clean. I will post it once your
stress test is done, unless you would rather have it now.
Regards,
Chrispine
next prev parent reply other threads:[~2026-11-18 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 18:41 [PATCH v2 0/2] remoteproc: k3: Recover a crashed remote core Chrispine Tinega
2026-11-16 18:41 ` [PATCH v2 1/2] remoteproc: k3: Report a remote crash to the remoteproc core Chrispine Tinega
2026-11-18 16:57 ` Francesco Valla
2026-11-18 19:44 ` Chrispine Tinega [this message]
2026-11-16 18:41 ` [PATCH v2 2/2] remoteproc: k3-m4: Enable crash recovery for a core Linux booted Chrispine Tinega
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=20261118194415.1757945-1-dev@chrispinetinega.com \
--to=dev@chrispinetinega.com \
--cc=andersson@kernel.org \
--cc=francesco@valla.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
/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
all inboxes | Powered by JetHome®