lkml.org 
[lkml]   [2018]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 8/8] remoteproc: Reset table_ptr on stop
Date
The installed resource table is no longer accessible after stopping the
remote, so update table_ptr to point to the local copy.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- None

drivers/remoteproc/remoteproc_core.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 84e07d5b7c2c..4170dfbd93bd 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) {
--
2.15.0
\
 
 \ /
  Last update: 2018-01-06 00:59    [W:0.078 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site