Lines Matching full:start
37 .start = 0,
45 .start = 0,
104 unsigned long long start, end; in r_show() local
113 start = r->start; in r_show()
116 start = end = 0; in r_show()
121 width, start, in r_show()
128 .start = r_start,
165 resource_size_t start = new->start; in __request_resource() local
169 if (end < start) in __request_resource()
171 if (start < root->start) in __request_resource()
178 if (!tmp || tmp->start > end) { in __request_resource()
185 if (tmp->end < start) in __request_resource()
238 tmp->start = 0; in __release_child_resources()
302 * [@start..@end].
305 * of the resource that's within [@start..@end]; if none is found, returns
308 * @start: start address of the resource searched for
314 * The caller must specify @start, @end, @flags, and @desc
317 static int find_next_iomem_res(resource_size_t start, resource_size_t end, in find_next_iomem_res() argument
326 if (start >= end) in find_next_iomem_res()
333 if (p->start > end) { in find_next_iomem_res()
339 if (p->end < start) in find_next_iomem_res()
354 .start = max(start, p->start), in find_next_iomem_res()
366 static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end, in __walk_iomem_res_desc() argument
374 while (start < end && in __walk_iomem_res_desc()
375 !find_next_iomem_res(start, end, flags, desc, &res)) { in __walk_iomem_res_desc()
380 start = res.end + 1; in __walk_iomem_res_desc()
392 * @start: start addr
397 * All the memory ranges which overlap start,end and also match flags and
403 int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, in walk_iomem_res_desc() argument
406 return __walk_iomem_res_desc(start, end, flags, desc, arg, func); in walk_iomem_res_desc()
417 int walk_system_ram_res(u64 start, u64 end, void *arg, in walk_system_ram_res() argument
422 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_system_ram_res()
432 int walk_system_ram_res_rev(u64 start, u64 end, void *arg, in walk_system_ram_res_rev() argument
447 while ((start < end) && in walk_system_ram_res_rev()
448 (!find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res))) { in walk_system_ram_res_rev()
463 start = res.end + 1; in walk_system_ram_res_rev()
482 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
487 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_mem_res()
499 resource_size_t start, end; in walk_system_ram_range() local
505 start = (u64) start_pfn << PAGE_SHIFT; in walk_system_ram_range()
508 while (start < end && in walk_system_ram_range()
509 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res)) { in walk_system_ram_range()
510 pfn = PFN_UP(res.start); in walk_system_ram_range()
516 start = res.end + 1; in walk_system_ram_range()
536 static int __region_intersects(struct resource *parent, resource_size_t start, in __region_intersects() argument
546 res.start = start; in __region_intersects()
547 res.end = start + size - 1; in __region_intersects()
571 ostart = max(res.start, p->start); in __region_intersects()
581 * Range from 'ostart' to 'dp->start' in __region_intersects()
584 if (dp->start > ostart) in __region_intersects()
609 * @start: region start address
627 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
633 ret = __region_intersects(&iomem_resource, start, size, flags, desc); in region_intersects()
647 if (res->start < min) in resource_clip()
648 res->start = min; in resource_clip()
665 tmp.start = root->start; in __find_resource_space()
668 * of this->start - 1 to tmp->end below would cause an underflow. in __find_resource_space()
670 if (this && this->start == root->start) { in __find_resource_space()
671 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource_space()
676 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource_space()
680 if (tmp.end < tmp.start) in __find_resource_space()
687 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource_space()
690 if (avail.start >= tmp.start) { in __find_resource_space()
693 alloc.start = alignf(constraint->alignf_data, in __find_resource_space()
696 alloc.start = avail.start; in __find_resource_space()
698 alloc.end = alloc.start + size - 1; in __find_resource_space()
699 if (alloc.start <= alloc.end && in __find_resource_space()
701 new->start = alloc.start; in __find_resource_space()
711 tmp.start = this->end + 1; in __find_resource_space()
728 * * %0 - if successful, @new members start, end, and flags are altered.
763 old->start = new.start; in reallocate_resource()
774 old->start = new.start; in reallocate_resource()
832 * lookup_resource - find an existing resource by a resource start address
834 * @start: resource start address
838 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
844 if (res->start == start) in lookup_resource()
870 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
872 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
878 if (next->start < new->start || next->end > new->end) in __insert_resource()
882 if (next->sibling->start > new->end) in __insert_resource()
974 if (conflict->start < new->start) in insert_resource_expand_to_fit()
975 new->start = conflict->start; in insert_resource_expand_to_fit()
1017 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
1021 resource_size_t end = start + size - 1; in __adjust_resource()
1027 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
1030 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
1037 if (start <= tmp->end) in __adjust_resource()
1043 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
1046 res->start = start; in __adjust_resource()
1055 * adjust_resource - modify a resource's start and size
1057 * @start: new start value
1060 * Given an existing resource, change its start and size to match the
1064 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
1070 result = __adjust_resource(res, start, size); in adjust_resource()
1077 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1090 res->start = start; in __reserve_region_with_split()
1107 if (conflict->start <= res->start && in __reserve_region_with_split()
1115 if (conflict->start > res->start) { in __reserve_region_with_split()
1117 res->end = conflict->start - 1; in __reserve_region_with_split()
1125 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1131 res->start = conflict->end + 1; in __reserve_region_with_split()
1138 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1144 if (root->start > start || root->end < end) { in reserve_region_with_split()
1146 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1148 if (start > root->end || end < root->start) in reserve_region_with_split()
1153 if (start < root->start) in reserve_region_with_split()
1154 start = root->start; in reserve_region_with_split()
1156 (unsigned long long)start, in reserve_region_with_split()
1162 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1178 return res->start; in resource_alignment()
1217 * should start returning false, however for performance this in revoke_iomem()
1220 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1229 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1247 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1253 res->start = start; in __request_region_locked()
1254 res->end = start + n - 1; in __request_region_locked()
1300 * @start: resource start address
1306 resource_size_t start, resource_size_t n, in __request_region() argument
1316 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1334 * @start: resource start address
1339 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1346 end = start + n - 1; in __release_region()
1355 if (res->start <= start && res->end >= end) { in __release_region()
1360 if (res->start != start || res->end != end) in __release_region()
1374 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1381 * @start: resource start address
1398 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1407 end = start + size - 1; in release_mem_region_adjustable()
1408 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1425 if (res->start >= end) in release_mem_region_adjustable()
1429 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1443 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1447 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1448 /* adjust the start */ in release_mem_region_adjustable()
1451 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1453 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1454 start - res->start)); in release_mem_region_adjustable()
1466 new_res->start = end + 1; in release_mem_region_adjustable()
1474 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1475 start - res->start))) in release_mem_region_adjustable()
1494 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1624 resource_size_t start; member
1632 __release_region(this->parent, this->start, this->n); in devm_region_release()
1640 this->start == match->start && this->n == match->n; in devm_region_match()
1645 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1656 dr->start = start; in __devm_request_region()
1659 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1670 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1672 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1674 __release_region(parent, start, n); in __devm_release_region()
1713 res->start = io_start; in reserve_setup()
1742 if (p->start > end) in iomem_map_sanity_check()
1746 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1789 if (p->start >= addr + size) in resource_is_exclusive()
1876 return ALIGN(max(base->start, align), align); in gfr_start()
1883 return addr > size && addr >= base->start; in gfr_continue()
1952 dr->start = addr; in get_free_mem_region()
1967 res->start = addr; in get_free_mem_region()