From 6ec7da5eba5481e5ff106d7c616d84ac1c847d21 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 6 Dec 2017 04:39:59 -0800 Subject: gpu: nvgpu: use nvgpu list APIs instead of linux APIs Use nvgpu specific list APIs nvgpu_list_for_each_entry() instead of calling Linux specific list APIs list_for_each_entry() Jira NVGPU-444 Change-Id: I3c1fd495ed9e8bebab1f23b6769944373b46059b Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1612442 Reviewed-by: Konsta Holtta Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c') diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c index 33551d17..4d36e66b 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c @@ -1132,7 +1132,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g, } n = 0; - list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) + nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list, + dbg_session_channel_data, ch_entry) n++; if (oob_size < n * sizeof(u16)) { @@ -1145,7 +1146,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g, p = &msg.params.suspend_contexts; p->num_channels = n; n = 0; - list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) + nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list, + dbg_session_channel_data, ch_entry) oob[n++] = (u16)ch_data->chid; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); @@ -1155,7 +1157,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g, } if (p->resident_chid != (u16)~0) { - list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) { + nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list, + dbg_session_channel_data, ch_entry) { if (ch_data->chid == p->resident_chid) { channel_fd = ch_data->channel_fd; break; -- cgit v1.2.2