Lines Matching full:start
37 .start = 0,
45 .start = 0,
112 unsigned long long start, end; in r_show() local
121 start = r->start; in r_show()
124 start = end = 0; in r_show()
129 width, start, in r_show()
136 .start = r_start,
173 resource_size_t start = new->start; in __request_resource() local
177 if (end < start) in __request_resource()
179 if (start < root->start) in __request_resource()
186 if (!tmp || tmp->start > end) { in __request_resource()
193 if (tmp->end < start) in __request_resource()
246 tmp->start = 0; in __release_child_resources()
310 * [@start..@end].
313 * of the resource that's within [@start..@end]; if none is found, returns
316 * @start: start address of the resource searched for
322 * The caller must specify @start, @end, @flags, and @desc
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()
362 .start = max(start, p->start), 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()
400 * @start: start addr
405 * All the memory ranges which overlap start,end and also match flags and
411 int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, 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()
440 int walk_system_ram_res_rev(u64 start, u64 end, void *arg, in walk_system_ram_res_rev() argument
455 while ((start < end) && in walk_system_ram_res_rev()
456 (!find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res))) { in walk_system_ram_res_rev()
471 rams[i].start = res.start; in walk_system_ram_res_rev()
474 start = res.end + 1; in walk_system_ram_res_rev()
493 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
498 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_mem_res()
510 resource_size_t start, end; in walk_system_ram_range() local
516 start = (u64) start_pfn << PAGE_SHIFT; in walk_system_ram_range()
519 while (start < end && in walk_system_ram_range()
520 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res)) { in walk_system_ram_range()
521 pfn = PFN_UP(res.start); in walk_system_ram_range()
527 start = res.end + 1; in walk_system_ram_range()
547 static int __region_intersects(struct resource *parent, resource_size_t start, in __region_intersects() argument
555 res.start = start; in __region_intersects()
556 res.end = start + size - 1; in __region_intersects()
578 * @start: region start address
596 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
602 ret = __region_intersects(&iomem_resource, start, size, flags, desc); in region_intersects()
618 return avail->start; in simple_align_resource()
624 if (res->start < min) in resource_clip()
625 res->start = min; in resource_clip()
642 tmp.start = root->start; in __find_resource()
645 * of this->start - 1 to tmp->end below would cause an underflow. in __find_resource()
647 if (this && this->start == root->start) { in __find_resource()
648 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
653 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
657 if (tmp.end < tmp.start) in __find_resource()
664 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource()
667 if (avail.start >= tmp.start) { in __find_resource()
669 alloc.start = constraint->alignf(constraint->alignf_data, &avail, in __find_resource()
671 alloc.end = alloc.start + size - 1; in __find_resource()
672 if (alloc.start <= alloc.end && in __find_resource()
674 new->start = alloc.start; in __find_resource()
684 tmp.start = this->end + 1; in __find_resource()
724 old->start = new.start; in reallocate_resource()
735 old->start = new.start; in reallocate_resource()
799 * lookup_resource - find an existing resource by a resource start address
801 * @start: resource start address
805 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
811 if (res->start == start) in lookup_resource()
837 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
839 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
845 if (next->start < new->start || next->end > new->end) in __insert_resource()
849 if (next->sibling->start > new->end) in __insert_resource()
941 if (conflict->start < new->start) in insert_resource_expand_to_fit()
942 new->start = conflict->start; in insert_resource_expand_to_fit()
984 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
988 resource_size_t end = start + size - 1; in __adjust_resource()
994 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
997 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
1004 if (start <= tmp->end) in __adjust_resource()
1010 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
1013 res->start = start; in __adjust_resource()
1022 * adjust_resource - modify a resource's start and size
1024 * @start: new start value
1027 * Given an existing resource, change its start and size to match the
1031 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
1037 result = __adjust_resource(res, start, size); in adjust_resource()
1044 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1057 res->start = start; in __reserve_region_with_split()
1074 if (conflict->start <= res->start && in __reserve_region_with_split()
1082 if (conflict->start > res->start) { in __reserve_region_with_split()
1084 res->end = conflict->start - 1; in __reserve_region_with_split()
1092 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1098 res->start = conflict->end + 1; in __reserve_region_with_split()
1105 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1111 if (root->start > start || root->end < end) { in reserve_region_with_split()
1113 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1115 if (start > root->end || end < root->start) in reserve_region_with_split()
1120 if (start < root->start) in reserve_region_with_split()
1121 start = root->start; in reserve_region_with_split()
1123 (unsigned long long)start, in reserve_region_with_split()
1129 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1145 return res->start; in resource_alignment()
1184 * should start returning false, however for performance this in revoke_iomem()
1187 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1196 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1214 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1220 res->start = start; in __request_region_locked()
1221 res->end = start + n - 1; in __request_region_locked()
1267 * @start: resource start address
1273 resource_size_t start, resource_size_t n, in __request_region() argument
1283 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1301 * @start: resource start address
1306 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1313 end = start + n - 1; in __release_region()
1322 if (res->start <= start && res->end >= end) { in __release_region()
1327 if (res->start != start || res->end != end) in __release_region()
1341 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1348 * @start: resource start address
1365 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1374 end = start + size - 1; in release_mem_region_adjustable()
1375 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1392 if (res->start >= end) in release_mem_region_adjustable()
1396 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1410 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1414 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1415 /* adjust the start */ in release_mem_region_adjustable()
1418 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1420 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1421 start - res->start)); in release_mem_region_adjustable()
1433 new_res->start = end + 1; in release_mem_region_adjustable()
1441 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1442 start - res->start))) in release_mem_region_adjustable()
1461 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1591 resource_size_t start; member
1599 __release_region(this->parent, this->start, this->n); in devm_region_release()
1607 this->start == match->start && this->n == match->n; in devm_region_match()
1612 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1623 dr->start = start; in __devm_request_region()
1626 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1637 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1639 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1641 __release_region(parent, start, n); in __devm_release_region()
1680 res->start = io_start; in reserve_setup()
1709 if (p->start > end) in iomem_map_sanity_check()
1713 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1756 if (p->start >= addr + size) in resource_is_exclusive()
1840 return ALIGN(base->start, align); in gfr_start()
1847 return addr > size && addr >= base->start; in gfr_continue()
1917 dr->start = addr; in get_free_mem_region()
1932 res->start = addr; in get_free_mem_region()