From 31964208e4dc0243b6b31b9967c77a791aeb995c Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Tue, 9 Apr 2024 11:37:03 -0400 Subject: 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. --- runlist_procfs.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'runlist_procfs.c') 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 @@ #ifdef DETAILED_CHANNEL_INFO static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state *g, uint32_t chid, char *prefix) { channel_ctrl_t chan; - char *loc_txt; - u64 instance_ptr; + const char *loc_txt; + uint64_t instance_ptr; + chan.raw = nvdebug_readq(g, NV_PCCSR_CHANNEL_INST(chid)); loc_txt = target_to_text(chan.inst_target); if (!loc_txt) @@ -34,8 +35,8 @@ static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state seq_printf(s, "%s| Status: %2d|\n", prefix, chan.status); seq_printf(s, "%s| Busy: %d|\n", prefix, chan.busy); seq_printf(s, "%s| Instance PTR: |\n", prefix); - seq_printf(s, "%s| %#018llx |\n", prefix, instance_ptr); - seq_printf(s, "%s| %-20s|\n", prefix, loc_txt); + seq_printf(s, "%s| %#018llx|\n", prefix, instance_ptr); + seq_printf(s, "%s| %20s|\n", prefix, loc_txt); seq_printf(s, "%s| Instance bound: %d|\n", prefix, chan.inst_bind); // START TEMP // "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) { seq_printf(s, "%s| Runqueue Selector: %d|\n", indt, ((struct gv100_runlist_chan*)entry)->runqueue_selector); seq_printf(s, "%s| Instance PTR: |\n", indt); - seq_printf(s, "%s| %#018llx |\n", indt, instance_ptr); - seq_printf(s, "%s| %-20s|\n", indt, target_to_text(inst_target(g, entry))); + seq_printf(s, "%s| %#018llx|\n", indt, instance_ptr); + seq_printf(s, "%s| %20s|\n", indt, target_to_text(inst_target(g, entry))); seq_printf(s, "%s+---------------------+\n", indt); #endif } -- cgit v1.2.2