diff options
Diffstat (limited to 'nvdebug_linux.h')
-rw-r--r-- | nvdebug_linux.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/nvdebug_linux.h b/nvdebug_linux.h index 022d1cf..2ad4ce1 100644 --- a/nvdebug_linux.h +++ b/nvdebug_linux.h | |||
@@ -35,15 +35,3 @@ static inline int file2parentgpuidx(const struct file *f) { | |||
35 | // module. | 35 | // module. |
36 | return (uintptr_t)pde_data(file_dentry(f)->d_parent->d_inode); | 36 | return (uintptr_t)pde_data(file_dentry(f)->d_parent->d_inode); |
37 | } | 37 | } |
38 | |||
39 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) | ||
40 | // Commit 643eb158a3 in nvgpu moved the mapped registers to the second entry | ||
41 | // of the gk20a struct (after a function pointer). This change was made as L4T | ||
42 | // was upgraded from Linux 4.9 to 5.10 (r32 -> r34+) | ||
43 | // Note that this is wrong if nvgpu was built without CONFIG_NVGPU_NON_FUSA | ||
44 | // i.e. if FUSA was enabled, this is wrong. | ||
45 | #define gk20a_regs(gk20a) (*(void**)((void*)gk20a + sizeof(void(*)(void)))) | ||
46 | #else | ||
47 | #include <os/linux/os_linux.h> // For struct nvgpu_os_linux, which holds regs | ||
48 | #define gk20a_regs(gk20a) (container_of(gk20a, struct nvgpu_os_linux, g)->regs) | ||
49 | #endif | ||