diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/debug_kmem.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/debug_kmem.c b/drivers/gpu/nvgpu/common/linux/debug_kmem.c index ff8d49cd..04fb8b68 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_kmem.c +++ b/drivers/gpu/nvgpu/common/linux/debug_kmem.c | |||
@@ -9,16 +9,15 @@ | |||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
12 | * | ||
13 | */ | 12 | */ |
14 | 13 | ||
15 | #include "debug_kmem.h" | ||
16 | #include "kmem_priv.h" | ||
17 | #include "gk20a/platform_gk20a.h" | ||
18 | |||
19 | #include <linux/debugfs.h> | 14 | #include <linux/debugfs.h> |
20 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
21 | 16 | ||
17 | #include "os_linux.h" | ||
18 | #include "debug_kmem.h" | ||
19 | #include "kmem_priv.h" | ||
20 | |||
22 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE | 21 | #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE |
23 | /** | 22 | /** |
24 | * to_human_readable_bytes - Determine suffix for passed size. | 23 | * to_human_readable_bytes - Determine suffix for passed size. |
@@ -295,21 +294,21 @@ static const struct file_operations __kmem_traces_fops = { | |||
295 | 294 | ||
296 | void nvgpu_kmem_debugfs_init(struct gk20a *g) | 295 | void nvgpu_kmem_debugfs_init(struct gk20a *g) |
297 | { | 296 | { |
298 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 297 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
299 | struct dentry *node; | 298 | struct dentry *node; |
300 | 299 | ||
301 | g->debugfs_kmem = debugfs_create_dir("kmem_tracking", platform->debugfs); | 300 | l->debugfs_kmem = debugfs_create_dir("kmem_tracking", l->debugfs); |
302 | if (IS_ERR_OR_NULL(g->debugfs_kmem)) | 301 | if (IS_ERR_OR_NULL(l->debugfs_kmem)) |
303 | return; | 302 | return; |
304 | 303 | ||
305 | node = debugfs_create_file(g->vmallocs->name, S_IRUGO, | 304 | node = debugfs_create_file(g->vmallocs->name, S_IRUGO, |
306 | g->debugfs_kmem, | 305 | l->debugfs_kmem, |
307 | g->vmallocs, &__kmem_tracking_fops); | 306 | g->vmallocs, &__kmem_tracking_fops); |
308 | node = debugfs_create_file(g->kmallocs->name, S_IRUGO, | 307 | node = debugfs_create_file(g->kmallocs->name, S_IRUGO, |
309 | g->debugfs_kmem, | 308 | l->debugfs_kmem, |
310 | g->kmallocs, &__kmem_tracking_fops); | 309 | g->kmallocs, &__kmem_tracking_fops); |
311 | node = debugfs_create_file("traces", S_IRUGO, | 310 | node = debugfs_create_file("traces", S_IRUGO, |
312 | g->debugfs_kmem, | 311 | l->debugfs_kmem, |
313 | g, &__kmem_traces_fops); | 312 | g, &__kmem_traces_fops); |
314 | } | 313 | } |
315 | #endif | 314 | #endif |