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; in __region_intersects() local
503 for (p = parent->child; p ; p = p->sibling) { in __region_intersects()
504 bool is_type = (((p->flags & flags) == flags) && in __region_intersects()
506 (desc == p->desc))); in __region_intersects()
508 if (resource_overlaps(p, &res)) in __region_intersects()
1254 struct resource **p; in __release_region() local
1257 p = &parent->child; in __release_region()
1263 struct resource *res = *p; in __release_region()
1269 p = &res->child; in __release_region()
1274 *p = res->sibling; in __release_region()
1281 p = &res->sibling; in __release_region()
1317 struct resource **p; in release_mem_region_adjustable() local
1335 p = &parent->child; in release_mem_region_adjustable()
1338 while ((res = *p)) { in release_mem_region_adjustable()
1344 p = &res->sibling; in release_mem_region_adjustable()
1352 p = &res->child; in release_mem_region_adjustable()
1359 *p = res->sibling; in release_mem_region_adjustable()
1646 struct resource *p = &iomem_resource; in iomem_map_sanity_check() local
1651 for (p = p->child; p ; p = r_next(NULL, p, &l)) { in iomem_map_sanity_check()
1656 if (p->start >= addr + size) in iomem_map_sanity_check()
1658 if (p->end < addr) in iomem_map_sanity_check()
1660 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1661 PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1)) in iomem_map_sanity_check()
1669 if (p->flags & IORESOURCE_BUSY) in iomem_map_sanity_check()
1675 p->name, p); in iomem_map_sanity_check()
1702 struct resource *p; in iomem_is_exclusive() local
1707 for_each_resource(&iomem_resource, p, skip_children) { in iomem_is_exclusive()
1708 if (p->start >= addr + size) in iomem_is_exclusive()
1710 if (p->end < addr) { in iomem_is_exclusive()
1723 if ((p->flags & exclusive_system_ram) == exclusive_system_ram) { in iomem_is_exclusive()
1733 if (!strict_iomem_checks || !(p->flags & IORESOURCE_BUSY)) in iomem_is_exclusive()
1736 || p->flags & IORESOURCE_EXCLUSIVE) { in iomem_is_exclusive()