aboutsummaryrefslogtreecommitdiffstats
path: root/nvdebug.h
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 /nvdebug.h
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 'nvdebug.h')
-rw-r--r--nvdebug.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/nvdebug.h b/nvdebug.h
index 926419d..f0662cd 100644
--- a/nvdebug.h
+++ b/nvdebug.h
@@ -67,7 +67,7 @@ struct gk20a;
67*/ 67*/
68enum ENTRY_TYPE {ENTRY_TYPE_CHAN = 0, ENTRY_TYPE_TSG = 1}; 68enum ENTRY_TYPE {ENTRY_TYPE_CHAN = 0, ENTRY_TYPE_TSG = 1};
69enum INST_TARGET {TARGET_VID_MEM = 0, TARGET_SYS_MEM_COHERENT = 2, TARGET_SYS_MEM_NONCOHERENT = 3}; 69enum INST_TARGET {TARGET_VID_MEM = 0, TARGET_SYS_MEM_COHERENT = 2, TARGET_SYS_MEM_NONCOHERENT = 3};
70static inline char* target_to_text(enum INST_TARGET t) { 70static 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};
858static inline char* pd_target_to_text(enum PD_TARGET t) { 857static 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