Lines Matching refs:hole

41 struct hole {
50 static struct hole initholes[64];
88 struct hole *hole;
92 hole = list_entry(cur, struct hole, list);
94 if((hole->start == 0) && (hole->end == 0) && (hole->size == 0))
97 pr_info("hole: start %08lx end %08lx size %08lx\n",
98 hole->start, hole->end, hole->size);
101 pr_info("end of hole listing...\n");
108 struct hole *hole;
109 struct hole *prev = NULL;
114 hole = list_entry(cur, struct hole, list);
117 prev = hole;
121 if(hole->end == prev->start) {
122 hole->size += prev->size;
123 hole->end = prev->end;
133 static inline struct hole *rmcache(void)
135 struct hole *ret;
139 pr_crit("out of dvma hole cache!\n");
144 ret = list_entry(hole_cache.next, struct hole, list);
155 struct hole *hole;
159 pr_crit("out of dvma holes! (printing hole cache)\n");
169 hole = list_entry(cur, struct hole, list);
172 newlen = len + ((hole->end - len) & (align-1));
176 if(hole->size > newlen) {
177 hole->end -= newlen;
178 hole->size -= newlen;
179 dvma_entry_use(hole->end) = newlen;
184 return hole->end;
185 } else if(hole->size == newlen) {
186 list_move(&(hole->list), &hole_cache);
187 dvma_entry_use(hole->start) = newlen;
192 return hole->start;
197 pr_crit("unable to find dvma hole!\n");
206 struct hole *hole;
222 hole = list_entry(cur, struct hole, list);
224 if(hole->end == baddr) {
225 hole->end += len;
226 hole->size += len;
228 } else if(hole->start == (baddr + len)) {
229 hole->start = baddr;
230 hole->size += len;
236 hole = rmcache();
238 hole->start = baddr;
239 hole->end = baddr + len;
240 hole->size = len;
242 // list_add_tail(&(hole->list), cur);
243 list_add(&(hole->list), cur);
252 struct hole *hole;
258 /* prepare the hole cache */
262 hole = rmcache();
263 hole->start = DVMA_START;
264 hole->end = DVMA_END;
265 hole->size = DVMA_SIZE;
267 list_add(&(hole->list), &hole_list);