Lines Matching refs:this

50 	struct nvkm_mm_node *this = *pthis;  in nvkm_mm_free()  local
52 if (this) { in nvkm_mm_free()
53 struct nvkm_mm_node *prev = node(this, prev); in nvkm_mm_free()
54 struct nvkm_mm_node *next = node(this, next); in nvkm_mm_free()
57 prev->length += this->length; in nvkm_mm_free()
58 list_del(&this->nl_entry); in nvkm_mm_free()
59 kfree(this); this = prev; in nvkm_mm_free()
63 next->offset = this->offset; in nvkm_mm_free()
64 next->length += this->length; in nvkm_mm_free()
65 if (this->type == NVKM_MM_TYPE_NONE) in nvkm_mm_free()
66 list_del(&this->fl_entry); in nvkm_mm_free()
67 list_del(&this->nl_entry); in nvkm_mm_free()
68 kfree(this); this = NULL; in nvkm_mm_free()
71 if (this && this->type != NVKM_MM_TYPE_NONE) { in nvkm_mm_free()
73 if (this->offset < prev->offset) in nvkm_mm_free()
77 list_add_tail(&this->fl_entry, &prev->fl_entry); in nvkm_mm_free()
78 this->type = NVKM_MM_TYPE_NONE; in nvkm_mm_free()
114 struct nvkm_mm_node *prev, *this, *next; in nvkm_mm_head() local
121 list_for_each_entry(this, &mm->free, fl_entry) { in nvkm_mm_head()
123 if (this->heap != heap) in nvkm_mm_head()
126 e = this->offset + this->length; in nvkm_mm_head()
127 s = this->offset; in nvkm_mm_head()
129 prev = node(this, prev); in nvkm_mm_head()
133 next = node(this, next); in nvkm_mm_head()
142 splitoff = s - this->offset; in nvkm_mm_head()
143 if (splitoff && !region_head(mm, this, splitoff)) in nvkm_mm_head()
146 this = region_head(mm, this, min(size_max, e - s)); in nvkm_mm_head()
147 if (!this) in nvkm_mm_head()
150 this->next = NULL; in nvkm_mm_head()
151 this->type = type; in nvkm_mm_head()
152 list_del(&this->fl_entry); in nvkm_mm_head()
153 *pnode = this; in nvkm_mm_head()
189 struct nvkm_mm_node *prev, *this, *next; in nvkm_mm_tail() local
194 list_for_each_entry_reverse(this, &mm->free, fl_entry) { in nvkm_mm_tail()
195 u32 e = this->offset + this->length; in nvkm_mm_tail()
196 u32 s = this->offset; in nvkm_mm_tail()
199 if (this->heap != heap) in nvkm_mm_tail()
203 prev = node(this, prev); in nvkm_mm_tail()
207 next = node(this, next); in nvkm_mm_tail()
222 if (c && !region_tail(mm, this, c)) in nvkm_mm_tail()
225 this = region_tail(mm, this, a); in nvkm_mm_tail()
226 if (!this) in nvkm_mm_tail()
229 this->next = NULL; in nvkm_mm_tail()
230 this->type = type; in nvkm_mm_tail()
231 list_del(&this->fl_entry); in nvkm_mm_tail()
232 *pnode = this; in nvkm_mm_tail()