gpu: nvgpu: Disable logging for safety build

This patch adds a conditional flag to filter out logging functions from
safety release build. Logging functions are replaced with stubs.

Jira NVGPU-869

Change-Id: If898b9ce8edb260727df28b407df83f0a92f61ad
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2109509
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2019-06-10 15:52:01 +00:00
committed by mobile promotions
parent d8b2e22de9
commit 6f37ac5de2
14 changed files with 118 additions and 36 deletions

View File

@@ -472,7 +472,7 @@ static int test_nvgpu_gmmu_map_unmap(struct unit_module *m,
unit_return_fail(m, "Mapped VA is not 4KB-aligned\n");
}
nvgpu_log(g, gpu_dbg_map, "Mapped VA=%p", (void *) mem.gpu_va);
unit_info(m, "Mapped VA=%p", (void *) mem.gpu_va);
/*
* Based on the VA returned from gmmu_map, lookup the corresponding
@@ -482,7 +482,7 @@ static int test_nvgpu_gmmu_map_unmap(struct unit_module *m,
if (result != 0) {
unit_return_fail(m, "PTE lookup failed with code=%d\n", result);
}
nvgpu_log(g, gpu_dbg_map, "Found PTE=%08x %08x", pte[1], pte[0]);
unit_info(m, "Found PTE=%08x %08x", pte[1], pte[0]);
/* Make sure PTE is valid */
if (!pte_is_valid(pte) &&
@@ -925,7 +925,7 @@ static int check_pte_valid(struct unit_module *m, struct gk20a *g,
if (result != 0) {
unit_return_fail(m, "PTE lookup failed with code=%d\n", result);
}
nvgpu_log(g, gpu_dbg_map, "Found PTE=%08x %08x", pte[1], pte[0]);
unit_info(m, "Found PTE=%08x %08x", pte[1], pte[0]);
/* Make sure PTE is valid */
if (!pte_is_valid(pte)) {