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:
Alex Waterman
2017-08-21 13:29:46 -07:00
committed by mobile promotions
parent c49160127a
commit 8f2f979428
8 changed files with 51 additions and 39 deletions

View File

@@ -756,7 +756,7 @@ static void nvgpu_page_allocator_destroy(struct nvgpu_allocator *__a)
alloc_unlock(__a);
}
#ifdef CONFIG_DEBUG_FS
#ifdef __KERNEL__
static void nvgpu_page_print_stats(struct nvgpu_allocator *__a,
struct seq_file *s, int lock)
{
@@ -833,7 +833,7 @@ static const struct nvgpu_allocator_ops page_ops = {
.fini = nvgpu_page_allocator_destroy,
#ifdef CONFIG_DEBUG_FS
#ifdef __KERNEL__
.print_stats = nvgpu_page_print_stats,
#endif
};