From a3fe3788535dd099d15e0ddca455be58e1d63156 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Thu, 29 Jun 2023 17:09:54 -0400 Subject: 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 --- device_info_procfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'device_info_procfs.c') 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, *off += chars_written; return chars_written; } -const struct file_operations nvdebug_read_reg32_file_ops = { +struct file_operations nvdebug_read_reg32_file_ops = { .read = nvdebug_reg32_read, }; @@ -118,7 +118,7 @@ static int device_info_file_open(struct inode *inode, struct file *f) { return seq_open(f, &device_info_file_seq_ops); } -const struct file_operations device_info_file_ops = { +struct file_operations device_info_file_ops = { .open = device_info_file_open, .read = seq_read, .llseek = seq_lseek, -- cgit v1.2.2