From f474a9e0e41d62f6a804c6501068da621556013e Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 11 Apr 2017 17:48:00 +0530 Subject: gpu: nvgpu: use nvgpu list for event id list Use nvgpu list APIs instead of linux list APIs to store event IDs into channel and TSGs Jira NVGPU-13 Change-Id: I51e4b6ab3b38c845a870901b4d498927ca404a78 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1460574 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 223aa641..0514c5b8 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -109,7 +109,14 @@ struct gk20a_event_id_data { wait_queue_head_t event_id_wq; struct nvgpu_mutex lock; - struct list_head event_id_node; + struct nvgpu_list_node event_id_node; +}; + +static inline struct gk20a_event_id_data * +gk20a_event_id_data_from_event_id_node(struct nvgpu_list_node *node) +{ + return (struct gk20a_event_id_data *) + ((uintptr_t)node - offsetof(struct gk20a_event_id_data, event_id_node)); }; /* @@ -226,7 +233,7 @@ struct channel_gk20a { struct nvgpu_mutex dbg_s_lock; struct nvgpu_list_node dbg_s_list; - struct list_head event_id_list; + struct nvgpu_list_node event_id_list; struct nvgpu_mutex event_id_list_lock; bool has_timedout; -- cgit v1.2.2