Lines Matching refs: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()
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()
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
500 res.start = start; in __region_intersects()
501 res.end = start + size - 1; in __region_intersects()
541 int region_intersects(resource_size_t start, size_t size, unsigned long flags, in region_intersects() argument
547 ret = __region_intersects(&iomem_resource, start, size, flags, desc); in region_intersects()
563 return avail->start; in simple_align_resource()
569 if (res->start < min) in resource_clip()
570 res->start = min; in resource_clip()
587 tmp.start = root->start; in __find_resource()
592 if (this && this->start == root->start) { in __find_resource()
593 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
598 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
602 if (tmp.end < tmp.start) in __find_resource()
609 avail.start = ALIGN(tmp.start, constraint->align); in __find_resource()
612 if (avail.start >= tmp.start) { in __find_resource()
614 alloc.start = constraint->alignf(constraint->alignf_data, &avail, in __find_resource()
616 alloc.end = alloc.start + size - 1; in __find_resource()
617 if (alloc.start <= alloc.end && in __find_resource()
619 new->start = alloc.start; in __find_resource()
629 tmp.start = this->end + 1; in __find_resource()
669 old->start = new.start; in reallocate_resource()
680 old->start = new.start; in reallocate_resource()
750 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
756 if (res->start == start) in lookup_resource()
782 if ((first->start > new->start) || (first->end < new->end)) in __insert_resource()
784 if ((first->start == new->start) && (first->end == new->end)) in __insert_resource()
790 if (next->start < new->start || next->end > new->end) in __insert_resource()
794 if (next->sibling->start > new->end) in __insert_resource()
886 if (conflict->start < new->start) in insert_resource_expand_to_fit()
887 new->start = conflict->start; in insert_resource_expand_to_fit()
929 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource() argument
933 resource_size_t end = start + size - 1; in __adjust_resource()
939 if ((start < parent->start) || (end > parent->end)) in __adjust_resource()
942 if (res->sibling && (res->sibling->start <= end)) in __adjust_resource()
949 if (start <= tmp->end) in __adjust_resource()
955 if ((tmp->start < start) || (tmp->end > end)) in __adjust_resource()
958 res->start = start; in __adjust_resource()
976 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource() argument
982 result = __adjust_resource(res, start, size); in adjust_resource()
989 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split() argument
1002 res->start = start; in __reserve_region_with_split()
1019 if (conflict->start <= res->start && in __reserve_region_with_split()
1027 if (conflict->start > res->start) { in __reserve_region_with_split()
1029 res->end = conflict->start - 1; in __reserve_region_with_split()
1037 next_res->start = conflict->end + 1; in __reserve_region_with_split()
1043 res->start = conflict->end + 1; in __reserve_region_with_split()
1050 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split() argument
1056 if (root->start > start || root->end < end) { in reserve_region_with_split()
1058 (unsigned long long)start, (unsigned long long)end, in reserve_region_with_split()
1060 if (start > root->end || end < root->start) in reserve_region_with_split()
1065 if (start < root->start) in reserve_region_with_split()
1066 start = root->start; in reserve_region_with_split()
1068 (unsigned long long)start, in reserve_region_with_split()
1074 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1090 return res->start; in resource_alignment()
1132 if (devmem_is_allowed(PHYS_PFN(res->start)) && in revoke_iomem()
1141 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); in revoke_iomem()
1159 resource_size_t start, resource_size_t n, in __request_region_locked() argument
1165 res->start = start; in __request_region_locked()
1166 res->end = start + n - 1; in __request_region_locked()
1218 resource_size_t start, resource_size_t n, in __request_region() argument
1228 ret = __request_region_locked(res, parent, start, n, name, flags); in __request_region()
1251 void __release_region(struct resource *parent, resource_size_t start, in __release_region() argument
1258 end = start + n - 1; in __release_region()
1267 if (res->start <= start && res->end >= end) { in __release_region()
1272 if (res->start != start || res->end != end) in __release_region()
1286 pr_warn("Trying to free nonexistent resource <%pa-%pa>\n", &start, &end); in __release_region()
1310 void release_mem_region_adjustable(resource_size_t start, resource_size_t size) in release_mem_region_adjustable() argument
1319 end = start + size - 1; in release_mem_region_adjustable()
1320 if (WARN_ON_ONCE((start < parent->start) || (end > parent->end))) in release_mem_region_adjustable()
1337 if (res->start >= end) in release_mem_region_adjustable()
1341 if (res->start > start || res->end < end) { in release_mem_region_adjustable()
1355 if (res->start == start && res->end == end) { in release_mem_region_adjustable()
1359 } else if (res->start == start && res->end != end) { in release_mem_region_adjustable()
1363 } else if (res->start != start && res->end == end) { in release_mem_region_adjustable()
1365 WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1366 start - res->start)); in release_mem_region_adjustable()
1378 new_res->start = end + 1; in release_mem_region_adjustable()
1386 if (WARN_ON_ONCE(__adjust_resource(res, res->start, in release_mem_region_adjustable()
1387 start - res->start))) in release_mem_region_adjustable()
1406 return r1->flags == r2->flags && r1->end + 1 == r2->start && in system_ram_resources_mergeable()
1536 resource_size_t start; member
1544 __release_region(this->parent, this->start, this->n); in devm_region_release()
1552 this->start == match->start && this->n == match->n; in devm_region_match()
1557 resource_size_t start, resource_size_t n, const char *name) in __devm_request_region() argument
1568 dr->start = start; in __devm_request_region()
1571 res = __request_region(parent, start, n, name, 0); in __devm_request_region()
1582 resource_size_t start, resource_size_t n) in __devm_release_region() argument
1584 struct region_devres match_data = { parent, start, n }; in __devm_release_region()
1586 __release_region(parent, start, n); in __devm_release_region()
1625 res->start = io_start; in reserve_setup()
1655 if (p->start > end) in iomem_map_sanity_check()
1659 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1702 if (p->start >= addr + size) in resource_is_exclusive()
1786 return ALIGN(base->start, align); in gfr_start()
1793 return addr > size && addr >= base->start; in gfr_continue()
1863 dr->start = addr; in get_free_mem_region()
1878 res->start = addr; in get_free_mem_region()