Lines Matching refs:res
3 * From setup-res.c, by:
19 void pci_add_resource_offset(struct list_head *resources, struct resource *res,
24 entry = resource_list_create_entry(res, 0);
26 pr_err("PCI: can't add host bridge window %pR\n", res);
35 void pci_add_resource(struct list_head *resources, struct resource *res)
37 pci_add_resource_offset(resources, res, 0);
47 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res,
54 dev_err(&bus->dev, "can't add %pR resource\n", res);
58 bus_res->res = res;
73 return bus_res->res;
97 struct resource *parent, *res;
101 res = win->res;
102 switch (resource_type(res)) {
113 err = devm_request_resource(dev, parent, res);
131 * @res contains CPU addresses. Clip it so the corresponding bus addresses
137 struct resource *res,
142 pcibios_resource_to_bus(bus, &r, res);
149 res->end = res->start - 1;
151 pcibios_bus_to_resource(bus, res, &r);
154 static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res,
177 if ((res->flags ^ r->flags) & type_mask)
183 !(res->flags & IORESOURCE_PREFETCH))
201 ret = allocate_resource(r, res, size, min_used, max,
212 * @res: resource to allocate
224 int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
236 if (res->flags & IORESOURCE_MEM_64) {
237 rc = pci_bus_alloc_from_region(bus, res, size, align, min,
243 return pci_bus_alloc_from_region(bus, res, size, align, min,
249 return pci_bus_alloc_from_region(bus, res, size, align, min,
264 struct resource *res = &dev->resource[idx];
265 struct resource orig_res = *res;
275 if (resource_type(res) != resource_type(r))
278 start = max(r->start, res->start);
279 end = min(r->end, res->end);
284 if (res->start == start && res->end == end)
287 res->start = start;
288 res->end = end;
289 res->flags &= ~IORESOURCE_UNSET;
291 pci_info(dev, "%pR clipped to %pR\n", &orig_res, res);