Lines Matching full:start

35 	.start	= 0,
43 .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()
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
461 start = (u64) start_pfn << PAGE_SHIFT; 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()
466 pfn = PFN_UP(res.start); in walk_system_ram_range()
472 start = res.end + 1; in walk_system_ram_range()
492 static int __region_intersects(struct resource *parent, resource_size_t start, in __region_intersects() argument
502 res.start = start; in __region_intersects()
503 res.end = start + size - 1; in __region_intersects()
527 ostart = max(res.start, p->start); in __region_intersects()
537 * Range from 'ostart' to 'dp->start' in __region_intersects()
540 if (dp->start > ostart) in __region_intersects()
565 * @start: region start address
583 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
589 ret = __region_intersects(&iomem_resource, start, size, flags, desc); in region_intersects()
605 return avail->start; in simple_align_resource()
611 if (res->start < min) in resource_clip()
612 res->start = min; in resource_clip()
629 tmp.start = root->start; in __find_resource()
632 * of this->start - 1 to tmp->end below would cause an underflow. in __find_resource()
634 if (this && this->start == root->start) { in __find_resource()
635 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
640 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
644 if (tmp.end < tmp.start) in __find_resource()
651 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource()
654 if (avail.start >= tmp.start) { in __find_resource()
656 alloc.start = constraint->alignf(constraint->alignf_data, &avail, in __find_resource()
658 alloc.end = alloc.start + size - 1; in __find_resource()
659 if (alloc.start <= alloc.end && in __find_resource()
661 new->start = alloc.start; in __find_resource()
671 tmp.start = this->end + 1; in __find_resource()
711 old->start = new.start; in reallocate_resource()
722 old->start = new.start; in reallocate_resource()
786 * lookup_resource - find an existing resource by a resource start address
788 * @start: resource start address
792 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
798 if (res->start == start) in lookup_resource()
824 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
826 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
832 if (next->start < new->start || next->end > new->end) in __insert_resource()
836 if (next->sibling->start > new->end) in __insert_resource()
928 if (conflict->start < new->start) in insert_resource_expand_to_fit()
929 new->start = conflict->start; in insert_resource_expand_to_fit()
971 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
975 resource_size_t end = start + size - 1; in __adjust_resource()
981 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
984 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
991 if (start <= tmp->end) in __adjust_resource()
997 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
1000 res->start = start; in __adjust_resource()
1009 * adjust_resource - modify a resource's start and size
1011 * @start: new start value
1014 * Given an existing resource, change its start and size to match the
1018 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
1024 result = __adjust_resource(res, start, size); in adjust_resource()
1031 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1044 res->start = start; in __reserve_region_with_split()
1061 if (conflict->start <= res->start && in __reserve_region_with_split()
1069 if (conflict->start > res->start) { in __reserve_region_with_split()
1071 res->end = conflict->start - 1; in __reserve_region_with_split()
1079 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1085 res->start = conflict->end + 1; in __reserve_region_with_split()
1092 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1098 if (root->start > start || root->end < end) { in reserve_region_with_split()
1100 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1102 if (start > root->end || end < root->start) in reserve_region_with_split()
1107 if (start < root->start) in reserve_region_with_split()
1108 start = root->start; in reserve_region_with_split()
1110 (unsigned long long)start, in reserve_region_with_split()
1116 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1132 return res->start; in resource_alignment()
1171 * should start returning false, however for performance this in revoke_iomem()
1174 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1183 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1201 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1207 res->start = start; in __request_region_locked()
1208 res->end = start + n - 1; in __request_region_locked()
1254 * @start: resource start address
1260 resource_size_t start, resource_size_t n, in __request_region() argument
1270 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1288 * @start: resource start address
1293 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1300 end = start + n - 1; in __release_region()
1309 if (res->start <= start && res->end >= end) { in __release_region()
1314 if (res->start != start || res->end != end) in __release_region()
1328 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1335 * @start: resource start address
1352 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1361 end = start + size - 1; in release_mem_region_adjustable()
1362 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1379 if (res->start >= end) in release_mem_region_adjustable()
1383 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1397 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1401 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1402 /* adjust the start */ in release_mem_region_adjustable()
1405 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1407 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1408 start - res->start)); in release_mem_region_adjustable()
1420 new_res->start = end + 1; in release_mem_region_adjustable()
1428 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1429 start - res->start))) in release_mem_region_adjustable()
1448 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1578 resource_size_t start; member
1586 __release_region(this->parent, this->start, this->n); in devm_region_release()
1594 this->start == match->start && this->n == match->n; in devm_region_match()
1599 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1610 dr->start = start; in __devm_request_region()
1613 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1624 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1626 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1628 __release_region(parent, start, n); in __devm_release_region()
1667 res->start = io_start; in reserve_setup()
1697 if (p->start > end) in iomem_map_sanity_check()
1701 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1744 if (p->start >= addr + size) in resource_is_exclusive()
1827 return ALIGN(base->start, align); in gfr_start()
1834 return addr > size && addr >= base->start; in gfr_continue()
1903 dr->start = addr; in get_free_mem_region()
1918 res->start = addr; in get_free_mem_region()