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 --- runlist_procfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runlist_procfs.c') diff --git a/runlist_procfs.c b/runlist_procfs.c index a6b0d94..a0e71b0 100644 --- a/runlist_procfs.c +++ b/runlist_procfs.c @@ -171,7 +171,7 @@ static int runlist_file_open(struct inode *inode, struct file *f) { return seq_open(f, &runlist_file_seq_ops); } -const struct file_operations runlist_file_ops = { +struct file_operations runlist_file_ops = { .open = runlist_file_open, .read = seq_read, .llseek = seq_lseek, @@ -199,7 +199,7 @@ ssize_t preempt_tsg_file_write(struct file *f, const char __user *buffer, return count; } -const struct file_operations preempt_tsg_file_ops = { +struct file_operations preempt_tsg_file_ops = { .write = preempt_tsg_file_write, }; @@ -236,7 +236,7 @@ ssize_t disable_channel_file_write(struct file *f, const char __user *buffer, return count; } -const struct file_operations disable_channel_file_ops = { +struct file_operations disable_channel_file_ops = { .write = disable_channel_file_write, }; @@ -262,7 +262,7 @@ ssize_t enable_channel_file_write(struct file *f, const char __user *buffer, return count; } -const struct file_operations enable_channel_file_ops = { +struct file_operations enable_channel_file_ops = { .write = enable_channel_file_write, }; @@ -317,6 +317,6 @@ ssize_t switch_to_tsg_file_write(struct file *f, const char __user *buffer, return count; } -const struct file_operations switch_to_tsg_file_ops = { +struct file_operations switch_to_tsg_file_ops = { .write = switch_to_tsg_file_write, }; -- cgit v1.2.2