From: Chrispine Tinega <dev@chrispinetinega.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org
Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
francesco@valla.it, Chrispine Tinega <dev@chrispinetinega.com>
Subject: [PATCH v2 2/2] remoteproc: k3-m4: Enable crash recovery for a core Linux booted
Date: Mon, 16 Nov 2026 21:41:45 +0300 [thread overview]
Message-ID: <20261116184146.1897281-3-dev@chrispinetinega.com> (raw)
In-Reply-To: <20261116184146.1897281-1-dev@chrispinetinega.com>
The M4 driver disables recovery, but nothing reported a crash to the
remoteproc core, so there was nothing to recover from. Now that
RP_MBOX_CRASH reaches rproc_report_crash(), recovery resets the M4F and
boots its firmware again, while Linux keeps running. The stop is a
plain reset, so it does not need the crashed core's cooperation.
Enable recovery by default when Linux booted the M4F. Keep it disabled
in IPC-only mode, where Linux only attached: recovery boots
rproc->firmware from Linux, which need not be the firmware started
before Linux, and nothing would tell the user it was replaced.
Userspace can still change it through
/sys/class/remoteproc/remoteprocN/recovery.
Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
---
Changes in v2:
- Keep recovery disabled in IPC-only mode, where Linux only attached
and recovery could boot a different firmware unnoticed. (Francesco)
- Retitled from "remoteproc: k3-m4: Leave crash recovery enabled".
drivers/remoteproc/ti_k3_m4_remoteproc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/ti_k3_m4_remoteproc.c b/drivers/remoteproc/ti_k3_m4_remoteproc.c
index 4c46f4a25..b2a187ea4 100644
--- a/drivers/remoteproc/ti_k3_m4_remoteproc.c
+++ b/drivers/remoteproc/ti_k3_m4_remoteproc.c
@@ -56,7 +56,6 @@ static int k3_m4_rproc_probe(struct platform_device *pdev)
return -ENOMEM;
rproc->has_iommu = false;
- rproc->recovery_disabled = true;
kproc = rproc->priv;
kproc->dev = dev;
kproc->rproc = rproc;
@@ -105,6 +104,11 @@ static int k3_m4_rproc_probe(struct platform_device *pdev)
/* configure devices for either remoteproc or IPC-only mode */
if (p_state) {
rproc->state = RPROC_DETACHED;
+ /*
+ * Recovery boots rproc->firmware, which is not necessarily what
+ * was started before Linux attached.
+ */
+ rproc->recovery_disabled = true;
dev_info(dev, "configured M4F for IPC-only mode\n");
} else {
dev_info(dev, "configured M4F for remoteproc mode\n");
--
2.53.0
prev parent reply other threads:[~2026-11-16 18:42 UTC|newest]
Thread overview: 3+ 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-16 18:41 ` Chrispine Tinega [this message]
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=20261116184146.1897281-3-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®