mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: cleanup allocator debugging
Remove debugging features that did not really get used and make the debugging code use the nvgpu_log() functionality. This ties the allocator debugging into the larger nvgpu debug framework. Also modify many of the places CONFIG_DEBUG_FS was used to conditionally compile allocator debug code to use __KERNEL__ instead. This is because that debug code can still be called even when debugfs is not present in Linux. Change-Id: I112ebe1cae22d6f8db96d023993498093e18d74a Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1544439 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c49160127a
commit
8f2f979428
@@ -1076,7 +1076,7 @@ static u64 nvgpu_buddy_alloc_space(struct nvgpu_allocator *a)
|
||||
return space;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#ifdef __KERNEL__
|
||||
/*
|
||||
* 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
|
||||
@@ -1174,7 +1174,7 @@ static const struct nvgpu_allocator_ops buddy_ops = {
|
||||
|
||||
.fini = nvgpu_buddy_allocator_destroy,
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#ifdef __KERNEL__
|
||||
.print_stats = nvgpu_buddy_print_stats,
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user