Lines Matching full:end

51 add_avail(uint64_t start, uint64_t end, uint64_t type)  in add_avail()  argument
58 segs[nr_seg - 1].end + 1 == start && in add_avail()
60 segs[nr_seg - 1].end = end; in add_avail()
65 * Otherwise we need to add a new range at the end, but don't need to in add_avail()
66 * adjust the current end. in add_avail()
70 segs[nr_seg].end = end; in add_avail()
81 remove_avail(uint64_t start, uint64_t end, uint64_t type) in remove_avail() argument
90 if (s->end + 1 == start && in remove_avail()
92 s->end = end; in remove_avail()
95 if (s->end == end) { in remove_avail()
101 s->start = end + 1; in remove_avail()
110 * we allocate 1 additional item. The current end is copied to the new end. The in remove_avail()
111 * current end is set to <start, end, type> and the new end's start is set to end + 1. in remove_avail()
113 * additional items. We copy the current end to the new end, set the new end's start in remove_avail()
114 * to end + 1, the old end's end to start - 1 and the new item is <start, end, type> in remove_avail()
115 * (3) The new chunk is at the end of the current end. In this case we allocate 1 more in remove_avail()
116 * and adjust the current end's end to start - 1 and set the new end to <start, end, type>. in remove_avail()
117 * (4) The new chunk is exactly the current end, except for type. In this case, we just adjust in remove_avail()
124 if (s->end == end) { /* (4) */ in remove_avail()
133 s->end = end; in remove_avail()
135 s[1].start = end + 1; in remove_avail()
139 if (s->end == end) { /* At end of old chunk (3) */ in remove_avail()
143 s->end = start - 1; in remove_avail()
153 s->end = start - 1; in remove_avail()
155 s[1].end = end; in remove_avail()
157 s[2].start = end + 1; in remove_avail()
169 (uintmax_t)segs[i].end, in print_avail()
183 if (s >= segs[i].end) /* roundup past end */ in first_avail()
185 len = segs[i].end - s + 1; in first_avail()
191 (uintmax_t)segs[i].end); in first_avail()
227 uint64_t start, end; in parse_line() local
242 end = strtoull(walker, &next, 16); in parse_line()
243 if (end == ULLONG_MAX || walker == next) in parse_line()
250 *endp = end; in parse_line()
283 uint64_t start, end; in populate_avail_from_iomem() local
307 str = parse_line(buf, &start, &end); in populate_avail_from_iomem()
314 add_avail(start, end, system_ram); in populate_avail_from_iomem()
316 add_avail(start, end, firmware_reserved); in populate_avail_from_iomem()
321 str = parse_line(buf, &start, &end); in populate_avail_from_iomem()
326 remove_avail(start, end, unknown); in populate_avail_from_iomem()
328 remove_avail(start, end, kv->type); in populate_avail_from_iomem()
353 * from @start@ to the end of the segment.
359 if (start >= segs[i].start && start <= segs[i].end) in space_avail()
360 return segs[i].end - start; in space_avail()