mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Put debugfs dependencies inside #ifdef
Put all debugfs dependencies inside #ifdef CONFIG_DEBUG_FS. This includes some functions in allocators that were used only for debugging. Remove include of linux/debugfs.h on files that do not deal with debugfs. linux/debugfs.h implicitly included linux/fs.h, which we relied on. Add explicit include of linux/fs.h for all files where this is the case. Change-Id: I16feffae6b0e3a2edf366075cdc01ade86be06f9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1467897 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
b88c9ad793
commit
b3e1ce04b9
@@ -1086,6 +1086,7 @@ static u64 nvgpu_buddy_alloc_space(struct nvgpu_allocator *a)
|
||||
return space;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
/*
|
||||
* Print the buddy allocator top level stats. If you pass @s as NULL then the
|
||||
* stats are printed to the kernel log. This lets this code be used for
|
||||
@@ -1163,6 +1164,7 @@ static void nvgpu_buddy_print_stats(struct nvgpu_allocator *__a,
|
||||
if (lock)
|
||||
alloc_unlock(__a);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct nvgpu_allocator_ops buddy_ops = {
|
||||
.alloc = nvgpu_buddy_balloc,
|
||||
@@ -1182,7 +1184,9 @@ static const struct nvgpu_allocator_ops buddy_ops = {
|
||||
|
||||
.fini = nvgpu_buddy_allocator_destroy,
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.print_stats = nvgpu_buddy_print_stats,
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user