gpu: nvgpu: protect stack_trace with config

We use struct stack_trace in struct channel_gk20a_ref_action
But since channel_gk20a_ref_action is needed only if
GK20A_CHANNEL_REFCOUNT_TRACKING is set, protect it with that config

Jira NVGPU-259

Change-Id: I6b2d6f470bf924bb1ddfd31ba9968b56c63c2372
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1576929
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Deepak Nibade
2017-10-11 02:31:51 -07:00
committed by mobile promotions
parent 2ecd18902e
commit 50b2c45aa5

View File

@@ -161,6 +161,7 @@ enum channel_gk20a_ref_action_type {
channel_gk20a_ref_action_put
};
#if GK20A_CHANNEL_REFCOUNT_TRACKING
struct channel_gk20a_ref_action {
enum channel_gk20a_ref_action_type type;
s64 timestamp_ms;
@@ -171,6 +172,7 @@ struct channel_gk20a_ref_action {
struct stack_trace trace;
unsigned long trace_entries[GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN];
};
#endif
/* this is the priv element of struct nvhost_channel */
struct channel_gk20a {