• Home
  • Raw
  • Download

Lines Matching refs:range

368 static int add_bus_range(int type, struct range_node *range, struct bus_node *bus_cur)  in add_bus_range()  argument
392 if (range->start < range_cur->start) in add_bus_range()
402 bus_cur->rangeMem = range; in add_bus_range()
405 bus_cur->rangePFMem = range; in add_bus_range()
408 bus_cur->rangeIO = range; in add_bus_range()
411 range->next = range_cur; in add_bus_range()
412 range->rangeno = 1; in add_bus_range()
416 range->next = NULL; in add_bus_range()
417 range_prev->next = range; in add_bus_range()
418 range->rangeno = range_prev->rangeno + 1; in add_bus_range()
422 range_prev->next = range; in add_bus_range()
423 range->next = range_cur; in add_bus_range()
424 range->rangeno = range_cur->rangeno; in add_bus_range()
487 static void fix_me(struct resource_node *res, struct bus_node *bus_cur, struct range_node *range) in fix_me() argument
504 while (range) { in fix_me()
505 if ((res->start >= range->start) && (res->end <= range->end)) { in fix_me()
506 res->rangeno = range->rangeno; in fix_me()
521 range = range->next; in fix_me()
544 struct range_node *range; in fix_resources() local
551 range = bus_cur->rangeIO; in fix_resources()
552 fix_me(res, bus_cur, range); in fix_resources()
556 range = bus_cur->rangeMem; in fix_resources()
557 fix_me(res, bus_cur, range); in fix_resources()
561 range = bus_cur->rangePFMem; in fix_resources()
562 fix_me(res, bus_cur, range); in fix_resources()
919 struct range_node *range = NULL; in find_range() local
923 range = bus_cur->rangeIO; in find_range()
926 range = bus_cur->rangeMem; in find_range()
929 range = bus_cur->rangePFMem; in find_range()
935 while (range) { in find_range()
936 if (res->rangeno == range->rangeno) in find_range()
938 range = range->next; in find_range()
940 return range; in find_range()
955 struct range_node *range = NULL; in ibmphp_check_resource() local
1011 range = find_range(bus_cur, res_cur); in ibmphp_check_resource()
1014 if (!range) { in ibmphp_check_resource()
1022 len_tmp = res_cur->start - 1 - range->start; in ibmphp_check_resource()
1024 if ((res_cur->start != range->start) && (len_tmp >= res->len)) { in ibmphp_check_resource()
1029 if ((range->start % tmp_divide) == 0) { in ibmphp_check_resource()
1033 start_cur = range->start; in ibmphp_check_resource()
1036 tmp_start = range->start; in ibmphp_check_resource()
1064 len_tmp = range->end - (res_cur->end + 1); in ibmphp_check_resource()
1066 if ((range->end != res_cur->end) && (len_tmp >= res->len)) { in ibmphp_check_resource()
1080 while ((len_tmp = range->end - tmp_start) >= res->len) { in ibmphp_check_resource()
1088 if (tmp_start >= range->end) in ibmphp_check_resource()
1105 len_tmp = res_cur->start - 1 - range->start; in ibmphp_check_resource()
1107 if ((res_cur->start != range->start) && (len_tmp >= res->len)) { in ibmphp_check_resource()
1109 if ((range->start % tmp_divide) == 0) { in ibmphp_check_resource()
1113 start_cur = range->start; in ibmphp_check_resource()
1116 tmp_start = range->start; in ibmphp_check_resource()
1193 range = bus_cur->rangeIO; in ibmphp_check_resource()
1196 range = bus_cur->rangeMem; in ibmphp_check_resource()
1199 range = bus_cur->rangePFMem; in ibmphp_check_resource()
1202 while (range) { in ibmphp_check_resource()
1203 len_tmp = range->end - range->start; in ibmphp_check_resource()
1207 if ((range->start % tmp_divide) == 0) { in ibmphp_check_resource()
1211 start_cur = range->start; in ibmphp_check_resource()
1214 tmp_start = range->start; in ibmphp_check_resource()
1217 while ((len_tmp = range->end - tmp_start) >= res->len) { in ibmphp_check_resource()
1225 if (tmp_start >= range->end) in ibmphp_check_resource()
1238 range = range->next; in ibmphp_check_resource()
1241 if ((!range) && (len_cur == 0)) { in ibmphp_check_resource()
1259 range = bus_cur->rangeIO; in ibmphp_check_resource()
1262 range = bus_cur->rangeMem; in ibmphp_check_resource()
1265 range = bus_cur->rangePFMem; in ibmphp_check_resource()
1268 while (range) { in ibmphp_check_resource()
1269 len_tmp = range->end - range->start; in ibmphp_check_resource()
1273 if ((range->start % tmp_divide) == 0) { in ibmphp_check_resource()
1277 start_cur = range->start; in ibmphp_check_resource()
1280 tmp_start = range->start; in ibmphp_check_resource()
1283 while ((len_tmp = range->end - tmp_start) >= res->len) { in ibmphp_check_resource()
1291 if (tmp_start >= range->end) in ibmphp_check_resource()
1304 range = range->next; in ibmphp_check_resource()
1307 if ((!range) && (len_cur == 0)) { in ibmphp_check_resource()
1757 struct range_node *range; in ibmphp_print_test() local
1774 range = bus_cur->rangeIO; in ibmphp_print_test()
1776 debug_pci("rangeno is %d\n", range->rangeno); in ibmphp_print_test()
1777 debug_pci("[%x - %x]\n", range->start, range->end); in ibmphp_print_test()
1778 range = range->next; in ibmphp_print_test()
1784 range = bus_cur->rangeMem; in ibmphp_print_test()
1786 debug_pci("rangeno is %d\n", range->rangeno); in ibmphp_print_test()
1787 debug_pci("[%x - %x]\n", range->start, range->end); in ibmphp_print_test()
1788 range = range->next; in ibmphp_print_test()
1795 range = bus_cur->rangePFMem; in ibmphp_print_test()
1797 debug_pci("rangeno is %d\n", range->rangeno); in ibmphp_print_test()
1798 debug_pci("[%x - %x]\n", range->start, range->end); in ibmphp_print_test()
1799 range = range->next; in ibmphp_print_test()
1865 static int range_exists_already(struct range_node *range, struct bus_node *bus_cur, u8 type) in range_exists_already() argument
1884 if ((range_cur->start == range->start) && (range_cur->end == range->end)) in range_exists_already()
1916 struct range_node *range; in update_bridge_ranges() local
1972 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); in update_bridge_ranges()
1973 if (!range) in update_bridge_ranges()
1976 range->start = start_address; in update_bridge_ranges()
1977 range->end = end_address + 0xfff; in update_bridge_ranges()
1980 if (!range_exists_already(range, bus_sec, IO)) { in update_bridge_ranges()
1981 add_bus_range(IO, range, bus_sec); in update_bridge_ranges()
1984 kfree(range); in update_bridge_ranges()
1985 range = NULL; in update_bridge_ranges()
1989 range->rangeno = 1; in update_bridge_ranges()
1990 bus_sec->rangeIO = range; in update_bridge_ranges()
1998 kfree(range); in update_bridge_ranges()
2019 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); in update_bridge_ranges()
2020 if (!range) in update_bridge_ranges()
2023 range->start = start_address; in update_bridge_ranges()
2024 range->end = end_address + 0xfffff; in update_bridge_ranges()
2027 if (!range_exists_already(range, bus_sec, MEM)) { in update_bridge_ranges()
2028 add_bus_range(MEM, range, bus_sec); in update_bridge_ranges()
2031 kfree(range); in update_bridge_ranges()
2032 range = NULL; in update_bridge_ranges()
2036 range->rangeno = 1; in update_bridge_ranges()
2037 bus_sec->rangeMem = range; in update_bridge_ranges()
2046 kfree(range); in update_bridge_ranges()
2071 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); in update_bridge_ranges()
2072 if (!range) in update_bridge_ranges()
2075 range->start = start_address; in update_bridge_ranges()
2076 range->end = end_address + 0xfffff; in update_bridge_ranges()
2079 if (!range_exists_already(range, bus_sec, PFMEM)) { in update_bridge_ranges()
2080 add_bus_range(PFMEM, range, bus_sec); in update_bridge_ranges()
2083 kfree(range); in update_bridge_ranges()
2084 range = NULL; in update_bridge_ranges()
2088 range->rangeno = 1; in update_bridge_ranges()
2089 bus_sec->rangePFMem = range; in update_bridge_ranges()
2097 kfree(range); in update_bridge_ranges()