Lines Matching refs:root

106 	struct resource *root = m->private;  in r_show()  local
108 int width = root->end < 0x10000 ? 4 : 8; in r_show()
112 if (p->parent == root) in r_show()
208 static struct resource * __request_resource(struct resource *root, struct resource *new) in __request_resource() argument
215 return root; in __request_resource()
216 if (start < root->start) in __request_resource()
217 return root; in __request_resource()
218 if (end > root->end) in __request_resource()
219 return root; in __request_resource()
220 p = &root->child; in __request_resource()
226 new->parent = root; in __request_resource()
292 struct resource *request_resource_conflict(struct resource *root, struct resource *new) in request_resource_conflict() argument
297 conflict = __request_resource(root, new); in request_resource_conflict()
309 int request_resource(struct resource *root, struct resource *new) in request_resource() argument
313 conflict = request_resource_conflict(root, new); in request_resource()
556 static int __find_resource(struct resource *root, struct resource *old, in __find_resource() argument
561 struct resource *this = root->child; in __find_resource()
564 tmp.start = root->start; in __find_resource()
569 if (this && this->start == root->start) { in __find_resource()
577 tmp.end = root->end; in __find_resource()
601 next: if (!this || this->end == root->end) in __find_resource()
614 static int find_resource(struct resource *root, struct resource *new, in find_resource() argument
618 return __find_resource(root, NULL, new, size, constraint); in find_resource()
631 static int reallocate_resource(struct resource *root, struct resource *old, in reallocate_resource() argument
641 if ((err = __find_resource(root, old, &new, newsize, constraint))) in reallocate_resource()
661 conflict = __request_resource(root, old); in reallocate_resource()
682 int allocate_resource(struct resource *root, struct resource *new, in allocate_resource() argument
706 return reallocate_resource(root, new, size, &constraint); in allocate_resource()
710 err = find_resource(root, new, size, &constraint); in allocate_resource()
711 if (err >= 0 && __request_resource(root, new)) in allocate_resource()
726 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource() argument
731 for (res = root->child; res; res = res->sibling) { in lookup_resource()
839 void insert_resource_expand_to_fit(struct resource *root, struct resource *new) in insert_resource_expand_to_fit() argument
848 conflict = __insert_resource(root, new); in insert_resource_expand_to_fit()
851 if (conflict == root) in insert_resource_expand_to_fit()
924 static void __init __reserve_region_with_split(struct resource *root, in __reserve_region_with_split() argument
928 struct resource *parent = root; in __reserve_region_with_split()
982 void __init reserve_region_with_split(struct resource *root, in reserve_region_with_split() argument
989 if (root->start > start || root->end < end) { in reserve_region_with_split()
992 root); in reserve_region_with_split()
993 if (start > root->end || end < root->start) in reserve_region_with_split()
996 if (end > root->end) in reserve_region_with_split()
997 end = root->end; in reserve_region_with_split()
998 if (start < root->start) in reserve_region_with_split()
999 start = root->start; in reserve_region_with_split()
1007 __reserve_region_with_split(root, start, end, name); in reserve_region_with_split()
1279 int devm_request_resource(struct device *dev, struct resource *root, in devm_request_resource() argument
1290 conflict = request_resource_conflict(root, new); in devm_request_resource()