Lines Matching refs:resource
33 struct resource ioport_resource = {
41 struct resource iomem_resource = {
52 resource_size_t (*alignf)(void *, const struct resource *,
64 static struct resource *bootmem_resource_free;
67 static struct resource *next_resource(struct resource *p) in next_resource()
76 static struct resource *next_resource_skip_children(struct resource *p) in next_resource_skip_children()
90 struct resource *p = v; in r_next()
102 struct resource *p = PDE_DATA(file_inode(m->file)); in r_start()
118 struct resource *root = PDE_DATA(file_inode(m->file)); in r_show()
119 struct resource *r = v, *p; in r_show()
161 static void free_resource(struct resource *res) in free_resource()
176 static struct resource *alloc_resource(gfp_t flags) in alloc_resource()
178 struct resource *res = NULL; in alloc_resource()
188 memset(res, 0, sizeof(struct resource)); in alloc_resource()
190 res = kzalloc(sizeof(struct resource), flags); in alloc_resource()
196 static struct resource * __request_resource(struct resource *root, struct resource *new) in __request_resource()
200 struct resource *tmp, **p; in __request_resource()
224 static int __release_resource(struct resource *old, bool release_child) in __release_resource()
226 struct resource *tmp, **p, *chd; in __release_resource()
253 static void __release_child_resources(struct resource *r) in __release_child_resources()
255 struct resource *tmp, *p; in __release_child_resources()
276 void release_child_resources(struct resource *r) in release_child_resources()
290 struct resource *request_resource_conflict(struct resource *root, struct resource *new) in request_resource_conflict()
292 struct resource *conflict; in request_resource_conflict()
307 int request_resource(struct resource *root, struct resource *new) in request_resource()
309 struct resource *conflict; in request_resource()
321 int release_resource(struct resource *old) in release_resource()
352 struct resource *res) in find_next_iomem_res()
354 struct resource *p; in find_next_iomem_res()
386 *res = (struct resource) { in find_next_iomem_res()
402 int (*func)(struct resource *, void *)) in __walk_iomem_res_desc() argument
404 struct resource res; in __walk_iomem_res_desc()
437 u64 end, void *arg, int (*func)(struct resource *, void *)) in walk_iomem_res_desc() argument
451 int (*func)(struct resource *, void *)) in walk_system_ram_res() argument
464 int (*func)(struct resource *, void *)) in walk_mem_res() argument
482 struct resource res; in walk_system_ram_range()
520 struct resource res; in __region_intersects()
522 struct resource *p; in __region_intersects()
578 void __weak arch_remove_reservations(struct resource *avail) in arch_remove_reservations()
583 const struct resource *avail, in simple_align_resource()
590 static void resource_clip(struct resource *res, resource_size_t min, in resource_clip()
603 static int __find_resource(struct resource *root, struct resource *old, in __find_resource()
604 struct resource *new, in __find_resource()
608 struct resource *this = root->child; in __find_resource()
609 struct resource tmp = *new, avail, alloc; in __find_resource()
662 static int find_resource(struct resource *root, struct resource *new, in find_resource()
679 static int reallocate_resource(struct resource *root, struct resource *old, in reallocate_resource()
684 struct resource new = *old; in reallocate_resource()
685 struct resource *conflict; in reallocate_resource()
730 int allocate_resource(struct resource *root, struct resource *new, in allocate_resource()
734 const struct resource *, in allocate_resource() argument
774 struct resource *lookup_resource(struct resource *root, resource_size_t start) in lookup_resource()
776 struct resource *res; in lookup_resource()
792 static struct resource * __insert_resource(struct resource *parent, struct resource *new) in __insert_resource()
794 struct resource *first, *next; in __insert_resource()
857 struct resource *insert_resource_conflict(struct resource *parent, struct resource *new) in insert_resource_conflict()
859 struct resource *conflict; in insert_resource_conflict()
877 int insert_resource(struct resource *parent, struct resource *new) in insert_resource()
879 struct resource *conflict; in insert_resource()
894 void insert_resource_expand_to_fit(struct resource *root, struct resource *new) in insert_resource_expand_to_fit()
901 struct resource *conflict; in insert_resource_expand_to_fit()
935 int remove_resource(struct resource *old) in remove_resource()
946 static int __adjust_resource(struct resource *res, resource_size_t start, in __adjust_resource()
949 struct resource *tmp, *parent = res->parent; in __adjust_resource()
993 int adjust_resource(struct resource *res, resource_size_t start, in adjust_resource()
1006 __reserve_region_with_split(struct resource *root, resource_size_t start, in __reserve_region_with_split()
1009 struct resource *parent = root; in __reserve_region_with_split()
1010 struct resource *conflict; in __reserve_region_with_split()
1011 struct resource *res = alloc_resource(GFP_ATOMIC); in __reserve_region_with_split()
1012 struct resource *next_res = NULL; in __reserve_region_with_split()
1067 reserve_region_with_split(struct resource *root, resource_size_t start, in reserve_region_with_split()
1101 resource_size_t resource_alignment(struct resource *res) in resource_alignment()
1129 static void revoke_iomem(struct resource *res) in revoke_iomem()
1161 static void revoke_iomem(struct resource *res) {} in revoke_iomem()
1175 static int __request_region_locked(struct resource *res, struct resource *parent, in __request_region_locked()
1186 struct resource *conflict; in __request_region_locked()
1234 struct resource *__request_region(struct resource *parent, in __request_region()
1238 struct resource *res = alloc_resource(GFP_KERNEL); in __request_region()
1268 void __release_region(struct resource *parent, resource_size_t start, in __release_region()
1271 struct resource **p; in __release_region()
1280 struct resource *res = *p; in __release_region()
1331 struct resource *parent = &iomem_resource; in release_mem_region_adjustable()
1332 struct resource *new_res = NULL; in release_mem_region_adjustable()
1334 struct resource **p; in release_mem_region_adjustable()
1335 struct resource *res; in release_mem_region_adjustable()
1435 static bool system_ram_resources_mergeable(struct resource *r1, in system_ram_resources_mergeable()
1436 struct resource *r2) in system_ram_resources_mergeable()
1462 void merge_system_ram_resource(struct resource *res) in merge_system_ram_resource()
1465 struct resource *cur; in merge_system_ram_resource()
1499 struct resource **r = ptr; in devm_resource_release()
1522 int devm_request_resource(struct device *dev, struct resource *root, in devm_request_resource()
1523 struct resource *new) in devm_request_resource()
1525 struct resource *conflict, **ptr; in devm_request_resource()
1548 struct resource **ptr = res; in devm_resource_match()
1560 void devm_release_resource(struct device *dev, struct resource *new) in devm_release_resource()
1568 struct resource *parent;
1588 struct resource *
1589 __devm_request_region(struct device *dev, struct resource *parent, in __devm_request_region()
1593 struct resource *res; in __devm_request_region()
1614 void __devm_release_region(struct device *dev, struct resource *parent, in __devm_release_region()
1632 static struct resource reserve[MAXRESERVE]; in reserve_setup()
1637 struct resource *parent; in reserve_setup()
1644 struct resource *res = reserve + x; in reserve_setup()
1677 struct resource *p = &iomem_resource; in iomem_map_sanity_check()
1733 struct resource *p; in iomem_is_exclusive()
1777 struct resource_entry *resource_list_create_entry(struct resource *res, in resource_list_create_entry()
1802 static struct resource *__request_free_mem_region(struct device *dev, in __request_free_mem_region()
1803 struct resource *base, unsigned long size, const char *name) in __request_free_mem_region()
1806 struct resource *res; in __request_free_mem_region()
1872 struct resource *devm_request_free_mem_region(struct device *dev, in devm_request_free_mem_region()
1873 struct resource *base, unsigned long size) in devm_request_free_mem_region()
1879 struct resource *request_free_mem_region(struct resource *base, in request_free_mem_region()