diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2023-06-29 17:09:54 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2023-06-29 17:14:49 -0400 |
| commit | a3fe3788535dd099d15e0ddca455be58e1d63156 (patch) | |
| tree | 414b93951935d9e434c78c68326af1f59fa54d5a /device_info_procfs.c | |
| parent | 7e8fc4f9ae9fb4424aab73622cd9d7b89390dcb3 (diff) | |
Hacky support for Linux 5.6+ and the Jetson AGX Orin
Works around change in parameters to proc initialization functions
via a hacky function which rewrites the layout. This also required
making all the struct file_operations writable.
Also start reducing dependency on nvgpu headers.
Known issues:
- Incorrect message printed in log after module is loaded. Unclear
if this is because the register detection logic is broken, or if
the layout of the data at NV_MC_BOOT_0 has changed.
- Not tested
Diffstat (limited to 'device_info_procfs.c')
| -rw-r--r-- | device_info_procfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/device_info_procfs.c b/device_info_procfs.c index cd6c53c..c96007a 100644 --- a/device_info_procfs.c +++ b/device_info_procfs.c | |||
| @@ -22,7 +22,7 @@ static ssize_t nvdebug_reg32_read(struct file *f, char __user *buf, size_t size, | |||
| 22 | *off += chars_written; | 22 | *off += chars_written; |
| 23 | return chars_written; | 23 | return chars_written; |
| 24 | } | 24 | } |
| 25 | const struct file_operations nvdebug_read_reg32_file_ops = { | 25 | struct file_operations nvdebug_read_reg32_file_ops = { |
| 26 | .read = nvdebug_reg32_read, | 26 | .read = nvdebug_reg32_read, |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| @@ -118,7 +118,7 @@ static int device_info_file_open(struct inode *inode, struct file *f) { | |||
| 118 | return seq_open(f, &device_info_file_seq_ops); | 118 | return seq_open(f, &device_info_file_seq_ops); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | const struct file_operations device_info_file_ops = { | 121 | struct file_operations device_info_file_ops = { |
| 122 | .open = device_info_file_open, | 122 | .open = device_info_file_open, |
| 123 | .read = seq_read, | 123 | .read = seq_read, |
| 124 | .llseek = seq_lseek, | 124 | .llseek = seq_lseek, |
