summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSubramaniam Chanderashekarapuram <subramaniam.ca@ti.com>2012-06-25 17:43:49 -0500
committerAndy Green <andy.green@linaro.org>2012-09-07 13:05:52 +0800
commit4560dd7b8f6028c98f33920ed5f14fa96d972dcf (patch)
treed91c6e15b2c64f24ab2e9585ec2079cd742be2ad /include
parente59d076a77e700513a6f26a12ff41071e202c227 (diff)
remoteproc: implement last trace for remoteproc
The last trace is a way of preserving the remoteproc traces past remoteproc recovery. This is achieved by creating a new last_trace debugfs entry during a crash for each trace entry, and copying the trace buffer contents into the corresponding last trace entry. This copy can then be read out using a debugfs entry. The trace entries themselves are cleaned up after the copy and are recreated during recovery. Something like, cat <debugfs root>/remoteproc/remoteprocX/traceX_last should give the traces that were printed out just before the recovery happened. Change-Id: I2d6879421022a895dc34dfcc5c003ff33779128c Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/remoteproc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 43beddccd95b..fe2c7f6cdd2c 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -425,6 +425,8 @@ enum rproc_err {
* @dbg_dir: debugfs directory of this rproc device
* @traces: list of trace buffers
* @num_traces: number of trace buffers
+ * @last_traces: list of last trace buffers
+ * @num_last_traces: number of last trace buffers
* @carveouts: list of physically contiguous memory allocations
* @mappings: list of iommu mappings we initiated, needed on shutdown
* @firmware_loading_complete: marks e/o asynchronous firmware loading
@@ -454,6 +456,8 @@ struct rproc {
struct dentry *dbg_dir;
struct list_head traces;
int num_traces;
+ struct list_head last_traces;
+ int num_last_traces;
struct list_head carveouts;
struct list_head mappings;
struct completion firmware_loading_complete;