From 073e8978334a07e0053ee08310743ddf3046d7d2 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 3 Jul 2023 12:44:32 -0400 Subject: Fix addressing, zero-init, and compatibility bugs in a3fe378 - Including missing dereference to finish getting the address of the control register range - Add zero-initialization to the proc_ops structure in copat_ops to insure that all intentionally unset fields remain unset - Set .llseek in all the file_operations structures, as recent kernels require this to be explictly set --- nvdebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nvdebug.h') diff --git a/nvdebug.h b/nvdebug.h index 968a60b..8009b84 100644 --- a/nvdebug.h +++ b/nvdebug.h @@ -951,7 +951,7 @@ static inline int file2parentgpuidx(const struct file *f) { // was upgraded from Linux 4.9 to 5.10 (r32 -> r34+) // Note that this is wrong if nvgpu was built without CONFIG_NVGPU_NON_FUSA // i.e. if FUSA was enabled, this is wrong. -#define gk20a_regs(gk20a) ((void*)gk20a + sizeof(void(*)(void))) +#define gk20a_regs(gk20a) (*(void**)((void*)gk20a + sizeof(void(*)(void)))) #else #include // For struct nvgpu_os_linux, which holds regs #define gk20a_regs(gk20a) (container_of(gk20a, struct nvgpu_os_linux, g)->regs) -- cgit v1.2.2