remoteproc: Properly deal with the resource table when stopping
authorMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 12 Mar 2021 16:24:48 +0000 (09:24 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 18 Mar 2021 13:02:08 +0000 (08:02 -0500)
commit8088dd4d9316964901b13df09a20ee0f917f414d
tree553fb98176f70b328438668ca213a500ae7b7d0e
parent9dc9507f1880fb6225e3e058cb5219b152cbf198
remoteproc: Properly deal with the resource table when stopping

When a remote processor that was attached to is stopped, special care
must be taken to make sure the shutdown process is similar to what
it would be had it been started by the remoteproc core.

This patch takes care of that by making a copy of the resource
table currently used by the remote processor.  From that point on
the copy is used, as if the remote processor had been started by
the remoteproc core.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20210312162453.1234145-13-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c