summaryrefslogtreecommitdiff
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-01-05 15:57:59 -0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-01-15 09:29:29 -0800
commita4b24c7560ba64c3c54d8f90ee033a6f0565f8d3 (patch)
tree7e702e463226973154bdd126f8d61f964865bd3b /include/linux/remoteproc.h
parentb26210cda63564a7478486faaea713f6ea965633 (diff)
remoteproc: Cache resource table size
We don't re-read the resource table during a recovery, so it is possible in the recovery path that the resource table has a different size than cached_table. Store the original size of cached_table to avoid these getting out of sync. 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>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 6f1d8e025c81..6fdc62e29d6f 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -410,6 +410,7 @@ enum rproc_crash_type {
* @max_notifyid: largest allocated notify id.
* @table_ptr: pointer to the resource table in effect
* @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
*/
struct rproc {
@@ -440,6 +441,7 @@ struct rproc {
int max_notifyid;
struct resource_table *table_ptr;
struct resource_table *cached_table;
+ size_t table_sz;
bool has_iommu;
bool auto_boot;
};