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>
This commit is contained in:
Deepak Nibade
2017-04-11 19:29:10 +05:30
committed by mobile promotions
parent 71c85c225e
commit a54fee533a
3 changed files with 60 additions and 39 deletions

View File

@@ -22,6 +22,7 @@
#include <linux/platform_device.h>
#include <nvgpu/lock.h>
#include <nvgpu/list.h>
/* #define ALLOCATOR_DEBUG */
@@ -101,7 +102,14 @@ struct nvgpu_alloc_carveout {
/*
* For usage by the allocator implementation.
*/
struct list_head co_entry;
struct nvgpu_list_node co_entry;
};
static inline struct nvgpu_alloc_carveout *
nvgpu_alloc_carveout_from_co_entry(struct nvgpu_list_node *node)
{
return (struct nvgpu_alloc_carveout *)
((uintptr_t)node - offsetof(struct nvgpu_alloc_carveout, co_entry));
};
#define NVGPU_CARVEOUT(__name, __base, __length) \