diff options
Diffstat (limited to 'nvdebug_entry.c')
| -rw-r--r-- | nvdebug_entry.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 0caa289..f3dcdbb 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
| @@ -31,6 +31,7 @@ extern struct file_operations device_info_file_ops; | |||
| 31 | extern struct file_operations copy_topology_file_ops; | 31 | extern struct file_operations copy_topology_file_ops; |
| 32 | extern struct file_operations nvdebug_read_reg32_file_ops; | 32 | extern struct file_operations nvdebug_read_reg32_file_ops; |
| 33 | extern struct file_operations nvdebug_read_reg_range_file_ops; | 33 | extern struct file_operations nvdebug_read_reg_range_file_ops; |
| 34 | extern struct file_operations local_memory_file_ops; | ||
| 34 | 35 | ||
| 35 | struct nvdebug_state g_nvdebug_state[NVDEBUG_MAX_DEVICES]; | 36 | struct nvdebug_state g_nvdebug_state[NVDEBUG_MAX_DEVICES]; |
| 36 | unsigned int g_nvdebug_devices = 0; | 37 | unsigned int g_nvdebug_devices = 0; |
| @@ -303,6 +304,13 @@ int __init nvdebug_init(void) { | |||
| 303 | (void*)NV_FUSE_GPC_GM107)) | 304 | (void*)NV_FUSE_GPC_GM107)) |
| 304 | goto out_nomem; | 305 | goto out_nomem; |
| 305 | } | 306 | } |
| 307 | // Create file `/proc/gpu#/local_memory`, world readable (Pascal+) | ||
| 308 | if (g_nvdebug_state[res].chip_id >= NV_CHIP_ID_PASCAL) { | ||
| 309 | if (!proc_create_data( | ||
| 310 | "local_memory", 0444, dir, compat_ops(&local_memory_file_ops), | ||
| 311 | (void*)0x00100ce0)) | ||
| 312 | goto out_nomem; | ||
| 313 | } | ||
| 306 | // Create files exposing LCE and PCE configuration (Pascal+) | 314 | // Create files exposing LCE and PCE configuration (Pascal+) |
| 307 | if (g_nvdebug_state[res].chip_id >= NV_CHIP_ID_PASCAL) { | 315 | if (g_nvdebug_state[res].chip_id >= NV_CHIP_ID_PASCAL) { |
| 308 | // Create file `/proc/gpu#/copy_topology`, world readable | 316 | // Create file `/proc/gpu#/copy_topology`, world readable |
