summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-08-21 16:29:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-28 11:54:36 -0400
commit8f2f979428e1e5a4ff71d91e30ba17813e6ee7be (patch)
treedd7ce212363bea8b3547811109f01b2397804613 /drivers/gpu/nvgpu/common/mm/lockless_allocator.c
parentc49160127acfa5a9f550ecfa2d61c054060dbab3 (diff)
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>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/lockless_allocator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
index 8f712a14..04df7e3f 100644
--- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
@@ -116,7 +116,7 @@ static void nvgpu_lockless_alloc_destroy(struct nvgpu_allocator *a)
116 nvgpu_kfree(nvgpu_alloc_to_gpu(a), pa); 116 nvgpu_kfree(nvgpu_alloc_to_gpu(a), pa);
117} 117}
118 118
119#ifdef CONFIG_DEBUG_FS 119#ifdef __KERNEL__
120static void nvgpu_lockless_print_stats(struct nvgpu_allocator *a, 120static void nvgpu_lockless_print_stats(struct nvgpu_allocator *a,
121 struct seq_file *s, int lock) 121 struct seq_file *s, int lock)
122{ 122{
@@ -146,7 +146,7 @@ static const struct nvgpu_allocator_ops pool_ops = {
146 146
147 .fini = nvgpu_lockless_alloc_destroy, 147 .fini = nvgpu_lockless_alloc_destroy,
148 148
149#ifdef CONFIG_DEBUG_FS 149#ifdef __KERNEL__
150 .print_stats = nvgpu_lockless_print_stats, 150 .print_stats = nvgpu_lockless_print_stats,
151#endif 151#endif
152}; 152};