Lines Matching refs:start
35 .start = 0,
43 .start = 0,
120 unsigned long long start, end; in r_show() local
129 start = r->start; in r_show()
132 start = end = 0; in r_show()
137 width, start, in r_show()
144 .start = r_start,
198 resource_size_t start = new->start; in __request_resource() local
202 if (end < start) in __request_resource()
204 if (start < root->start) in __request_resource()
211 if (!tmp || tmp->start > end) { in __request_resource()
218 if (tmp->end < start) in __request_resource()
271 tmp->start = 0; in __release_child_resources()
350 static int find_next_iomem_res(resource_size_t start, resource_size_t end, in find_next_iomem_res() argument
359 if (start >= end) in find_next_iomem_res()
366 if (p->start > end) { in find_next_iomem_res()
372 if (p->end < start) in find_next_iomem_res()
387 .start = max(start, p->start), in find_next_iomem_res()
399 static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end, in __walk_iomem_res_desc() argument
407 while (start < end && in __walk_iomem_res_desc()
408 !find_next_iomem_res(start, end, flags, desc, &res)) { in __walk_iomem_res_desc()
413 start = res.end + 1; in __walk_iomem_res_desc()
436 int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start, in walk_iomem_res_desc() argument
439 return __walk_iomem_res_desc(start, end, flags, desc, arg, func); in walk_iomem_res_desc()
450 int walk_system_ram_res(u64 start, u64 end, void *arg, in walk_system_ram_res() argument
455 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_system_ram_res()
463 int walk_mem_res(u64 start, u64 end, void *arg, in walk_mem_res() argument
468 return __walk_iomem_res_desc(start, end, flags, IORES_DESC_NONE, arg, in walk_mem_res()
480 resource_size_t start, end; in walk_system_ram_range() local
486 start = (u64) start_pfn << PAGE_SHIFT; in walk_system_ram_range()
489 while (start < end && in walk_system_ram_range()
490 !find_next_iomem_res(start, end, flags, IORES_DESC_NONE, &res)) { in walk_system_ram_range()
491 pfn = PFN_UP(res.start); in walk_system_ram_range()
497 start = res.end + 1; in walk_system_ram_range()
517 static int __region_intersects(resource_size_t start, size_t size, in __region_intersects() argument
524 res.start = start; in __region_intersects()
525 res.end = start + size - 1; in __region_intersects()
565 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
571 ret = __region_intersects(start, size, flags, desc); in region_intersects()
587 return avail->start; in simple_align_resource()
593 if (res->start < min) in resource_clip()
594 res->start = min; in resource_clip()
611 tmp.start = root->start; in __find_resource()
616 if (this && this->start == root->start) { in __find_resource()
617 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
622 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
626 if (tmp.end < tmp.start) in __find_resource()
633 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource()
636 if (avail.start >= tmp.start) { in __find_resource()
638 alloc.start = constraint->alignf(constraint->alignf_data, &avail, in __find_resource()
640 alloc.end = alloc.start + size - 1; in __find_resource()
641 if (alloc.start <= alloc.end && in __find_resource()
643 new->start = alloc.start; in __find_resource()
653 tmp.start = this->end + 1; in __find_resource()
693 old->start = new.start; in reallocate_resource()
704 old->start = new.start; in reallocate_resource()
774 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
780 if (res->start == start) in lookup_resource()
806 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
808 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
814 if (next->start < new->start || next->end > new->end) in __insert_resource()
818 if (next->sibling->start > new->end) in __insert_resource()
910 if (conflict->start < new->start) in insert_resource_expand_to_fit()
911 new->start = conflict->start; in insert_resource_expand_to_fit()
946 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
950 resource_size_t end = start + size - 1; in __adjust_resource()
956 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
959 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
966 if (start <= tmp->end) in __adjust_resource()
972 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
975 res->start = start; in __adjust_resource()
993 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
999 result = __adjust_resource(res, start, size); in adjust_resource()
1006 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1019 res->start = start; in __reserve_region_with_split()
1036 if (conflict->start <= res->start && in __reserve_region_with_split()
1044 if (conflict->start > res->start) { in __reserve_region_with_split()
1046 res->end = conflict->start - 1; in __reserve_region_with_split()
1054 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1060 res->start = conflict->end + 1; in __reserve_region_with_split()
1067 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1073 if (root->start > start || root->end < end) { in reserve_region_with_split()
1075 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1077 if (start > root->end || end < root->start) in reserve_region_with_split()
1082 if (start < root->start) in reserve_region_with_split()
1083 start = root->start; in reserve_region_with_split()
1085 (unsigned long long)start, in reserve_region_with_split()
1091 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1107 return res->start; in resource_alignment()
1149 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1158 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1176 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1182 res->start = start; in __request_region_locked()
1183 res->end = start + n - 1; in __request_region_locked()
1235 resource_size_t start, resource_size_t n, in __request_region() argument
1245 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1268 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1275 end = start + n - 1; in __release_region()
1284 if (res->start <= start && res->end >= end) { in __release_region()
1289 if (res->start != start || res->end != end) in __release_region()
1304 "<%016llx-%016llx>\n", (unsigned long long)start, in __release_region()
1329 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1338 end = start + size - 1; in release_mem_region_adjustable()
1339 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1356 if (res->start >= end) in release_mem_region_adjustable()
1360 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1388 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1392 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1396 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1398 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1399 start - res->start)); in release_mem_region_adjustable()
1411 new_res->start = end + 1; in release_mem_region_adjustable()
1419 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1420 start - res->start))) in release_mem_region_adjustable()
1439 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1569 resource_size_t start; member
1577 __release_region(this->parent, this->start, this->n); in devm_region_release()
1585 this->start == match->start && this->n == match->n; in devm_region_match()
1590 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1601 dr->start = start; in __devm_request_region()
1604 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1615 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1617 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1619 __release_region(parent, start, n); in __devm_release_region()
1658 res->start = io_start; in reserve_setup()
1687 if (p->start >= addr + size) in iomem_map_sanity_check()
1691 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1739 if (p->start >= addr + size) in iomem_is_exclusive()
1827 for (; addr > size && addr >= base->start; addr -= size) { in __request_free_mem_region()
1838 dr->start = addr; in __request_free_mem_region()