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>
This commit is contained in:
Bjorn Andersson 2018-01-05 15:57:59 -08:00
parent b26210cda6
commit a4b24c7560
2 changed files with 9 additions and 13 deletions

View file

@ -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;
};