mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: compile channel dbg_s_* only for debugger
Channel's dbg_s_lock and dbg_s_list are only needed when CONFIG_NVGPU_DEBUGGER is defined. Conditionally compile those fields, so that they are not present in safety build and related documentation. Jira NVGPU-4376 Change-Id: Ie2e99a39e5cbb60fb05d3eccc4c57242f0eef303 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2273262 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Philip Elcan <pelcan@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
67696c6870
commit
269fe8bea6
@@ -2485,7 +2485,9 @@ static void nvgpu_channel_destroy(struct nvgpu_channel *c)
|
|||||||
nvgpu_mutex_destroy(&c->cyclestate.cyclestate_buffer_mutex);
|
nvgpu_mutex_destroy(&c->cyclestate.cyclestate_buffer_mutex);
|
||||||
nvgpu_mutex_destroy(&c->cs_client_mutex);
|
nvgpu_mutex_destroy(&c->cs_client_mutex);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_NVGPU_DEBUGGER)
|
||||||
nvgpu_mutex_destroy(&c->dbg_s_lock);
|
nvgpu_mutex_destroy(&c->dbg_s_lock);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void nvgpu_channel_cleanup_sw(struct gk20a *g)
|
void nvgpu_channel_cleanup_sw(struct gk20a *g)
|
||||||
@@ -2549,14 +2551,16 @@ int nvgpu_channel_init_support(struct gk20a *g, u32 chid)
|
|||||||
nvgpu_mutex_init(&c->joblist.pre_alloc.read_lock);
|
nvgpu_mutex_init(&c->joblist.pre_alloc.read_lock);
|
||||||
|
|
||||||
#endif /* CONFIG_NVGPU_KERNEL_MODE_SUBMIT */
|
#endif /* CONFIG_NVGPU_KERNEL_MODE_SUBMIT */
|
||||||
nvgpu_init_list_node(&c->dbg_s_list);
|
|
||||||
nvgpu_mutex_init(&c->ioctl_lock);
|
nvgpu_mutex_init(&c->ioctl_lock);
|
||||||
nvgpu_mutex_init(&c->sync_lock);
|
nvgpu_mutex_init(&c->sync_lock);
|
||||||
#if defined(CONFIG_NVGPU_CYCLESTATS)
|
#if defined(CONFIG_NVGPU_CYCLESTATS)
|
||||||
nvgpu_mutex_init(&c->cyclestate.cyclestate_buffer_mutex);
|
nvgpu_mutex_init(&c->cyclestate.cyclestate_buffer_mutex);
|
||||||
nvgpu_mutex_init(&c->cs_client_mutex);
|
nvgpu_mutex_init(&c->cs_client_mutex);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_NVGPU_DEBUGGER)
|
||||||
|
nvgpu_init_list_node(&c->dbg_s_list);
|
||||||
nvgpu_mutex_init(&c->dbg_s_lock);
|
nvgpu_mutex_init(&c->dbg_s_lock);
|
||||||
|
#endif
|
||||||
nvgpu_init_list_node(&c->ch_entry);
|
nvgpu_init_list_node(&c->ch_entry);
|
||||||
nvgpu_list_add(&c->free_chs, &g->fifo.free_chs);
|
nvgpu_list_add(&c->free_chs, &g->fifo.free_chs);
|
||||||
|
|
||||||
|
|||||||
@@ -479,10 +479,12 @@ struct nvgpu_channel {
|
|||||||
struct nvgpu_mutex cs_client_mutex;
|
struct nvgpu_mutex cs_client_mutex;
|
||||||
struct gk20a_cs_snapshot_client *cs_client;
|
struct gk20a_cs_snapshot_client *cs_client;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_NVGPU_DEBUGGER
|
||||||
/** Channel's debugger session lock. */
|
/** Channel's debugger session lock. */
|
||||||
struct nvgpu_mutex dbg_s_lock;
|
struct nvgpu_mutex dbg_s_lock;
|
||||||
/** Channel entry in debugger session's list. */
|
/** Channel entry in debugger session's list. */
|
||||||
struct nvgpu_list_node dbg_s_list;
|
struct nvgpu_list_node dbg_s_list;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Syncpoint lock to allocate fences. */
|
/** Syncpoint lock to allocate fences. */
|
||||||
struct nvgpu_mutex sync_lock;
|
struct nvgpu_mutex sync_lock;
|
||||||
|
|||||||
Reference in New Issue
Block a user