diff options
| -rw-r--r-- | nvdebug.h | 8 | ||||
| -rw-r--r-- | runlist_procfs.c | 13 |
2 files changed, 10 insertions, 11 deletions
| @@ -67,7 +67,7 @@ struct gk20a; | |||
| 67 | */ | 67 | */ |
| 68 | enum ENTRY_TYPE {ENTRY_TYPE_CHAN = 0, ENTRY_TYPE_TSG = 1}; | 68 | enum ENTRY_TYPE {ENTRY_TYPE_CHAN = 0, ENTRY_TYPE_TSG = 1}; |
| 69 | enum INST_TARGET {TARGET_VID_MEM = 0, TARGET_SYS_MEM_COHERENT = 2, TARGET_SYS_MEM_NONCOHERENT = 3}; | 69 | enum INST_TARGET {TARGET_VID_MEM = 0, TARGET_SYS_MEM_COHERENT = 2, TARGET_SYS_MEM_NONCOHERENT = 3}; |
| 70 | static inline char* target_to_text(enum INST_TARGET t) { | 70 | static inline const char *target_to_text(enum INST_TARGET t) { |
| 71 | switch (t) { | 71 | switch (t) { |
| 72 | case TARGET_VID_MEM: | 72 | case TARGET_VID_MEM: |
| 73 | return "VID_MEM"; | 73 | return "VID_MEM"; |
| @@ -76,7 +76,6 @@ static inline char* target_to_text(enum INST_TARGET t) { | |||
| 76 | case TARGET_SYS_MEM_NONCOHERENT: | 76 | case TARGET_SYS_MEM_NONCOHERENT: |
| 77 | return "SYS_MEM_NONCOHERENT"; | 77 | return "SYS_MEM_NONCOHERENT"; |
| 78 | default: | 78 | default: |
| 79 | printk(KERN_WARNING "[nvdebug] Invalid aperture!\n"); | ||
| 80 | return "INVALID"; | 79 | return "INVALID"; |
| 81 | } | 80 | } |
| 82 | } | 81 | } |
| @@ -855,7 +854,7 @@ enum PD_TARGET { | |||
| 855 | PTE_AND_TARGET_SYS_MEM_COHERENT = 5, // b101 | 854 | PTE_AND_TARGET_SYS_MEM_COHERENT = 5, // b101 |
| 856 | PTE_AND_TARGET_SYS_MEM_NONCOHERENT = 7, // b111 | 855 | PTE_AND_TARGET_SYS_MEM_NONCOHERENT = 7, // b111 |
| 857 | }; | 856 | }; |
| 858 | static inline char* pd_target_to_text(enum PD_TARGET t) { | 857 | static inline const char *pd_target_to_text(enum PD_TARGET t) { |
| 859 | switch (t) { | 858 | switch (t) { |
| 860 | case PD_AND_TARGET_INVALID: | 859 | case PD_AND_TARGET_INVALID: |
| 861 | return "INVALID"; | 860 | return "INVALID"; |
| @@ -871,8 +870,7 @@ static inline char* pd_target_to_text(enum PD_TARGET t) { | |||
| 871 | case PTE_AND_TARGET_SYS_MEM_NONCOHERENT: | 870 | case PTE_AND_TARGET_SYS_MEM_NONCOHERENT: |
| 872 | return "SYS_MEM_NONCOHERENT"; | 871 | return "SYS_MEM_NONCOHERENT"; |
| 873 | default: | 872 | default: |
| 874 | printk(KERN_WARNING "[nvdebug] Invalid aperture!\n"); | 873 | return "UNKNOWN"; |
| 875 | return NULL; | ||
| 876 | } | 874 | } |
| 877 | } | 875 | } |
| 878 | 876 | ||
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 |
| 16 | static int runlist_detail_seq_show_chan(struct seq_file *s, struct nvdebug_state *g, uint32_t chid, char *prefix) { | 16 | static 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 | } |
