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:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user