Lines Matching refs:end
36 .end = IO_SPACE_LIMIT,
44 .end = -1,
112 unsigned long long start, end; in r_show() local
113 int width = root->end < 0x10000 ? 4 : 8; in r_show()
122 end = r->end; in r_show()
124 start = end = 0; in r_show()
130 width, end, in r_show()
174 resource_size_t end = new->end; in __request_resource() local
177 if (end < start) in __request_resource()
181 if (end > root->end) in __request_resource()
186 if (!tmp || tmp->start > end) { in __request_resource()
193 if (tmp->end < start) in __request_resource()
247 tmp->end = size - 1; in __release_child_resources()
325 static int find_next_iomem_res(resource_size_t start, resource_size_t end, in find_next_iomem_res() argument
334 if (start >= end) in find_next_iomem_res()
341 if (p->start > end) { in find_next_iomem_res()
347 if (p->end < start) in find_next_iomem_res()
363 .end = min(end, p->end), in find_next_iomem_res()
374 static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end, in __walk_iomem_res_desc() argument
382 while (start < end && in __walk_iomem_res_desc()
383 !find_next_iomem_res(start, end, flags, desc, &res)) { in __walk_iomem_res_desc()
388 start = res.end + 1; in __walk_iomem_res_desc()
412 u64 end, void *arg, int (*func)(struct resource *, void *)) in walk_iomem_res_desc() argument
414 return __walk_iomem_res_desc(start, end, flags, desc, arg, func); in walk_iomem_res_desc()
425 int walk_system_ram_res(u64 start, u64 end, void *arg, in walk_system_ram_res() argument
430 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_system_ram_res()
438 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
443 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_mem_res()
455 resource_size_t start, end; in walk_system_ram_range() local
462 end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1; in walk_system_ram_range()
464 while (start < end && in walk_system_ram_range()
465 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res)) { in walk_system_ram_range()
467 end_pfn = PFN_DOWN(res.end + 1); in walk_system_ram_range()
472 start = res.end + 1; in walk_system_ram_range()
501 res.end = start + size - 1; in __region_intersects()
571 if (res->end > max) in resource_clip()
572 res->end = max; in resource_clip()
593 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
598 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
600 tmp.end = root->end; in __find_resource()
602 if (tmp.end < tmp.start) in __find_resource()
610 avail.end = tmp.end; in __find_resource()
616 alloc.end = alloc.start + size - 1; in __find_resource()
617 if (alloc.start <= alloc.end && in __find_resource()
620 new->end = alloc.end; in __find_resource()
625 next: if (!this || this->end == root->end) in __find_resource()
629 tmp.start = this->end + 1; in __find_resource()
670 old->end = new.end; in reallocate_resource()
681 old->end = new.end; in reallocate_resource()
782 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
784 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
790 if (next->start < new->start || next->end > new->end) in __insert_resource()
794 if (next->sibling->start > new->end) in __insert_resource()
888 if (conflict->end > new->end) in insert_resource_expand_to_fit()
889 new->end = conflict->end; in insert_resource_expand_to_fit()
933 resource_size_t end = start + size - 1; in __adjust_resource() local
939 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
942 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
949 if (start <= tmp->end) in __adjust_resource()
955 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
959 res->end = end; in __adjust_resource()
990 resource_size_t end, const char *name) in __reserve_region_with_split() argument
1003 res->end = end; in __reserve_region_with_split()
1020 conflict->end >= res->end) { in __reserve_region_with_split()
1028 end = res->end; in __reserve_region_with_split()
1029 res->end = conflict->start - 1; in __reserve_region_with_split()
1030 if (conflict->end < end) { in __reserve_region_with_split()
1037 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1038 next_res->end = end; in __reserve_region_with_split()
1043 res->start = conflict->end + 1; in __reserve_region_with_split()
1051 resource_size_t end, const char *name) in reserve_region_with_split() argument
1056 if (root->start > start || root->end < end) { in reserve_region_with_split()
1058 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1060 if (start > root->end || end < root->start) in reserve_region_with_split()
1063 if (end > root->end) in reserve_region_with_split()
1064 end = root->end; in reserve_region_with_split()
1069 (unsigned long long)end); in reserve_region_with_split()
1074 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1133 devmem_is_allowed(PHYS_PFN(res->end))) { in revoke_iomem()
1166 res->end = start + n - 1; in __request_region_locked()
1255 resource_size_t end; in __release_region() local
1258 end = start + n - 1; in __release_region()
1267 if (res->start <= start && res->end >= end) { in __release_region()
1272 if (res->start != start || res->end != end) in __release_region()
1286 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1317 resource_size_t end; in release_mem_region_adjustable() local
1319 end = start + size - 1; in release_mem_region_adjustable()
1320 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1337 if (res->start >= end) in release_mem_region_adjustable()
1341 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1355 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1359 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1361 WARN_ON_ONCE(__adjust_resource(res, end + 1, in release_mem_region_adjustable()
1362 res->end - end)); in release_mem_region_adjustable()
1363 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1378 new_res->start = end + 1; in release_mem_region_adjustable()
1379 new_res->end = res->end; in release_mem_region_adjustable()
1406 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1443 res->end = cur->end; in merge_system_ram_resource()
1453 cur->end = res->end; in merge_system_ram_resource()
1626 res->end = io_start + io_num - 1; in reserve_setup()
1645 resource_size_t end = addr + size - 1; in iomem_map_sanity_check() local
1655 if (p->start > end) in iomem_map_sanity_check()
1657 if (p->end < addr) in iomem_map_sanity_check()
1660 PFN_DOWN(p->end) >= PFN_DOWN(end)) in iomem_map_sanity_check()
1672 &addr, &end, p->name, p); in iomem_map_sanity_check()
1704 if (p->end < addr) { in resource_is_exclusive()
1779 resource_size_t end; in gfr_start() local
1781 end = min_t(resource_size_t, base->end, in gfr_start()
1783 return end - size + 1; in gfr_start()
1799 addr <= min_t(resource_size_t, base->end, in gfr_continue()
1879 res->end = addr + size - 1; in get_free_mem_region()