diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/allocator.h | 10 |
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 | |||
108 | static inline struct nvgpu_alloc_carveout * | ||
109 | nvgpu_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) \ |