Lines Matching defs:hole
29 struct hole {
38 static struct hole initholes[64];
76 struct hole *hole;
80 hole = list_entry(cur, struct hole, list);
82 if((hole->start == 0) && (hole->end == 0) && (hole->size == 0))
85 pr_info("hole: start %08lx end %08lx size %08lx\n",
86 hole->start, hole->end, hole->size);
89 pr_info("end of hole listing...\n");
96 struct hole *hole;
97 struct hole *prev = NULL;
102 hole = list_entry(cur, struct hole, list);
105 prev = hole;
109 if(hole->end == prev->start) {
110 hole->size += prev->size;
111 hole->end = prev->end;
121 static inline struct hole *rmcache(void)
123 struct hole *ret;
127 pr_crit("out of dvma hole cache!\n");
132 ret = list_entry(hole_cache.next, struct hole, list);
143 struct hole *hole;
147 pr_crit("out of dvma holes! (printing hole cache)\n");
157 hole = list_entry(cur, struct hole, list);
160 newlen = len + ((hole->end - len) & (align-1));
164 if(hole->size > newlen) {
165 hole->end -= newlen;
166 hole->size -= newlen;
167 dvma_entry_use(hole->end) = newlen;
172 return hole->end;
173 } else if(hole->size == newlen) {
174 list_move(&(hole->list), &hole_cache);
175 dvma_entry_use(hole->start) = newlen;
180 return hole->start;
185 pr_crit("unable to find dvma hole!\n");
194 struct hole *hole;
208 hole = list_entry(cur, struct hole, list);
210 if(hole->end == baddr) {
211 hole->end += len;
212 hole->size += len;
214 } else if(hole->start == (baddr + len)) {
215 hole->start = baddr;
216 hole->size += len;
222 hole = rmcache();
224 hole->start = baddr;
225 hole->end = baddr + len;
226 hole->size = len;
228 // list_add_tail(&(hole->list), cur);
229 list_add(&(hole->list), cur);
238 struct hole *hole;
244 /* prepare the hole cache */
248 hole = rmcache();
249 hole->start = DVMA_START;
250 hole->end = DVMA_END;
251 hole->size = DVMA_SIZE;
253 list_add(&(hole->list), &hole_list);