diff options
Diffstat (limited to 'nvdebug_entry.c')
| -rw-r--r-- | nvdebug_entry.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index e77b053..c444ff7 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
| @@ -203,7 +203,7 @@ int create_tpc_mask_files(int device_id, struct proc_dir_entry *dir) { | |||
| 203 | int __init nvdebug_init(void) { | 203 | int __init nvdebug_init(void) { |
| 204 | struct proc_dir_entry *dir, *preempt_entry, *disable_channel_entry, | 204 | struct proc_dir_entry *dir, *preempt_entry, *disable_channel_entry, |
| 205 | *enable_channel_entry, *switch_to_tsg_entry, *device_info_entry, | 205 | *enable_channel_entry, *switch_to_tsg_entry, *device_info_entry, |
| 206 | *num_gpcs_entry, *lce_for_pce_entry; | 206 | *num_gpcs_entry, *lce_for_pce_entry, *grce_for_pce_entry; |
| 207 | int rl_create_err, tpc_masks_create_err; | 207 | int rl_create_err, tpc_masks_create_err; |
| 208 | // Check that an NVIDIA GPU is present and initialize g_nvdebug_state | 208 | // Check that an NVIDIA GPU is present and initialize g_nvdebug_state |
| 209 | int res = probe_and_cache_device(); | 209 | int res = probe_and_cache_device(); |
| @@ -275,8 +275,15 @@ int __init nvdebug_init(void) { | |||
| 275 | snprintf(file_name, 20, "lce_for_pce%d",pce_id); | 275 | snprintf(file_name, 20, "lce_for_pce%d",pce_id); |
| 276 | lce_for_pce_entry = proc_create_data( | 276 | lce_for_pce_entry = proc_create_data( |
| 277 | file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), | 277 | file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), |
| 278 | (void*)(uintptr_t)NV_LCE_FOR_PCE(pce_id)); | 278 | (void*)(uintptr_t)NV_LCE_FOR_PCE(pce_id)); |
| 279 | } | 279 | snprintf(file_name, 20, "grce_for_pce%d",pce_id); |
| 280 | grce_for_pce_entry = proc_create_data( | ||
| 281 | file_name, 0444, dir, compat_ops(&nvdebug_read_reg32_file_ops), | ||
| 282 | (void*)(uintptr_t)NV_GRCE_FOR_CE(pce_id)); | ||
| 283 | |||
| 284 | if (!lce_for_pce_entry || !grce_for_pce_entry) | ||
| 285 | return -ENOMEM; | ||
| 286 | } | ||
| 280 | 287 | ||
| 281 | // TODO: Redo to num_pces | 288 | // TODO: Redo to num_pces |
| 282 | num_gpcs_entry = proc_create_data( | 289 | num_gpcs_entry = proc_create_data( |
