This commit is contained in:
Andy Ritger
2022-11-10 08:39:33 -08:00
parent 7c345b838b
commit 758b4ee818
1323 changed files with 262135 additions and 60754 deletions

View File

@@ -68,31 +68,7 @@ NV_STATUS uvm_procfs_init()
void uvm_procfs_exit()
{
uvm_procfs_destroy_entry(uvm_proc_dir);
}
// TODO: Bug 1767237: Copied from nv-procfs.c. Refactor it out to
// nv-procfs-common.c.
static void procfs_destroy_entry_with_root(struct proc_dir_entry *entry, struct proc_dir_entry *delimiter)
{
#if defined(NV_PROC_REMOVE_PRESENT)
proc_remove(entry);
#else
while (entry) {
struct proc_dir_entry *next = entry->next;
if (entry->subdir)
procfs_destroy_entry_with_root(entry->subdir, delimiter);
remove_proc_entry(entry->name, entry->parent);
if (entry == delimiter)
break;
entry = next;
}
#endif
}
void uvm_procfs_destroy_entry(struct proc_dir_entry *entry)
{
procfs_destroy_entry_with_root(entry, entry);
proc_remove(uvm_proc_dir);
}
struct proc_dir_entry *uvm_procfs_get_gpu_base_dir()