[PATCH v2 2/2] remoteproc: k3-m4: Enable crash recovery for a core Linux booted
From: Chrispine Tinega
Date: Mon Nov 16 2026 - 13:42:35 EST
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@xxxxxxxxxxxxxxxxxxx>
---
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