From 0d8830394adf94fee8f69bc034293d1880e9d8db Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 10 Feb 2017 17:35:58 +0530 Subject: gpu: nvgpu: use nvgpu list for page chunks Use nvgpu list APIs instead of linux list APIs to store chunks of page allocator Jira NVGPU-13 Change-Id: I63375fc2df683e018c48a90b76eca368438cc32f Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1326814 Reviewed-by: Konsta Holtta Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/pramin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/pramin.c') diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c index b9216309..aa732368 100644 --- a/drivers/gpu/nvgpu/common/pramin.c +++ b/drivers/gpu/nvgpu/common/pramin.c @@ -88,7 +88,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct mem_desc *mem, u32 byteoff, start_reg, until_end, n; alloc = get_vidmem_page_alloc(mem->sgt->sgl); - list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { + nvgpu_list_for_each_entry(chunk, &alloc->alloc_chunks, + page_alloc_chunk, list_entry) { if (offset >= chunk->length) offset -= chunk->length; else @@ -113,7 +114,8 @@ void nvgpu_pramin_access_batched(struct gk20a *g, struct mem_desc *mem, size -= n; if (n == (chunk->length - offset)) { - chunk = list_next_entry(chunk, list_entry); + chunk = nvgpu_list_next_entry(chunk, page_alloc_chunk, + list_entry); offset = 0; } else { offset += n / sizeof(u32); -- cgit v1.2.2