From a4b24c7560ba64c3c54d8f90ee033a6f0565f8d3 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Fri, 5 Jan 2018 15:57:59 -0800 Subject: 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 Tested-By: Loic Pallardy Signed-off-by: Bjorn Andersson --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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; }; -- cgit v1.2.3