summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-04-11 09:59:10 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-19 15:15:57 -0400
commita54fee533a2e3244343642b1ba1b211e2b53961c (patch)
treee17d4a8ef4a6559c8a1aa0a5bf17228f705914f6 /drivers/gpu/nvgpu/include
parent71c85c225ec205388fbaf5b482bfc3e54e7aa12e (diff)
gpu: nvgpu: use nvgpu list for buddy allocator
Use nvgpu list APIs instead of linux list APIs for buddy allocator lists Jira NVGPU-13 Change-Id: I69a506a9aef77eaa9da0f89609627f4c2f5a7b28 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1462079 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/allocator.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/allocator.h b/drivers/gpu/nvgpu/include/nvgpu/allocator.h
index 1bde290f..61914d8c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/allocator.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/allocator.h
@@ -22,6 +22,7 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23 23
24#include <nvgpu/lock.h> 24#include <nvgpu/lock.h>
25#include <nvgpu/list.h>
25 26
26/* #define ALLOCATOR_DEBUG */ 27/* #define ALLOCATOR_DEBUG */
27 28
@@ -101,7 +102,14 @@ struct nvgpu_alloc_carveout {
101 /* 102 /*
102 * For usage by the allocator implementation. 103 * For usage by the allocator implementation.
103 */ 104 */
104 struct list_head co_entry; 105 struct nvgpu_list_node co_entry;
106};
107
108static inline struct nvgpu_alloc_carveout *
109nvgpu_alloc_carveout_from_co_entry(struct nvgpu_list_node *node)
110{
111 return (struct nvgpu_alloc_carveout *)
112 ((uintptr_t)node - offsetof(struct nvgpu_alloc_carveout, co_entry));
105}; 113};
106 114
107#define NVGPU_CARVEOUT(__name, __base, __length) \ 115#define NVGPU_CARVEOUT(__name, __base, __length) \