summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2021-03-12 19:24:47 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-03-18 16:00:51 +0300
commit9dc9507f1880fb6225e3e058cb5219b152cbf198 (patch)
tree08840dfef1ebf94c4875befd0c35f5d6f554adde /include
parentd3962a397885518a85d2dc6b0c51e6594f71c30f (diff)
downloadlinux-9dc9507f1880fb6225e3e058cb5219b152cbf198.tar.xz
remoteproc: Properly deal with the resource table when detaching
If it is possible to detach the remote processor, keep an untouched copy of the resource table. That way we can start from the same resource table without having to worry about original values or what elements the startup code has changed when re-attaching to the remote processor. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Link: https://lore.kernel.org/r/20210312162453.1234145-12-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/remoteproc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index fc2cca600423..8b795b544f75 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -516,6 +516,8 @@ struct rproc_dump_segment {
* @recovery_disabled: flag that state if recovery was disabled
* @max_notifyid: largest allocated notify id.
* @table_ptr: pointer to the resource table in effect
+ * @clean_table: copy of the resource table without modifications. Used
+ * when a remote processor is attached or detached from the core
* @cached_table: copy of the resource table
* @table_sz: size of @cached_table
* @has_iommu: flag to indicate if remote processor is behind an MMU
@@ -552,6 +554,7 @@ struct rproc {
bool recovery_disabled;
int max_notifyid;
struct resource_table *table_ptr;
+ struct resource_table *clean_table;
struct resource_table *cached_table;
size_t table_sz;
bool has_iommu;