aboutsummaryrefslogtreecommitdiffstats
path: root/nvdebug_entry.c
diff options
context:
space:
mode:
authorBenjamin Hadad IV <bh4@unc.edu>2023-07-28 11:39:28 -0400
committerBenjamin Hadad IV <bh4@unc.edu>2023-07-28 11:39:28 -0400
commit845960fc1b15995fdbd6d61c384567652a150bc4 (patch)
tree14aad318d8694c6266576a1d45ced0d8fc502a6d /nvdebug_entry.c
parent8a57aaeba41c43233c323d7e0fc8bf1a81ebc65e (diff)
Refactored various systems and debugged minor issues
- Added device_info_iter - Merged functions in device_info_procfs.c - Separated device_info data structs by version in nvdebug.h - Fixed issue with device_info runlist ID data
Diffstat (limited to 'nvdebug_entry.c')
-rw-r--r--nvdebug_entry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c
index 3dfe1e8..d3d934e 100644
--- a/nvdebug_entry.c
+++ b/nvdebug_entry.c
@@ -142,7 +142,7 @@ int probe_and_cache_device(void) {
142 142
143// Create files `/proc/gpu#/runlist#`, world readable 143// Create files `/proc/gpu#/runlist#`, world readable
144int create_runlist_files_previous(int device_id, struct proc_dir_entry *dir) { 144int create_runlist_files_previous(int device_id, struct proc_dir_entry *dir) {
145 ptop_device_info_t info; 145 ptop_device_info_previous_t info;
146 struct proc_dir_entry *rl_entry; 146 struct proc_dir_entry *rl_entry;
147 int i, rl_id; 147 int i, rl_id;
148 char runlist_name[12]; 148 char runlist_name[12];
@@ -172,7 +172,7 @@ int create_runlist_files_previous(int device_id, struct proc_dir_entry *dir) {
172 172
173// Create files `/proc/gpu#/runlist#`, world readable 173// Create files `/proc/gpu#/runlist#`, world readable
174int create_runlist_files_ampere(int device_id, struct proc_dir_entry *dir) { 174int create_runlist_files_ampere(int device_id, struct proc_dir_entry *dir) {
175 ptop_device_info_t info; 175 ptop_device_info_ampere_t info;
176 struct proc_dir_entry *rl_entry; 176 struct proc_dir_entry *rl_entry;
177 int i, rl_id; 177 int i, rl_id;
178 char runlist_name[12]; 178 char runlist_name[12];
@@ -182,7 +182,7 @@ int create_runlist_files_ampere(int device_id, struct proc_dir_entry *dir) {
182 // to find the highest-valued one and add 1 to get the number of runlists. 182 // to find the highest-valued one and add 1 to get the number of runlists.
183 for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1_AMPERE(&g_nvdebug_state[device_id]); i++) { 183 for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1_AMPERE(&g_nvdebug_state[device_id]); i++) {
184 info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO_AMPERE(i)); 184 info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO_AMPERE(i));
185 if (info.runlist_enum_ampere > max_rl_id) 185 if (info.runlist_enum > max_rl_id)
186 max_rl_id = info.runlist_enum; 186 max_rl_id = info.runlist_enum;
187 } 187 }
188 // Create files to read each runlist. The read handling code looks at the 188 // Create files to read each runlist. The read handling code looks at the