Lines Matching full:start
37 .start = 0,
45 .start = 0,
122 unsigned long long start, end; in r_show() local
131 start = r->start; in r_show()
134 start = end = 0; in r_show()
139 width, start, in r_show()
146 .start = r_start,
183 resource_size_t start = new->start; in __request_resource() local
187 if (end < start) in __request_resource()
189 if (start < root->start) in __request_resource()
196 if (!tmp || tmp->start > end) { in __request_resource()
203 if (tmp->end < start) in __request_resource()
256 tmp->start = 0; in __release_child_resources()
325 * [@start..@end].
328 * of the resource that's within [@start..@end]; if none is found, returns
331 * @start: start address of the resource searched for
337 * The caller must specify @start, @end, @flags, and @desc
340 static int find_next_iomem_res(resource_size_t start, resource_size_t end, in find_next_iomem_res() argument
349 if (start >= end) in find_next_iomem_res()
356 if (p->start > end) { in find_next_iomem_res()
362 if (p->end < start) in find_next_iomem_res()
373 .start = max(start, p->start), in find_next_iomem_res()
385 static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end, in __walk_iomem_res_desc() argument
393 while (start < end && in __walk_iomem_res_desc()
394 !find_next_iomem_res(start, end, flags, desc, &res)) { in __walk_iomem_res_desc()
399 start = res.end + 1; in __walk_iomem_res_desc()
411 * @start: start addr
416 * All the memory ranges which overlap start,end and also match flags and
422 int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, in walk_iomem_res_desc() argument
425 return __walk_iomem_res_desc(start, end, flags, desc, arg, func); in walk_iomem_res_desc()
436 int walk_system_ram_res(u64 start, u64 end, void *arg, in walk_system_ram_res() argument
441 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_system_ram_res()
451 int walk_system_ram_res_rev(u64 start, u64 end, void *arg, in walk_system_ram_res_rev() argument
466 while ((start < end) && in walk_system_ram_res_rev()
467 (!find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res))) { in walk_system_ram_res_rev()
482 start = res.end + 1; in walk_system_ram_res_rev()
501 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
506 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_mem_res()
518 resource_size_t start, end; in walk_system_ram_range() local
524 start = (u64) start_pfn << PAGE_SHIFT; in walk_system_ram_range()
527 while (start < end && in walk_system_ram_range()
528 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res)) { in walk_system_ram_range()
529 pfn = PFN_UP(res.start); in walk_system_ram_range()
535 start = res.end + 1; in walk_system_ram_range()
555 static int __region_intersects(struct resource *parent, resource_size_t start, in __region_intersects() argument
564 res.start = start; in __region_intersects()
565 res.end = start + size - 1; in __region_intersects()
593 * Range from 'o.start' to 'dp->start' in __region_intersects()
596 if (dp->start > o.start) in __region_intersects()
603 o.start = max(o.start, dp->end + 1); in __region_intersects()
621 * @start: region start address
639 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
645 ret = __region_intersects(&iomem_resource, start, size, flags, desc); in region_intersects()
659 if (res->start < min) in resource_clip()
660 res->start = min; in resource_clip()
677 tmp.start = root->start; in __find_resource_space()
680 * of this->start - 1 to tmp->end below would cause an underflow. in __find_resource_space()
682 if (this && this->start == root->start) { in __find_resource_space()
683 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource_space()
688 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource_space()
692 if (tmp.end < tmp.start) in __find_resource_space()
699 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource_space()
702 if (avail.start >= tmp.start) { in __find_resource_space()
705 alloc.start = alignf(constraint->alignf_data, in __find_resource_space()
708 alloc.start = avail.start; in __find_resource_space()
710 alloc.end = alloc.start + size - 1; in __find_resource_space()
711 if (alloc.start <= alloc.end && in __find_resource_space()
713 new->start = alloc.start; in __find_resource_space()
723 tmp.start = this->end + 1; in __find_resource_space()
740 * * %0 - if successful, @new members start, end, and flags are altered.
775 old->start = new.start; in reallocate_resource()
786 old->start = new.start; in reallocate_resource()
844 * lookup_resource - find an existing resource by a resource start address
846 * @start: resource start address
850 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
856 if (res->start == start) in lookup_resource()
882 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
884 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
890 if (next->start < new->start || next->end > new->end) in __insert_resource()
894 if (next->sibling->start > new->end) in __insert_resource()
986 if (conflict->start < new->start) in insert_resource_expand_to_fit()
987 new->start = conflict->start; in insert_resource_expand_to_fit()
1029 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
1033 resource_size_t end = start + size - 1; in __adjust_resource()
1039 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
1042 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
1049 if (start <= tmp->end) in __adjust_resource()
1055 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
1058 res->start = start; in __adjust_resource()
1067 * adjust_resource - modify a resource's start and size
1069 * @start: new start value
1072 * Given an existing resource, change its start and size to match the
1076 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
1082 result = __adjust_resource(res, start, size); in adjust_resource()
1089 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1102 res->start = start; in __reserve_region_with_split()
1119 if (conflict->start <= res->start && in __reserve_region_with_split()
1127 if (conflict->start > res->start) { in __reserve_region_with_split()
1129 res->end = conflict->start - 1; in __reserve_region_with_split()
1137 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1143 res->start = conflict->end + 1; in __reserve_region_with_split()
1150 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1156 if (root->start > start || root->end < end) { in reserve_region_with_split()
1158 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1160 if (start > root->end || end < root->start) in reserve_region_with_split()
1165 if (start < root->start) in reserve_region_with_split()
1166 start = root->start; in reserve_region_with_split()
1168 (unsigned long long)start, in reserve_region_with_split()
1174 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1190 return res->start; in resource_alignment()
1229 * should start returning false, however for performance this in revoke_iomem()
1232 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1241 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1259 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1265 res->start = start; in __request_region_locked()
1266 res->end = start + n - 1; in __request_region_locked()
1312 * @start: resource start address
1318 resource_size_t start, resource_size_t n, in __request_region() argument
1328 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1346 * @start: resource start address
1351 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1358 end = start + n - 1; in __release_region()
1367 if (res->start <= start && res->end >= end) { in __release_region()
1372 if (res->start != start || res->end != end) in __release_region()
1386 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1393 * @start: resource start address
1410 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1419 end = start + size - 1; in release_mem_region_adjustable()
1420 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1437 if (res->start >= end) in release_mem_region_adjustable()
1441 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1455 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1459 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1460 /* adjust the start */ in release_mem_region_adjustable()
1463 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1465 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1466 start - res->start)); in release_mem_region_adjustable()
1478 new_res->start = end + 1; in release_mem_region_adjustable()
1486 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1487 start - res->start))) in release_mem_region_adjustable()
1506 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1636 resource_size_t start; member
1644 __release_region(this->parent, this->start, this->n); in devm_region_release()
1652 this->start == match->start && this->n == match->n; in devm_region_match()
1657 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1668 dr->start = start; in __devm_request_region()
1671 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1682 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1684 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1724 res->start = io_start; in reserve_setup()
1753 if (p->start > end) in iomem_map_sanity_check()
1757 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1800 if (p->start >= addr + size) in resource_is_exclusive()
1887 return ALIGN(max(base->start, align), align); in gfr_start()
1894 return addr > size && addr >= base->start; in gfr_continue()
1963 dr->start = addr; in get_free_mem_region()
1978 res->start = addr; in get_free_mem_region()