projects/linux·commit 0a8b81cb

remoteproc: Reset table_ptr on stop

0a8b81cb · Bjorn Andersson <[email protected]> · 2018-01-05 15:58:05 -08:00

The installed resource table is no longer accessible after stopping the
remote, so update table_ptr to point to the local copy.

Reviewed-By: Loic Pallardy <[email protected]>
Tested-By: Loic Pallardy <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Commit
0a8b81cb2e413eff4cd9aeac7ef415150b699fb4
Parents
4f6fd5a0

Changes

1 files changed · +3 −0

FileStatusAddDelContent
drivers/remoteproc/remoteproc_core.cmodified+3−0View file

drivers/remoteproc/remoteproc_core.c

View file
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 84e07d5..4170dfb 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1000,6 +1000,9 @@ static int rproc_stop(struct rproc *rproc)
/* remove any subdevices for the remote processor */
rproc_remove_subdevices(rproc);
+ /* the installed resource table is no longer accessible */
+ rproc->table_ptr = rproc->cached_table;
+
/* power off the remote processor */
ret = rproc->ops->stop(rproc);
if (ret) {