From a91c0d19fcbd14e26be2948b2dbb906052673e1f Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 14 Sep 2020 20:46:48 -0700 Subject: [PATCH] soc: qcom: msm_glink_ssr: Notify on powerup failure There have been situations where the remote boots up far enough to establish glink communication to other remote processors but not far enough that APPS recognizes that the remote proc has been brought out of reset. The remote procs that have established connection with the "boot failed" remote proc will crash from having a stale state once the "boot failed" remote proc is restarted. Send a cleanup message on powerup failure so remote procs can cleanup their state with the remote proc that failed to start. Change-Id: If6fae349bb5f45fb544275a4ba2320d5f12fe4fc Signed-off-by: Chris Lew --- drivers/soc/qcom/msm_glink_ssr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/msm_glink_ssr.c b/drivers/soc/qcom/msm_glink_ssr.c index 363dd8eba764..09aefc7903b0 100644 --- a/drivers/soc/qcom/msm_glink_ssr.c +++ b/drivers/soc/qcom/msm_glink_ssr.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #include @@ -74,7 +74,7 @@ static int glink_ssr_ssr_cb(struct notifier_block *this, struct do_cleanup_msg msg; int ret; - if (code == SUBSYS_AFTER_SHUTDOWN) { + if (code == SUBSYS_AFTER_SHUTDOWN || code == SUBSYS_POWERUP_FAILURE) { ssr->seq_num++; reinit_completion(&ssr->completion);