diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/bitmap_allocator.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/bitmap_allocator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c index 4b44bd7e..40ee199a 100644 --- a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c | |||
@@ -310,6 +310,7 @@ static void nvgpu_bitmap_alloc_destroy(struct nvgpu_allocator *__a) | |||
310 | nvgpu_kfree(nvgpu_alloc_to_gpu(__a), a); | 310 | nvgpu_kfree(nvgpu_alloc_to_gpu(__a), a); |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef CONFIG_DEBUG_FS | ||
313 | static void nvgpu_bitmap_print_stats(struct nvgpu_allocator *__a, | 314 | static void nvgpu_bitmap_print_stats(struct nvgpu_allocator *__a, |
314 | struct seq_file *s, int lock) | 315 | struct seq_file *s, int lock) |
315 | { | 316 | { |
@@ -329,6 +330,7 @@ static void nvgpu_bitmap_print_stats(struct nvgpu_allocator *__a, | |||
329 | __alloc_pstat(s, __a, " Outstanding = 0x%llx\n", | 330 | __alloc_pstat(s, __a, " Outstanding = 0x%llx\n", |
330 | a->bytes_alloced - a->bytes_freed); | 331 | a->bytes_alloced - a->bytes_freed); |
331 | } | 332 | } |
333 | #endif | ||
332 | 334 | ||
333 | static const struct nvgpu_allocator_ops bitmap_ops = { | 335 | static const struct nvgpu_allocator_ops bitmap_ops = { |
334 | .alloc = nvgpu_bitmap_alloc, | 336 | .alloc = nvgpu_bitmap_alloc, |
@@ -344,7 +346,9 @@ static const struct nvgpu_allocator_ops bitmap_ops = { | |||
344 | 346 | ||
345 | .fini = nvgpu_bitmap_alloc_destroy, | 347 | .fini = nvgpu_bitmap_alloc_destroy, |
346 | 348 | ||
349 | #ifdef CONFIG_DEBUG_FS | ||
347 | .print_stats = nvgpu_bitmap_print_stats, | 350 | .print_stats = nvgpu_bitmap_print_stats, |
351 | #endif | ||
348 | }; | 352 | }; |
349 | 353 | ||
350 | 354 | ||