[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210310211025.1084636-14-mathieu.poirier@linaro.org>
Date: Wed, 10 Mar 2021 14:10:21 -0700
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: ohad@...ery.com, bjorn.andersson@...aro.org
Cc: arnaud.pouliquen@...com, mcoquelin.stm32@...il.com,
alexandre.torgue@...com, linux-remoteproc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v7 13/17] remoteproc: Properly deal with a kernel panic when attached
The panic handler operation of registered remote processors
should also be called when remote processors have been
attached to.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Reviewed-by: Peng Fan <peng.fan@....com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@...com>
---
drivers/remoteproc/remoteproc_core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index c488b1aa6119..f6f0813dade5 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -2728,7 +2728,11 @@ static int rproc_panic_handler(struct notifier_block *nb, unsigned long event,
rcu_read_lock();
list_for_each_entry_rcu(rproc, &rproc_list, node) {
- if (!rproc->ops->panic || rproc->state != RPROC_RUNNING)
+ if (!rproc->ops->panic)
+ continue;
+
+ if (rproc->state != RPROC_RUNNING &&
+ rproc->state != RPROC_ATTACHED)
continue;
d = rproc->ops->panic(rproc);
--
2.25.1
Powered by blists - more mailing lists