gpu: nvgpu: disable fecs trace support for safety builds

Compile all files with fecs trace support only if flag
NVGPU_FECS_TRACE_SUPPORT is set

remove CONFIG_GK20A_CTXSW_TRACE checks from within the files

add POSIX file for fecs trace support for compilation with
make command

Jira NVGPU-3414

Change-Id: I205e3494ce94138ab6c6fccf7fbcefc41f953c77
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2120276
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2019-05-16 15:35:47 +05:30
committed by mobile promotions
parent f39a5c4ead
commit dfdd05a3d6
9 changed files with 98 additions and 31 deletions

View File

@@ -547,7 +547,6 @@ int gk20a_ctxsw_dev_mmap(struct file *filp, struct vm_area_struct *vma)
return ret;
}
#ifdef CONFIG_GK20A_CTXSW_TRACE
static int gk20a_ctxsw_init_devs(struct gk20a *g)
{
struct gk20a_ctxsw_trace *trace = g->ctxsw_trace;
@@ -568,11 +567,9 @@ static int gk20a_ctxsw_init_devs(struct gk20a *g)
}
return 0;
}
#endif
int gk20a_ctxsw_trace_init(struct gk20a *g)
{
#ifdef CONFIG_GK20A_CTXSW_TRACE
struct gk20a_ctxsw_trace *trace = g->ctxsw_trace;
int err;
@@ -605,14 +602,10 @@ fail:
nvgpu_kfree(g, trace);
g->ctxsw_trace = NULL;
return err;
#else
return 0;
#endif
}
void gk20a_ctxsw_trace_cleanup(struct gk20a *g)
{
#ifdef CONFIG_GK20A_CTXSW_TRACE
struct gk20a_ctxsw_trace *trace;
struct gk20a_ctxsw_dev *dev;
int i;
@@ -632,7 +625,6 @@ void gk20a_ctxsw_trace_cleanup(struct gk20a *g)
g->ctxsw_trace = NULL;
g->ops.gr.fecs_trace.deinit(g);
#endif
}
int nvgpu_gr_fecs_trace_write_entry(struct gk20a *g,
@@ -744,7 +736,6 @@ void nvgpu_gr_fecs_trace_wake_up(struct gk20a *g, int vmid)
void nvgpu_gr_fecs_trace_add_tsg_reset(struct gk20a *g, struct nvgpu_tsg *tsg)
{
#ifdef CONFIG_GK20A_CTXSW_TRACE
struct nvgpu_gpu_ctxsw_trace_entry entry = {
.vmid = 0,
.tag = NVGPU_CTXSW_TAG_ENGINE_RESET,
@@ -758,7 +749,7 @@ void nvgpu_gr_fecs_trace_add_tsg_reset(struct gk20a *g, struct nvgpu_tsg *tsg)
g->ops.ptimer.read_ptimer(g, &entry.timestamp);
nvgpu_gr_fecs_trace_write_entry(g, &entry);
nvgpu_gr_fecs_trace_wake_up(g, 0);
#endif
trace_gk20a_channel_reset(~0, tsg->tsgid);
}