Skip to contentSkip to conversation

remoteproc: core: Set trace buffer name for diagnostics

PATCH New Yonghao Zhang 1 participant 1 message Sep 11 Remote processor (remoteproc)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: core: Set trace buffer name for diagnostics

rproc_trace_read() (in remoteproc_debugfs.c) prints the name of a trace buffer whose device address could not be resolved, but nothing ever assigns trace_mem.name, so that the diagnostics always prints an empty string:

Trace not available

Copy the generated "trace%d" name into the memory entry, so the diagnostics identifies the buffer failed to translate.

Fixes a987e6b91a5a ("remoteproc: fix trace buffer va initialization")
Assisted-by Claude-Code:glm-5.3
---
 drivers/remoteproc/remoteproc_core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/remoteproc/remoteproc_core.c +3 -0
index 1ed406714849..263e12f022ea 100644
@@ -574,6 +574,9 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr,
 	/* create the debugfs entry */
 	trace->tfile = rproc_create_trace_file(name, rproc, trace);
 
+	/* keep the name for the diagnostic in rproc_trace_read() */
+	strscpy(trace->trace_mem.name, name, sizeof(trace->trace_mem.name));
+
 	list_add_tail(&trace->node, &rproc->traces);
 
 	rproc->num_traces++;
Signature · 1 line
2.34.1