Commit 800dad00 authored by Mathieu Poirier's avatar Mathieu Poirier Committed by Bjorn Andersson

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: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Reviewed-by: default avatarArnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210312162453.1234145-14-mathieu.poirier@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 8088dd4d
......@@ -2733,7 +2733,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment