aboutsummaryrefslogtreecommitdiffstats
path: root/runlist_procfs.c
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2024-04-09 11:37:03 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2024-04-09 11:37:03 -0400
commit31964208e4dc0243b6b31b9967c77a791aeb995c (patch)
treeab8c8a3f80788742488ef07877359cc336b48360 /runlist_procfs.c
parenteeeba53923ea236007e1e807efa69cb03d195044 (diff)
Return const pointers to string constants.
Also update how Instance Pointers are aligned in the runlist output to make them more easily distinguishable from other fields.
Diffstat (limited to 'runlist_procfs.c')
-rw-r--r--runlist_procfs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/runlist_procfs.c b/runlist_procfs.c
index 7dedee3..e50c34a 100644
--- a/runlist_procfs.c
+++ b/runlist_procfs.c
@@ -15,8 +15,9 @@
15#ifdef DETAILED_CHANNEL_INFO 15#ifdef DETAILED_CHANNEL_INFO
16static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state *g, uint32_t chid, char *prefix) { 16static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state *g, uint32_t chid, char *prefix) {
17 channel_ctrl_t chan; 17 channel_ctrl_t chan;
18 char *loc_txt; 18 const char *loc_txt;
19 u64 instance_ptr; 19 uint64_t instance_ptr;
20
20 chan.raw = nvdebug_readq(g, NV_PCCSR_CHANNEL_INST(chid)); 21 chan.raw = nvdebug_readq(g, NV_PCCSR_CHANNEL_INST(chid));
21 loc_txt = target_to_text(chan.inst_target); 22 loc_txt = target_to_text(chan.inst_target);
22 if (!loc_txt) 23 if (!loc_txt)
@@ -34,8 +35,8 @@ static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state
34 seq_printf(s, "%s| Status: %2d|\n", prefix, chan.status); 35 seq_printf(s, "%s| Status: %2d|\n", prefix, chan.status);
35 seq_printf(s, "%s| Busy: %d|\n", prefix, chan.busy); 36 seq_printf(s, "%s| Busy: %d|\n", prefix, chan.busy);
36 seq_printf(s, "%s| Instance PTR: |\n", prefix); 37 seq_printf(s, "%s| Instance PTR: |\n", prefix);
37 seq_printf(s, "%s| %#018llx |\n", prefix, instance_ptr); 38 seq_printf(s, "%s| %#018llx|\n", prefix, instance_ptr);
38 seq_printf(s, "%s| %-20s|\n", prefix, loc_txt); 39 seq_printf(s, "%s| %20s|\n", prefix, loc_txt);
39 seq_printf(s, "%s| Instance bound: %d|\n", prefix, chan.inst_bind); 40 seq_printf(s, "%s| Instance bound: %d|\n", prefix, chan.inst_bind);
40 // START TEMP 41 // START TEMP
41 // "runlist_id -1 is synonym for the ENGINE_GR_GK20A runlist id" 42 // "runlist_id -1 is synonym for the ENGINE_GR_GK20A runlist id"
@@ -155,8 +156,8 @@ static int runlist_file_seq_show(struct seq_file *s, void *raw_rl_iter) {
155 seq_printf(s, "%s| Runqueue Selector: %d|\n", indt, 156 seq_printf(s, "%s| Runqueue Selector: %d|\n", indt,
156 ((struct gv100_runlist_chan*)entry)->runqueue_selector); 157 ((struct gv100_runlist_chan*)entry)->runqueue_selector);
157 seq_printf(s, "%s| Instance PTR: |\n", indt); 158 seq_printf(s, "%s| Instance PTR: |\n", indt);
158 seq_printf(s, "%s| %#018llx |\n", indt, instance_ptr); 159 seq_printf(s, "%s| %#018llx|\n", indt, instance_ptr);
159 seq_printf(s, "%s| %-20s|\n", indt, target_to_text(inst_target(g, entry))); 160 seq_printf(s, "%s| %20s|\n", indt, target_to_text(inst_target(g, entry)));
160 seq_printf(s, "%s+---------------------+\n", indt); 161 seq_printf(s, "%s+---------------------+\n", indt);
161#endif 162#endif
162 } 163 }