Skip to content

Commit 232ba6c

Browse files
sumanannaandersson
authored andcommitted
remoteproc/omap: Report device exceptions and trigger recovery
The OMAP remote processors send a special mailbox message (RP_MBOX_CRASH) when they crash and detect an internal device exception. Add support to the mailbox handling function upon detection of this special message to report this crash to the remoteproc core. The remoteproc core can trigger a recovery using the prevailing recovery mechanism, already in use for MMU Fault recovery. Co-developed-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Andrew F. Davis <afd@ti.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200324110035.29907-14-t-kristo@ti.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
1 parent 5f31b23 commit 232ba6c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/remoteproc/omap_remoteproc.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,12 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data)
383383

384384
switch (msg) {
385385
case RP_MBOX_CRASH:
386-
/* just log this for now. later, we'll also do recovery */
386+
/*
387+
* remoteproc detected an exception, notify the rproc core.
388+
* The remoteproc core will handle the recovery.
389+
*/
387390
dev_err(dev, "omap rproc %s crashed\n", name);
391+
rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR);
388392
break;
389393
case RP_MBOX_ECHO_REPLY:
390394
dev_info(dev, "received echo reply from %s\n", name);

0 commit comments

Comments
 (0)