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 <[email protected]> Signed-off-by: Subramaniam Chanderashekarapuram <[email protected]> Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Tero Kristo <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Andrew F. Davis <[email protected]> Acked-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 5f31b23 commit 232ba6c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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)