mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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>
This commit is contained in:
committed by
Terje Bergstrom
parent
344d665119
commit
cfb067b6d7
@@ -243,8 +243,10 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
g->mm.has_physical_mode = false;
|
||||
g->mm.vidmem_is_vidmem = true;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
g->mm.ltc_enabled = true;
|
||||
g->mm.ltc_enabled_debug = true;
|
||||
#endif
|
||||
g->mm.bypass_smmu = platform->bypass_smmu;
|
||||
g->mm.disable_bigpage = platform->disable_bigpage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user