diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index e8d2dbe5..beb57664 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |||
@@ -69,7 +69,7 @@ struct dbg_session_gk20a { | |||
69 | struct gk20a *g; | 69 | struct gk20a *g; |
70 | 70 | ||
71 | /* list of bound channels, if any */ | 71 | /* list of bound channels, if any */ |
72 | struct list_head ch_list; | 72 | struct nvgpu_list_node ch_list; |
73 | struct nvgpu_mutex ch_list_lock; | 73 | struct nvgpu_mutex ch_list_lock; |
74 | 74 | ||
75 | /* event support */ | 75 | /* event support */ |
@@ -82,17 +82,31 @@ struct dbg_session_gk20a { | |||
82 | 82 | ||
83 | struct dbg_session_data { | 83 | struct dbg_session_data { |
84 | struct dbg_session_gk20a *dbg_s; | 84 | struct dbg_session_gk20a *dbg_s; |
85 | struct list_head dbg_s_entry; | 85 | struct nvgpu_list_node dbg_s_entry; |
86 | }; | ||
87 | |||
88 | static inline struct dbg_session_data * | ||
89 | dbg_session_data_from_dbg_s_entry(struct nvgpu_list_node *node) | ||
90 | { | ||
91 | return (struct dbg_session_data *) | ||
92 | ((uintptr_t)node - offsetof(struct dbg_session_data, dbg_s_entry)); | ||
86 | }; | 93 | }; |
87 | 94 | ||
88 | struct dbg_session_channel_data { | 95 | struct dbg_session_channel_data { |
89 | struct file *ch_f; | 96 | struct file *ch_f; |
90 | int channel_fd; | 97 | int channel_fd; |
91 | int chid; | 98 | int chid; |
92 | struct list_head ch_entry; | 99 | struct nvgpu_list_node ch_entry; |
93 | struct dbg_session_data *session_data; | 100 | struct dbg_session_data *session_data; |
94 | }; | 101 | }; |
95 | 102 | ||
103 | static inline struct dbg_session_channel_data * | ||
104 | dbg_session_channel_data_from_ch_entry(struct nvgpu_list_node *node) | ||
105 | { | ||
106 | return (struct dbg_session_channel_data *) | ||
107 | ((uintptr_t)node - offsetof(struct dbg_session_channel_data, ch_entry)); | ||
108 | }; | ||
109 | |||
96 | struct dbg_profiler_object_data { | 110 | struct dbg_profiler_object_data { |
97 | int session_id; | 111 | int session_id; |
98 | u32 prof_handle; | 112 | u32 prof_handle; |