Lines Matching defs:curr
49 static struct bus_node * __init alloc_error_bus (struct ebda_pci_rsrc * curr, u8 busno, int flag)
53 if (!(curr) && !(flag)) {
67 newbus->busno = curr->bus_num;
72 static struct resource_node * __init alloc_resources (struct ebda_pci_rsrc * curr)
76 if (!curr) {
86 rs->busno = curr->bus_num;
87 rs->devfunc = curr->dev_fun;
88 rs->start = curr->start_addr;
89 rs->end = curr->end_addr;
90 rs->len = curr->end_addr - curr->start_addr + 1;
94 static int __init alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus)
106 newbus->busno = curr->bus_num;
129 newrange->start = curr->start_addr;
130 newrange->end = curr->end_addr;
201 struct ebda_pci_rsrc *curr;
214 curr = list_entry (tmp_ebda, struct ebda_pci_rsrc, ebda_pci_rsrc_list);
215 if (!(curr->rsrc_type & PCIDEVMASK)) {
222 if (curr->rsrc_type & PRIMARYBUSMASK) {
224 if ((curr->rsrc_type & RESTYPE) == MMASK) {
227 if ((rc = alloc_bus_range (&newbus, &newrange, curr, MEM, 1)))
232 bus_cur = find_bus_wprev (curr->bus_num, &bus_prev, 1);
235 rc = alloc_bus_range (&bus_cur, &newrange, curr, MEM, 0);
240 if ((rc = alloc_bus_range (&newbus, &newrange, curr, MEM, 1)))
247 } else if ((curr->rsrc_type & RESTYPE) == PFMASK) {
251 if ((rc = alloc_bus_range (&newbus, &newrange, curr, PFMEM, 1)))
256 bus_cur = find_bus_wprev (curr->bus_num, &bus_prev, 1);
259 rc = alloc_bus_range (&bus_cur, &newrange, curr, PFMEM, 0);
264 if ((rc = alloc_bus_range (&newbus, &newrange, curr, PFMEM, 1)))
270 } else if ((curr->rsrc_type & RESTYPE) == IOMASK) {
274 if ((rc = alloc_bus_range (&newbus, &newrange, curr, IO, 1)))
279 bus_cur = find_bus_wprev (curr->bus_num, &bus_prev, 1);
281 rc = alloc_bus_range (&bus_cur, &newrange, curr, IO, 0);
286 if ((rc = alloc_bus_range (&newbus, &newrange, curr, IO, 1)))
299 if ((curr->rsrc_type & RESTYPE) == MMASK) {
301 new_mem = alloc_resources (curr);
313 newbus = alloc_error_bus (curr, 0, 0);
322 } else if ((curr->rsrc_type & RESTYPE) == PFMASK) {
324 new_pfmem = alloc_resources (curr);
330 newbus = alloc_error_bus (curr, 0, 0);
339 } else if ((curr->rsrc_type & RESTYPE) == IOMASK) {
341 new_io = alloc_resources (curr);
354 newbus = alloc_error_bus (curr, 0, 0);