summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-10-11 05:31:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 20:00:45 -0400
commit50b2c45aa56cfc572b3cfa5fc92ece57a443fcde (patch)
tree1a86d1d6fe3774ad69db3bf49b0edb7ec16c065e /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parent2ecd18902e29b8a3615f49afe3c51b2526816be7 (diff)
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
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index e4cce101..9c0d22d2 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -161,6 +161,7 @@ enum channel_gk20a_ref_action_type {
161 channel_gk20a_ref_action_put 161 channel_gk20a_ref_action_put
162}; 162};
163 163
164#if GK20A_CHANNEL_REFCOUNT_TRACKING
164struct channel_gk20a_ref_action { 165struct channel_gk20a_ref_action {
165 enum channel_gk20a_ref_action_type type; 166 enum channel_gk20a_ref_action_type type;
166 s64 timestamp_ms; 167 s64 timestamp_ms;
@@ -171,6 +172,7 @@ struct channel_gk20a_ref_action {
171 struct stack_trace trace; 172 struct stack_trace trace;
172 unsigned long trace_entries[GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN]; 173 unsigned long trace_entries[GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN];
173}; 174};
175#endif
174 176
175/* this is the priv element of struct nvhost_channel */ 177/* this is the priv element of struct nvhost_channel */
176struct channel_gk20a { 178struct channel_gk20a {