Lines Matching refs:resource

35 struct resource ioport_resource = {
43 struct resource iomem_resource = {
53 static struct resource *next_resource(struct resource *p, bool skip_children) in next_resource()
72 struct resource *root = pde_data(file_inode(m->file)); in r_start()
73 struct resource *p; in r_start()
87 struct resource *p = v; in r_next()
102 struct resource *root = pde_data(file_inode(m->file)); in r_show()
103 struct resource *r = v, *p; in r_show()
145 static void free_resource(struct resource *res) in free_resource()
157 static struct resource *alloc_resource(gfp_t flags) in alloc_resource()
159 return kzalloc(sizeof(struct resource), flags); in alloc_resource()
163 static struct resource * __request_resource(struct resource *root, struct resource *new) in __request_resource()
167 struct resource *tmp, **p; in __request_resource()
191 static int __release_resource(struct resource *old, bool release_child) in __release_resource()
193 struct resource *tmp, **p, *chd; in __release_resource()
220 static void __release_child_resources(struct resource *r) in __release_child_resources()
222 struct resource *tmp, *p; in __release_child_resources()
243 void release_child_resources(struct resource *r) in release_child_resources()
257 struct resource *request_resource_conflict(struct resource *root, struct resource *new) in request_resource_conflict()
259 struct resource *conflict; in request_resource_conflict()
274 int request_resource(struct resource *root, struct resource *new) in request_resource()
276 struct resource *conflict; in request_resource()
288 int release_resource(struct resource *old) in release_resource()
319 struct resource *res) in find_next_iomem_res()
321 struct resource *p; in find_next_iomem_res()
353 *res = (struct resource) { in find_next_iomem_res()
369 int (*func)(struct resource *, void *)) in __walk_iomem_res_desc() argument
371 struct resource res; in __walk_iomem_res_desc()
404 u64 end, void *arg, int (*func)(struct resource *, void *)) in walk_iomem_res_desc() argument
418 int (*func)(struct resource *, void *)) in walk_system_ram_res() argument
433 int (*func)(struct resource *, void *)) in walk_system_ram_res_rev() argument
435 struct resource res, *rams; in walk_system_ram_res_rev()
441 rams = kvcalloc(rams_size, sizeof(struct resource), GFP_KERNEL); in walk_system_ram_res_rev()
451 struct resource *rams_new; in walk_system_ram_res_rev()
453 rams_new = kvrealloc(rams, (rams_size + 16) * sizeof(struct resource), in walk_system_ram_res_rev()
483 int (*func)(struct resource *, void *)) in walk_mem_res() argument
501 struct resource res; in walk_system_ram_range()
536 static int __region_intersects(struct resource *parent, resource_size_t start, in __region_intersects()
542 struct resource *p, *dp; in __region_intersects()
544 struct resource res; in __region_intersects()
640 void __weak arch_remove_reservations(struct resource *avail) in arch_remove_reservations()
644 static void resource_clip(struct resource *res, resource_size_t min, in resource_clip()
657 static int __find_resource_space(struct resource *root, struct resource *old, in __find_resource_space()
658 struct resource *new, resource_size_t size, in __find_resource_space()
661 struct resource *this = root->child; in __find_resource_space()
662 struct resource tmp = *new, avail, alloc; in __find_resource_space()
731 int find_resource_space(struct resource *root, struct resource *new, in find_resource_space()
749 static int reallocate_resource(struct resource *root, struct resource *old, in reallocate_resource()
754 struct resource new = *old; in reallocate_resource()
755 struct resource *conflict; in reallocate_resource()
800 int allocate_resource(struct resource *root, struct resource *new, in allocate_resource()
838 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource()
840 struct resource *res; in lookup_resource()
856 static struct resource * __insert_resource(struct resource *parent, struct resource *new) in __insert_resource()
858 struct resource *first, *next; in __insert_resource()
921 struct resource *insert_resource_conflict(struct resource *parent, struct resource *new) in insert_resource_conflict()
923 struct resource *conflict; in insert_resource_conflict()
941 int insert_resource(struct resource *parent, struct resource *new) in insert_resource()
943 struct resource *conflict; in insert_resource()
958 void insert_resource_expand_to_fit(struct resource *root, struct resource *new) in insert_resource_expand_to_fit()
965 struct resource *conflict; in insert_resource_expand_to_fit()
1006 int remove_resource(struct resource *old) in remove_resource()
1017 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource()
1020 struct resource *tmp, *parent = res->parent; in __adjust_resource()
1064 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource()
1077 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split()
1080 struct resource *parent = root; in __reserve_region_with_split()
1081 struct resource *conflict; in __reserve_region_with_split()
1082 struct resource *res = alloc_resource(GFP_ATOMIC); in __reserve_region_with_split()
1083 struct resource *next_res = NULL; in __reserve_region_with_split()
1138 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split()
1172 resource_size_t resource_alignment(struct resource *res) in resource_alignment()
1200 static void revoke_iomem(struct resource *res) in revoke_iomem()
1232 static void revoke_iomem(struct resource *res) {} in revoke_iomem()
1246 static int __request_region_locked(struct resource *res, struct resource *parent, in __request_region_locked()
1257 struct resource *conflict; in __request_region_locked()
1305 struct resource *__request_region(struct resource *parent, in __request_region()
1309 struct resource *res = alloc_resource(GFP_KERNEL); in __request_region()
1339 void __release_region(struct resource *parent, resource_size_t start, in __release_region()
1342 struct resource **p; in __release_region()
1351 struct resource *res = *p; in __release_region()
1400 struct resource *parent = &iomem_resource; in release_mem_region_adjustable()
1401 struct resource *new_res = NULL; in release_mem_region_adjustable()
1403 struct resource **p; in release_mem_region_adjustable()
1404 struct resource *res; in release_mem_region_adjustable()
1490 static bool system_ram_resources_mergeable(struct resource *r1, in system_ram_resources_mergeable()
1491 struct resource *r2) in system_ram_resources_mergeable()
1517 void merge_system_ram_resource(struct resource *res) in merge_system_ram_resource()
1520 struct resource *cur; in merge_system_ram_resource()
1554 struct resource **r = ptr; in devm_resource_release()
1577 int devm_request_resource(struct device *dev, struct resource *root, in devm_request_resource()
1578 struct resource *new) in devm_request_resource()
1580 struct resource *conflict, **ptr; in devm_request_resource()
1603 struct resource **ptr = res; in devm_resource_match()
1615 void devm_release_resource(struct device *dev, struct resource *new) in devm_release_resource()
1623 struct resource *parent;
1643 struct resource *
1644 __devm_request_region(struct device *dev, struct resource *parent, in __devm_request_region()
1648 struct resource *res; in __devm_request_region()
1669 void __devm_release_region(struct device *dev, struct resource *parent, in __devm_release_region()
1687 static struct resource reserve[MAXRESERVE]; in reserve_setup()
1692 struct resource *parent; in reserve_setup()
1699 struct resource *res = reserve + x; in reserve_setup()
1733 struct resource *p; in iomem_map_sanity_check()
1780 bool resource_is_exclusive(struct resource *root, u64 addr, resource_size_t size) in resource_is_exclusive()
1785 struct resource *p; in resource_is_exclusive()
1833 struct resource_entry *resource_list_create_entry(struct resource *res, in resource_list_create_entry()
1866 static resource_size_t gfr_start(struct resource *base, resource_size_t size, in gfr_start()
1879 static bool gfr_continue(struct resource *base, resource_size_t addr, in gfr_continue()
1902 struct resource *res = _res; in remove_free_mem_region()
1909 static struct resource *
1910 get_free_mem_region(struct device *dev, struct resource *base, in get_free_mem_region()
1916 struct resource *res; in get_free_mem_region()
2007 struct resource *devm_request_free_mem_region(struct device *dev, in devm_request_free_mem_region()
2008 struct resource *base, unsigned long size) in devm_request_free_mem_region()
2018 struct resource *request_free_mem_region(struct resource *base, in request_free_mem_region()
2040 struct resource *alloc_free_mem_region(struct resource *base, in alloc_free_mem_region()