From fc5c78733931b6267ff7af7e6aa732c5deb6c601 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 9 Oct 2017 15:05:08 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1575564 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: svccoveritychecker Reviewed-by: Konsta Holtta GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/linux/debug_kmem.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux') 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 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * */ -#include "debug_kmem.h" -#include "kmem_priv.h" -#include "gk20a/platform_gk20a.h" - #include #include +#include "os_linux.h" +#include "debug_kmem.h" +#include "kmem_priv.h" + #ifdef CONFIG_NVGPU_TRACK_MEM_USAGE /** * to_human_readable_bytes - Determine suffix for passed size. @@ -295,21 +294,21 @@ static const struct file_operations __kmem_traces_fops = { void nvgpu_kmem_debugfs_init(struct gk20a *g) { - struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); + struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); struct dentry *node; - g->debugfs_kmem = debugfs_create_dir("kmem_tracking", platform->debugfs); - if (IS_ERR_OR_NULL(g->debugfs_kmem)) + l->debugfs_kmem = debugfs_create_dir("kmem_tracking", l->debugfs); + if (IS_ERR_OR_NULL(l->debugfs_kmem)) return; node = debugfs_create_file(g->vmallocs->name, S_IRUGO, - g->debugfs_kmem, + l->debugfs_kmem, g->vmallocs, &__kmem_tracking_fops); node = debugfs_create_file(g->kmallocs->name, S_IRUGO, - g->debugfs_kmem, + l->debugfs_kmem, g->kmallocs, &__kmem_tracking_fops); node = debugfs_create_file("traces", S_IRUGO, - g->debugfs_kmem, + l->debugfs_kmem, g, &__kmem_traces_fops); } #endif -- cgit v1.2.2