Lines Matching refs:sidx
290 unsigned long sidx, unsigned long eidx) in __free() argument
295 sidx + bdata->node_min_pfn, in __free()
301 if (bdata->hint_idx > sidx) in __free()
302 bdata->hint_idx = sidx; in __free()
304 for (idx = sidx; idx < eidx; idx++) in __free()
309 static int __init __reserve(bootmem_data_t *bdata, unsigned long sidx, in __reserve() argument
317 sidx + bdata->node_min_pfn, in __reserve()
324 for (idx = sidx; idx < eidx; idx++) in __reserve()
327 __free(bdata, sidx, idx); in __reserve()
340 unsigned long sidx, eidx; in mark_bootmem_node() local
348 sidx = start - bdata->node_min_pfn; in mark_bootmem_node()
352 return __reserve(bdata, sidx, eidx, flags); in mark_bootmem_node()
354 __free(bdata, sidx, eidx); in mark_bootmem_node()
505 unsigned long min, max, start, sidx, midx, step; in alloc_bootmem_bdata() local
536 sidx = start - bdata->node_min_pfn; in alloc_bootmem_bdata()
539 if (bdata->hint_idx > sidx) { in alloc_bootmem_bdata()
544 fallback = sidx + 1; in alloc_bootmem_bdata()
545 sidx = align_idx(bdata, bdata->hint_idx, step); in alloc_bootmem_bdata()
553 sidx = find_next_zero_bit(bdata->node_bootmem_map, midx, sidx); in alloc_bootmem_bdata()
554 sidx = align_idx(bdata, sidx, step); in alloc_bootmem_bdata()
555 eidx = sidx + PFN_UP(size); in alloc_bootmem_bdata()
557 if (sidx >= midx || eidx > midx) in alloc_bootmem_bdata()
560 for (i = sidx; i < eidx; i++) in alloc_bootmem_bdata()
562 sidx = align_idx(bdata, i, step); in alloc_bootmem_bdata()
563 if (sidx == i) in alloc_bootmem_bdata()
564 sidx += step; in alloc_bootmem_bdata()
569 PFN_DOWN(bdata->last_end_off) + 1 == sidx) in alloc_bootmem_bdata()
572 start_off = PFN_PHYS(sidx); in alloc_bootmem_bdata()
574 merge = PFN_DOWN(start_off) < sidx; in alloc_bootmem_bdata()
599 sidx = align_idx(bdata, fallback - 1, step); in alloc_bootmem_bdata()