瀏覽代碼

remoteproc: Reset table_ptr on stop

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 <loic.pallardy@st.com>
Tested-By: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Bjorn Andersson 7 年之前
父節點
當前提交
0a8b81cb2e
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/remoteproc/remoteproc_core.c

+ 3 - 0
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) {