From a6adaaab7a90d86a71943f9977920ad7f726cea8 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 11 Apr 2017 17:54:27 +0530 Subject: gpu: nvgpu: use nvgpu list for channel worker item Use nvgpu list APIs instead of linux list APIs to store channel worker items Jira NVGPU-13 Change-Id: I01d214810ca2495bd0a644dd1a2816ab8e526981 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1460575 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (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 0514c5b8..d52c1b6f 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -217,7 +217,7 @@ struct channel_gk20a { struct channel_gk20a_timeout timeout; /* for job cleanup handling in the background worker */ - struct list_head worker_item; + struct nvgpu_list_node worker_item; #if defined(CONFIG_GK20A_CYCLE_STATS) struct { @@ -284,6 +284,13 @@ channel_gk20a_from_ch_entry(struct nvgpu_list_node *node) ((uintptr_t)node - offsetof(struct channel_gk20a, ch_entry)); }; +static inline struct channel_gk20a * +channel_gk20a_from_worker_item(struct nvgpu_list_node *node) +{ + return (struct channel_gk20a *) + ((uintptr_t)node - offsetof(struct channel_gk20a, worker_item)); +}; + static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) { return !!ch->vm; -- cgit v1.2.2