From 7cfa24cebeaf144b446d07e15fb25e78bb14841e Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Thu, 11 Apr 2024 13:42:54 -0400 Subject: Linux 5.17+ support and allow including nvdebug.h independently - Move Linux-specific functions to nvdebug_linux.h and .c - Workaround PDE_DATA() being pde_data() on Linux 5.17+ --- nvdebug_entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nvdebug_entry.c') diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 68e4d71..0caa289 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c @@ -9,7 +9,7 @@ #include // For PCI device scanning #include // So we can set up entries in /proc -#include "nvdebug.h" +#include "nvdebug_linux.h" #include "stubs.h" // Enable to intercept and log GPU interrupts. Historically used to benchmark @@ -93,7 +93,7 @@ int probe_and_cache_devices(void) { // Search for GP10B (Jetson TX2) while (!dev && (temp_dev = bus_find_device_by_name(&platform_bus_type, dev, "17000000.gp10b"))) dev = temp_dev; - // Search for GM10A (Jetson TX1) + // Search for GM20B (Jetson TX1) while (!dev && (temp_dev = bus_find_device_by_name(&platform_bus_type, dev, "57000000.gpu"))) dev = temp_dev; // TODO: Support other platform bus devices (gk20a - TK1) @@ -173,7 +173,7 @@ int create_runlist_files(int device_id, struct proc_dir_entry *dir) { max_rl_id = info.runlist_enum; } // Create files to read each runlist. The read handling code looks at the - // PDE_DATA associated with the file to determine what the runlist ID is. + // `pde_data` associated with the file to determine what the runlist ID is. for (rl_id = 0; rl_id <= max_rl_id; rl_id++) { snprintf(runlist_name, 12, "runlist%d", rl_id); rl_entry = proc_create_data( -- cgit v1.2.2