diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-10-09 18:05:08 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-10 19:26:55 -0400 |
commit | fc5c78733931b6267ff7af7e6aa732c5deb6c601 (patch) | |
tree | fe7df37842485bd43f88664c58aee3186388bdc4 /drivers/gpu | |
parent | 9b20f2a15e7cd4e3e99034e02cc768321ac35969 (diff) |
gpu: nvgpu: kmem debug bitrot update
Fix bitrot that was incurred when large amounts of the debugfs
stuff was moved the Linux struct. Since the debugfs debugging
is largely hidden under a config for the kmem code the necessary
changes for the kmem debugging were missed until now.
Change-Id: I105549ce39343e503212e302f39ede36c6ea5194
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1575564
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-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 |