aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/remoteproc/remoteproc_internal.h
diff options
context:
space:
mode:
authorLoic Pallardy <loic.pallardy@st.com>2019-01-10 14:49:10 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-02-20 21:34:18 -0800
commita987e6b91a5ac0e08782506b1f879e37dab3b605 (patch)
treed52a79f360cc9e6beab7ff0d05857fa79857cc80 /drivers/remoteproc/remoteproc_internal.h
parentremoteproc: fix rproc_alloc_carveout() for rproc with iommu domain (diff)
downloadwireguard-linux-a987e6b91a5ac0e08782506b1f879e37dab3b605.tar.xz
wireguard-linux-a987e6b91a5ac0e08782506b1f879e37dab3b605.zip
remoteproc: fix trace buffer va initialization
With rproc_alloc_registered_carveouts() introduction, carveouts are allocated after resource table parsing. rproc_da_to_va() may return NULL at trace resource registering. This patch modifies trace debufs registering to provide device address (da) instead of va. da to va translation is done at each trace buffer access through debugfs interface. Fixes: d7c51706d095 ("remoteproc: add alloc ops in rproc_mem_entry struct") Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_internal.h')
-rw-r--r--drivers/remoteproc/remoteproc_internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h
index 2698775c5005..45ff76a06c72 100644
--- a/drivers/remoteproc/remoteproc_internal.h
+++ b/drivers/remoteproc/remoteproc_internal.h
@@ -25,6 +25,13 @@
struct rproc;
+struct rproc_debug_trace {
+ struct rproc *rproc;
+ struct dentry *tfile;
+ struct list_head node;
+ struct rproc_mem_entry trace_mem;
+};
+
/* from remoteproc_core.c */
void rproc_release(struct kref *kref);
irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id);
@@ -37,7 +44,7 @@ int rproc_remove_virtio_dev(struct device *dev, void *data);
/* from remoteproc_debugfs.c */
void rproc_remove_trace_file(struct dentry *tfile);
struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc,
- struct rproc_mem_entry *trace);
+ struct rproc_debug_trace *trace);
void rproc_delete_debug_dir(struct rproc *rproc);
void rproc_create_debug_dir(struct rproc *rproc);
void rproc_init_debugfs(void);