Lines Matching refs:p
59 static struct resource *next_resource(struct resource *p) in next_resource() argument
61 if (p->child) in next_resource()
62 return p->child; in next_resource()
63 while (!p->sibling && p->parent) in next_resource()
64 p = p->parent; in next_resource()
65 return p->sibling; in next_resource()
68 static struct resource *next_resource_skip_children(struct resource *p) in next_resource_skip_children() argument
70 while (!p->sibling && p->parent) in next_resource_skip_children()
71 p = p->parent; in next_resource_skip_children()
72 return p->sibling; in next_resource_skip_children()
82 struct resource *p = v; in r_next() local
84 return (void *)next_resource(p); in r_next()
94 struct resource *p = pde_data(file_inode(m->file)); in r_start() local
97 for (p = p->child; p && l < *pos; p = r_next(m, p, &l)) in r_start()
99 return p; in r_start()
111 struct resource *r = v, *p; in r_show() local
116 for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) in r_show()
117 if (p->parent == root) in r_show()
175 struct resource *tmp, **p; in __request_resource() local
183 p = &root->child; in __request_resource()
185 tmp = *p; in __request_resource()
188 *p = new; in __request_resource()
192 p = &tmp->sibling; in __request_resource()
201 struct resource *tmp, **p, *chd; in __release_resource() local
203 p = &old->parent->child; in __release_resource()
205 tmp = *p; in __release_resource()
210 *p = tmp->sibling; in __release_resource()
217 *p = tmp->child; in __release_resource()
223 p = &tmp->sibling; in __release_resource()
230 struct resource *tmp, *p; in __release_child_resources() local
233 p = r->child; in __release_child_resources()
235 while (p) { in __release_child_resources()
236 tmp = p; in __release_child_resources()
237 p = p->sibling; in __release_child_resources()
329 struct resource *p; in find_next_iomem_res() local
339 for (p = iomem_resource.child; p; p = next_resource(p)) { in find_next_iomem_res()
341 if (p->start > end) { in find_next_iomem_res()
342 p = NULL; in find_next_iomem_res()
347 if (p->end < start) in find_next_iomem_res()
350 if ((p->flags & flags) != flags) in find_next_iomem_res()
352 if ((desc != IORES_DESC_NONE) && (desc != p->desc)) in find_next_iomem_res()
359 if (p) { in find_next_iomem_res()
362 .start = max(start, p->start), in find_next_iomem_res()
363 .end = min(end, p->end), in find_next_iomem_res()
364 .flags = p->flags, in find_next_iomem_res()
365 .desc = p->desc, in find_next_iomem_res()
366 .parent = p->parent, in find_next_iomem_res()
371 return p ? 0 : -ENODEV; in find_next_iomem_res()
498 struct resource *p, *dp; in __region_intersects() local
505 for (p = parent->child; p ; p = p->sibling) { in __region_intersects()
506 if (!resource_overlaps(p, &res)) in __region_intersects()
508 is_type = (p->flags & flags) == flags && in __region_intersects()
509 (desc == IORES_DESC_NONE || desc == p->desc); in __region_intersects()
527 ostart = max(res.start, p->start); in __region_intersects()
528 oend = min(res.end, p->end); in __region_intersects()
529 for_each_resource(p, dp, false) { in __region_intersects()
1296 struct resource **p; in __release_region() local
1299 p = &parent->child; in __release_region()
1305 struct resource *res = *p; in __release_region()
1311 p = &res->child; in __release_region()
1316 *p = res->sibling; in __release_region()
1323 p = &res->sibling; in __release_region()
1357 struct resource **p; in release_mem_region_adjustable() local
1375 p = &parent->child; in release_mem_region_adjustable()
1378 while ((res = *p)) { in release_mem_region_adjustable()
1384 p = &res->sibling; in release_mem_region_adjustable()
1392 p = &res->child; in release_mem_region_adjustable()
1399 *p = res->sibling; in release_mem_region_adjustable()
1686 struct resource *p = &iomem_resource; in iomem_map_sanity_check() local
1692 for (p = p->child; p ; p = r_next(NULL, p, &l)) { in iomem_map_sanity_check()
1697 if (p->start > end) in iomem_map_sanity_check()
1699 if (p->end < addr) in iomem_map_sanity_check()
1701 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1702 PFN_DOWN(p->end) >= PFN_DOWN(end)) in iomem_map_sanity_check()
1710 if (p->flags & IORESOURCE_BUSY) in iomem_map_sanity_check()
1714 &addr, &end, p->name, p); in iomem_map_sanity_check()
1740 struct resource *p; in resource_is_exclusive() local
1743 for_each_resource(root, p, skip_children) { in resource_is_exclusive()
1744 if (p->start >= addr + size) in resource_is_exclusive()
1746 if (p->end < addr) { in resource_is_exclusive()
1759 if ((p->flags & exclusive_system_ram) == exclusive_system_ram) { in resource_is_exclusive()
1769 if (!strict_iomem_checks || !(p->flags & IORESOURCE_BUSY)) in resource_is_exclusive()
1772 || p->flags & IORESOURCE_EXCLUSIVE) { in resource_is_exclusive()