diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 14:43:40 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 15:43:16 -0400 |
commit | 8da37f4bbb30027a6efa289bd97d98b2acb5c160 (patch) | |
tree | 08ffee914a0ea9b37fc8da07bae2a3bc88ab5ed9 /nvdebug_entry.c | |
parent | 874aecaf06a96f5866f9bf31437a1ebd27c2f408 (diff) |
Support printing device info on Ampere+ GPUs. By Benjamin Hadad IV
commit c3d6f2c852eb046e9d4f4f1e6527b52c746b2693
Author: Joshua Bakita <bakitajoshua@gmail.com>
Date: Sun Oct 29 14:37:51 2023 -0400
Print Ampere+ device_info fields with correct offsets/widths
Everything now has been checked against how nvgpu handles it
commit b70849d1ce67a58f9f69b37dc62122f789f4cdf7
Author: Joshua Bakita <jbakita@cs.unc.edu>
Date: Wed Sep 20 14:27:38 2023 -0400
Rearrange, fix an off-by-one error, and remove an unused define
The code in nvdebug.h has been rearranged to enable an easier merge
against the jbakita-wip branch.
commit 51f808e092846a60ea6c88ea3a1d2e349c92977b
Author: Joshua Bakita <jbakita@cs.unc.edu>
Date: Wed Sep 20 13:09:17 2023 -0400
Bug fixes and cleanup for new device_info logic
- Update comments to match new structure
- Make show() function idempotent
- Skip empty table entries without aborting
- Include names for new engine types
- Add warning log messages for skipped table entries
- Remove non-functional runlist file creation logic for Ampere+
commit 1d7adc3be1aef5ac9c144bb24008fd8cc5d688a5
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Sat Aug 19 12:47:18 2023 -0400
Debugging changes made to restore functionality following refactoring.
- Debugged data display errors.
- Debugged crash bugs.
- Debugged memory issue.
commit 9e6cc03cdf736fbd817ed53fa9a7f506bc91a244
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Wed Aug 16 22:00:20 2023 -0400
A variety of changes have been made as part of the code review.
- Functions have been consolidated.
- Code was clarified and tidied up overall.
- Unnecessary elements were removed.
commit 845960fc1b15995fdbd6d61c384567652a150bc4
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Fri Jul 28 11:39:28 2023 -0400
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
commit 8a57aaeba41c43233c323d7e0fc8bf1a81ebc65e
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Fri Jul 21 11:32:51 2023 -0400
I have updated the ptop_device_info_t comment in nvdebug.h.
commit 33c915f08f5dc63674b158ecc18897494256a6d0
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Wed Jul 19 13:02:52 2023 -0400
Debugged device_info functionality
- Fixed device_info crash bugs
- Made further edits to display functionality
- Refactored code to enhance readability
commit bfb4dcf0e78954c0163f3a06a5a088c4d1b437a8
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Thu Jul 13 12:13:17 2023 -0400
This commit is to update the repo for display during a meeting.
- Added an Ampere version of the device info data.
- Added Ampere versions of auxillary functions.
- Modified display functions to accommodate Ampere data.
- Made other various small modifications.
commit 068e7f4e7208d6c9250ad72208e0b36fd9fdf2f6
Merge: 3725b15 073e897
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Mon Jul 10 12:39:12 2023 -0400
Merge branch 'jbakita-wip' of ssh://rtsrv.cs.unc.edu/public/nvdebug into wip
I am merging Mr. Bakita's changes (046d7d2) into this repository.
commit 3725b15d5da3e06ef202045d710aa5f15eb72fcc
Author: Benjamin Hadad IV <bh4@unc.edu>
Date: Mon Jul 3 04:30:54 2023 -0400
I modified nvdebug.h for Ampere.
Diffstat (limited to 'nvdebug_entry.c')
-rw-r--r-- | nvdebug_entry.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index c362209..0abe658 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
@@ -146,7 +146,7 @@ int probe_and_cache_device(void) { | |||
146 | 146 | ||
147 | // Create files `/proc/gpu#/runlist#`, world readable | 147 | // Create files `/proc/gpu#/runlist#`, world readable |
148 | int create_runlist_files(int device_id, struct proc_dir_entry *dir) { | 148 | int create_runlist_files(int device_id, struct proc_dir_entry *dir) { |
149 | ptop_device_info_t info; | 149 | ptop_device_info_gk104_t info; |
150 | struct proc_dir_entry *rl_entry; | 150 | struct proc_dir_entry *rl_entry; |
151 | int i, rl_id; | 151 | int i, rl_id; |
152 | char runlist_name[12]; | 152 | char runlist_name[12]; |
@@ -154,8 +154,8 @@ int create_runlist_files(int device_id, struct proc_dir_entry *dir) { | |||
154 | // Figure out how many runlists there are by checking the device info | 154 | // Figure out how many runlists there are by checking the device info |
155 | // registers. Runlists are always numbered sequentially, so we just have | 155 | // registers. Runlists are always numbered sequentially, so we just have |
156 | // to find the highest-valued one and add 1 to get the number of runlists. | 156 | // to find the highest-valued one and add 1 to get the number of runlists. |
157 | for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1; i++) { | 157 | for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1_GK104; i++) { |
158 | info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO(i)); | 158 | info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO_GK104(i)); |
159 | if (info.info_type != INFO_TYPE_ENUM || !info.runlist_is_valid) | 159 | if (info.info_type != INFO_TYPE_ENUM || !info.runlist_is_valid) |
160 | continue; | 160 | continue; |
161 | if (info.runlist_enum > max_rl_id) | 161 | if (info.runlist_enum > max_rl_id) |
@@ -219,7 +219,8 @@ int __init nvdebug_init(void) { | |||
219 | if (!(dir = proc_mkdir_data(device_id_str, 0555, NULL, (void*)device_id))) | 219 | if (!(dir = proc_mkdir_data(device_id_str, 0555, NULL, (void*)device_id))) |
220 | goto out_nomem; | 220 | goto out_nomem; |
221 | // Create files `/proc/gpu#/runlist#`, world readable | 221 | // Create files `/proc/gpu#/runlist#`, world readable |
222 | rl_create_err = create_runlist_files(device_id, dir); | 222 | if (g_nvdebug_state[device_id].chip_id < NV_CHIP_ID_AMPERE) |
223 | create_runlist_files(device_id, dir); | ||
223 | // Create files `/proc/gpu#/gpc#_tpc_mask`, world readable | 224 | // Create files `/proc/gpu#/gpc#_tpc_mask`, world readable |
224 | tpc_masks_create_err = create_tpc_mask_files(device_id, dir); | 225 | tpc_masks_create_err = create_tpc_mask_files(device_id, dir); |
225 | // Create file `/proc/gpu#/preempt_tsg`, world writable | 226 | // Create file `/proc/gpu#/preempt_tsg`, world writable |