Lines Matching full:start
32 .start = 0,
40 .start = 0,
109 unsigned long long start, end; in r_show() local
118 start = r->start; in r_show()
121 start = end = 0; in r_show()
126 width, start, in r_show()
133 .start = r_start,
187 resource_size_t start = new->start; in __request_resource() local
191 if (end < start) in __request_resource()
193 if (start < root->start) in __request_resource()
200 if (!tmp || tmp->start > end) { in __request_resource()
207 if (tmp->end < start) in __request_resource()
260 tmp->start = 0; in __release_child_resources()
323 * Finds the lowest iomem resource that covers part of [@start..@end]. The
324 * caller must specify @start, @end, @flags, and @desc (which may be
328 * of the resource that's within [@start..@end]; if none is found, returns
334 * @start: start address of the resource searched for
341 static int find_next_iomem_res(resource_size_t start, resource_size_t end, in find_next_iomem_res() argument
351 if (start >= end) in find_next_iomem_res()
358 if (p->start > end) { in find_next_iomem_res()
364 if (p->end < start) in find_next_iomem_res()
370 * use only the first level, start looking at children as well. in find_next_iomem_res()
386 .start = max(start, p->start), in find_next_iomem_res()
398 static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end, in __walk_iomem_res_desc() argument
406 while (start < end && in __walk_iomem_res_desc()
407 !find_next_iomem_res(start, end, flags, desc, first_lvl, &res)) { in __walk_iomem_res_desc()
412 start = res.end + 1; in __walk_iomem_res_desc()
421 * All the memory ranges which overlap start,end and also match flags and
426 * @start: start addr
434 int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, in walk_iomem_res_desc() argument
437 return __walk_iomem_res_desc(start, end, flags, desc, false, arg, func); in walk_iomem_res_desc()
448 int walk_system_ram_res(u64 start, u64 end, void *arg, in walk_system_ram_res() argument
453 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, true, in walk_system_ram_res()
461 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
466 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, true, in walk_mem_res()
481 resource_size_t start, end; in walk_system_ram_range() local
487 start = (u64) start_pfn << PAGE_SHIFT; in walk_system_ram_range()
490 while (start < end && in walk_system_ram_range()
491 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, in walk_system_ram_range()
493 pfn = PFN_UP(res.start); in walk_system_ram_range()
499 start = res.end + 1; in walk_system_ram_range()
521 * @start: region start address
539 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
546 res.start = start; in region_intersects()
547 res.end = start + size - 1; in region_intersects()
579 return avail->start; in simple_align_resource()
585 if (res->start < min) in resource_clip()
586 res->start = min; in resource_clip()
603 tmp.start = root->start; in __find_resource()
606 * of this->start - 1 to tmp->end below would cause an underflow. in __find_resource()
608 if (this && this->start == root->start) { in __find_resource()
609 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
614 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
618 if (tmp.end < tmp.start) in __find_resource()
625 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource()
628 if (avail.start >= tmp.start) { in __find_resource()
630 alloc.start = constraint->alignf(constraint->alignf_data, &avail, in __find_resource()
632 alloc.end = alloc.start + size - 1; in __find_resource()
633 if (alloc.start <= alloc.end && in __find_resource()
635 new->start = alloc.start; in __find_resource()
645 tmp.start = this->end + 1; in __find_resource()
685 old->start = new.start; in reallocate_resource()
696 old->start = new.start; in reallocate_resource()
760 * lookup_resource - find an existing resource by a resource start address
762 * @start: resource start address
766 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
772 if (res->start == start) in lookup_resource()
798 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
800 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
806 if (next->start < new->start || next->end > new->end) in __insert_resource()
810 if (next->sibling->start > new->end) in __insert_resource()
902 if (conflict->start < new->start) in insert_resource_expand_to_fit()
903 new->start = conflict->start; in insert_resource_expand_to_fit()
938 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
942 resource_size_t end = start + size - 1; in __adjust_resource()
948 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
951 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
958 if (start <= tmp->end) in __adjust_resource()
964 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
967 res->start = start; in __adjust_resource()
976 * adjust_resource - modify a resource's start and size
978 * @start: new start value
981 * Given an existing resource, change its start and size to match the
985 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
991 result = __adjust_resource(res, start, size); in adjust_resource()
998 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1011 res->start = start; in __reserve_region_with_split()
1028 if (conflict->start <= res->start && in __reserve_region_with_split()
1036 if (conflict->start > res->start) { in __reserve_region_with_split()
1038 res->end = conflict->start - 1; in __reserve_region_with_split()
1046 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1052 res->start = conflict->end + 1; in __reserve_region_with_split()
1059 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1065 if (root->start > start || root->end < end) { in reserve_region_with_split()
1067 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1069 if (start > root->end || end < root->start) in reserve_region_with_split()
1074 if (start < root->start) in reserve_region_with_split()
1075 start = root->start; in reserve_region_with_split()
1077 (unsigned long long)start, in reserve_region_with_split()
1083 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1099 return res->start; in resource_alignment()
1121 * @start: resource start address
1127 resource_size_t start, resource_size_t n, in __request_region() argument
1138 res->start = start; in __request_region()
1139 res->end = start + n - 1; in __request_region()
1194 * @start: resource start address
1199 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1206 end = start + n - 1; in __release_region()
1215 if (res->start <= start && res->end >= end) { in __release_region()
1220 if (res->start != start || res->end != end) in __release_region()
1235 "<%016llx-%016llx>\n", (unsigned long long)start, in __release_region()
1243 * @start: resource start address
1260 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1269 end = start + size - 1; in release_mem_region_adjustable()
1270 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1287 if (res->start >= end) in release_mem_region_adjustable()
1291 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1319 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1323 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1324 /* adjust the start */ in release_mem_region_adjustable()
1327 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1329 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1330 start - res->start)); in release_mem_region_adjustable()
1342 new_res->start = end + 1; in release_mem_region_adjustable()
1350 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1351 start - res->start))) in release_mem_region_adjustable()
1370 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1500 resource_size_t start; member
1508 __release_region(this->parent, this->start, this->n); in devm_region_release()
1516 this->start == match->start && this->n == match->n; in devm_region_match()
1521 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1532 dr->start = start; in __devm_request_region()
1535 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1546 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1548 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1550 __release_region(parent, start, n); in __devm_release_region()
1589 res->start = io_start; in reserve_setup()
1618 if (p->start >= addr + size) in iomem_map_sanity_check()
1622 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1674 if (p->start >= addr + size) in iomem_is_exclusive()
1731 for (; addr > size && addr >= base->start; addr -= size) { in __request_free_mem_region()