]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
remoteproc: Reset table_ptr on stop
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 5 Jan 2018 23:58:05 +0000 (15:58 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 15 Jan 2018 17:30:04 +0000 (09:30 -0800)
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>
drivers/remoteproc/remoteproc_core.c

index 84e07d5b7c2c36fba2a1e1bf4f2834f3ded5ae43..4170dfbd93bdba5e9fa6a57e5c68ec9d95a9a274 100644 (file)
@@ -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) {