diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h index 5621800e..154f953a 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h | |||
@@ -33,6 +33,8 @@ struct gk20a_allocator { | |||
33 | u32 limit; /* max value = limit - 1 */ | 33 | u32 limit; /* max value = limit - 1 */ |
34 | u32 align; /* alignment size, power of 2 */ | 34 | u32 align; /* alignment size, power of 2 */ |
35 | 35 | ||
36 | unsigned long *bitmap; /* bitmap */ | ||
37 | |||
36 | struct gk20a_alloc_block *block_first; /* first block in list */ | 38 | struct gk20a_alloc_block *block_first; /* first block in list */ |
37 | struct gk20a_alloc_block *block_recent; /* last visited block */ | 39 | struct gk20a_alloc_block *block_recent; /* last visited block */ |
38 | 40 | ||
@@ -62,29 +64,6 @@ struct gk20a_allocator { | |||
62 | 64 | ||
63 | }; | 65 | }; |
64 | 66 | ||
65 | /* a block of linear space range [start, end) */ | ||
66 | struct gk20a_alloc_block { | ||
67 | struct gk20a_allocator *allocator; /* parent allocator */ | ||
68 | struct rb_node rb; /* rb tree node */ | ||
69 | |||
70 | u32 start; /* linear space range | ||
71 | [start, end) */ | ||
72 | u32 end; | ||
73 | |||
74 | void *priv; /* backing structure for this | ||
75 | linear space block | ||
76 | page table, comp tag, etc */ | ||
77 | |||
78 | struct gk20a_alloc_block *prev; /* prev block with lower address */ | ||
79 | struct gk20a_alloc_block *next; /* next block with higher address */ | ||
80 | |||
81 | bool nc_block; | ||
82 | struct gk20a_alloc_block *nc_prev; /* prev block for | ||
83 | non-contiguous allocation */ | ||
84 | struct gk20a_alloc_block *nc_next; /* next block for | ||
85 | non-contiguous allocation */ | ||
86 | }; | ||
87 | |||
88 | int gk20a_allocator_init(struct gk20a_allocator *allocator, | 67 | int gk20a_allocator_init(struct gk20a_allocator *allocator, |
89 | const char *name, u32 base, u32 size, u32 align); | 68 | const char *name, u32 base, u32 size, u32 align); |
90 | void gk20a_allocator_destroy(struct gk20a_allocator *allocator); | 69 | void gk20a_allocator_destroy(struct gk20a_allocator *allocator); |