Skip to content

Commit b0cdc6a

Browse files
tinghan-shenmathieupoirier
authored andcommitted
remoteproc: mediatek: Report watchdog crash to all cores
To ensure consistent behavior, the watchdog timeout handling of the multi-core SCP should reset the whole SCP sub-system when watchdog timeout. Triggering the rproc recovery flow on all instances will ensure proper recovery of the SCP sub-system. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230901080935.14571-13-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 5d5cfce commit b0cdc6a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/remoteproc/mtk_scp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ EXPORT_SYMBOL_GPL(scp_put);
6868

6969
static void scp_wdt_handler(struct mtk_scp *scp, u32 scp_to_host)
7070
{
71+
struct mtk_scp_of_cluster *scp_cluster = scp->cluster;
72+
struct mtk_scp *scp_node;
73+
7174
dev_err(scp->dev, "SCP watchdog timeout! 0x%x", scp_to_host);
72-
rproc_report_crash(scp->rproc, RPROC_WATCHDOG);
75+
76+
/* report watchdog timeout to all cores */
77+
list_for_each_entry(scp_node, &scp_cluster->mtk_scp_list, elem)
78+
rproc_report_crash(scp_node->rproc, RPROC_WATCHDOG);
7379
}
7480

7581
static void scp_init_ipi_handler(void *data, unsigned int len, void *priv)

0 commit comments

Comments
 (0)