diff options
author | David Pu <dpu@nvidia.com> | 2016-06-18 05:01:11 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-22 15:41:57 -0400 |
commit | cfb067b6d7e28a1d202f6efe437c080f474d81dd (patch) | |
tree | f8b200918254b815b61ef091450ee53ae1b7c790 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 344d665119964435583c12cbff8338037d82466c (diff) |
gpu: nvgpu: fix issue with CONFIG_DEBUG_FS=n
following compilation error are reported with CONFIG_DEBUG_FS=n:
pci.c:246:7: error: 'struct mm_gk20a' has no member named 'ltc_enabled'
pci.c:247:7: error: 'struct mm_gk20a' has no member named 'ltc_enabled_debug'
possible compilation error(reported sometime):
gk20a_allocator.c:1163:13: error: 'gk20a_alloc_debugfs_init' defined
but not used
fixed by adding '#ifdef CONFIG_DEBUG_FS' for debug only code.
following variables from gk20a.c are not initialized from
CONFIG_DEBUG_FS=n path, it will cause kernel oops when booting:
gk20a->mm.bypass_smmu = platform->bypass_smmu;
gk20a->mm.disable_bigpage = platform->disable_bigpage;
gk20a->mm.has_physical_mode = true;
fix it by move them out from '#ifdef CONFIG_DEBUG_FS' section.
Bug 1778001
Change-Id: Ic2da36b3f500882748ee46a5150903244b697761
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/1167358
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index db77d40f..03e16913 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1562,13 +1562,14 @@ static int gk20a_probe(struct platform_device *dev) | |||
1562 | 1562 | ||
1563 | gk20a_create_sysfs(&dev->dev); | 1563 | gk20a_create_sysfs(&dev->dev); |
1564 | 1564 | ||
1565 | gk20a->mm.bypass_smmu = platform->bypass_smmu; | ||
1566 | gk20a->mm.disable_bigpage = platform->disable_bigpage; | ||
1567 | gk20a->mm.has_physical_mode = true; | ||
1568 | |||
1565 | #ifdef CONFIG_DEBUG_FS | 1569 | #ifdef CONFIG_DEBUG_FS |
1566 | spin_lock_init(&gk20a->debugfs_lock); | 1570 | spin_lock_init(&gk20a->debugfs_lock); |
1567 | gk20a->mm.ltc_enabled = true; | 1571 | gk20a->mm.ltc_enabled = true; |
1568 | gk20a->mm.ltc_enabled_debug = true; | 1572 | gk20a->mm.ltc_enabled_debug = true; |
1569 | gk20a->mm.bypass_smmu = platform->bypass_smmu; | ||
1570 | gk20a->mm.disable_bigpage = platform->disable_bigpage; | ||
1571 | gk20a->mm.has_physical_mode = true; | ||
1572 | gk20a->debugfs_ltc_enabled = | 1573 | gk20a->debugfs_ltc_enabled = |
1573 | debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, | 1574 | debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, |
1574 | platform->debugfs, | 1575 | platform->debugfs, |