| /freebsd/sys/dev/ofw/ |
| H A D | ofwbus.c | 136 struct resource_list_entry *rle; in ofwbus_alloc_resource() 141 rle = NULL; in ofwbus_alloc_resource() 143 rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), in ofwbus_alloc_resource() 145 if (rle == NULL) { in ofwbus_alloc_resource() 151 start = rle->start; in ofwbus_alloc_resource() 152 count = ummax(count, rle->count); in ofwbus_alloc_resource() 153 end = ummax(rle->end, start + count - 1); in ofwbus_alloc_resource() 162 if (!passthrough && rle != NULL) { in ofwbus_alloc_resource() 163 rle->res = rv; in ofwbus_alloc_resource() 164 rle in ofwbus_alloc_resource() 137 struct resource_list_entry *rle; ofwbus_alloc_resource() local 176 struct resource_list_entry *rle; ofwbus_release_resource() local [all...] |
| /freebsd/sys/dev/pci/ |
| H A D | pci_subr.c | 183 struct resource_list_entry *rle; in pcib_host_res_decodes() local 195 rle = resource_list_find(&hr->hr_rl, type, rid); in pcib_host_res_decodes() 196 rle->flags = RLE_PREFETCH; in pcib_host_res_decodes() 205 struct resource_list_entry *rle; in pcib_host_res_alloc() local 213 rle = resource_list_find(&hr->hr_rl, type, 0); in pcib_host_res_alloc() 214 if (rle == NULL) { in pcib_host_res_alloc() 225 for (; rle != NULL; rle = STAILQ_NEXT(rle, link)) { in pcib_host_res_alloc() 226 if (rle->type != type) in pcib_host_res_alloc() 229 ((rle->flags & RLE_PREFETCH) != 0)) in pcib_host_res_alloc() 231 new_start = ummax(start, rle->start); in pcib_host_res_alloc() [all …]
|
| H A D | pci.c | 1850 struct resource_list_entry *rle; in pci_alloc_msix_method() local 1860 rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, 0); in pci_alloc_msix_method() 1861 if (rle != NULL && rle->res != NULL) in pci_alloc_msix_method() 1877 rle = resource_list_find(&dinfo->resources, SYS_RES_MEMORY, in pci_alloc_msix_method() 1879 if (rle == NULL || rle->res == NULL || in pci_alloc_msix_method() 1880 !(rman_get_flags(rle->res) & RF_ACTIVE)) in pci_alloc_msix_method() 1882 cfg->msix.msix_table_res = rle->res; in pci_alloc_msix_method() 1884 rle in pci_alloc_msix_method() 2035 struct resource_list_entry *rle; pci_remap_msix_method() local 2157 struct resource_list_entry *rle; pci_release_msix() local 2494 struct resource_list_entry *rle; pci_remap_intr_method() local 2664 struct resource_list_entry *rle; pci_alloc_msi_method() local 2785 struct resource_list_entry *rle; pci_release_msi_method() local 5086 struct resource_list_entry *rle; pci_suspend_child() local 5125 struct resource_list_entry *rle; pci_resume_child() local 5352 struct resource_list_entry *rle; pci_teardown_intr() local 6035 struct resource_list_entry *rle; pci_alloc_multi_resource() local 6353 struct resource_list_entry *rle; pci_child_deleted() local 6397 struct resource_list_entry *rle; pci_delete_resource() local [all...] |
| /freebsd/sys/isa/ |
| H A D | isa_common.c | 477 struct resource_list_entry *rle; in isa_claim_resources() local 480 STAILQ_FOREACH(rle, rl, link) { in isa_claim_resources() 481 if (!rle->res) { in isa_claim_resources() 482 rid = rle->rid; in isa_claim_resources() 483 resource_list_alloc(rl, dev, child, rle->type, rid, in isa_claim_resources() 683 struct resource_list_entry *rle; in isa_read_ivar() local 687 rle = resource_list_find(rl, SYS_RES_IOPORT, 0); in isa_read_ivar() 688 if (rle) in isa_read_ivar() 689 *result = rle->start; in isa_read_ivar() 695 rle = resource_list_find(rl, SYS_RES_IOPORT, 1); in isa_read_ivar() [all …]
|
| H A D | isahint.c | 91 struct resource_list_entry *rle; in isa_match_resource_hint() local 93 STAILQ_FOREACH(rle, rl, link) { in isa_match_resource_hint() 94 if (rle->type != type) in isa_match_resource_hint() 96 if (rle->start <= value && rle->end >= value) in isa_match_resource_hint()
|
| /freebsd/sys/dev/quicc/ |
| H A D | quicc_core.c | 100 struct resource_list_entry *rle; in quicc_bfe_attach() local 186 rle = resource_list_find(&qd->qd_rlist, SYS_RES_IRQ, 0); in quicc_bfe_attach() 187 rle->res = sc->sc_ires; in quicc_bfe_attach() 258 struct resource_list_entry *rle; in quicc_bus_alloc_resource() local 268 rle = resource_list_find(&qd->qd_rlist, type, rid); in quicc_bus_alloc_resource() 269 if (rle == NULL) in quicc_bus_alloc_resource() 272 if (rle->res == NULL) { in quicc_bus_alloc_resource() 273 rle->res = rman_reserve_resource(qd->qd_rman, rle->start, in quicc_bus_alloc_resource() 274 rle->start + rle->count - 1, rle->count, flags, child); in quicc_bus_alloc_resource() 275 if (rle->res != NULL) { in quicc_bus_alloc_resource() [all …]
|
| /freebsd/sys/kern/ |
| H A D | subr_bus.c | 2903 struct resource_list_entry *rle; in resource_list_free() local 2905 while ((rle = STAILQ_FIRST(rl)) != NULL) { in resource_list_free() 2906 if (rle->res) in resource_list_free() 2909 free(rle, M_BUS); in resource_list_free() 2958 struct resource_list_entry *rle; in resource_list_add() local 2960 rle = resource_list_find(rl, type, rid); in resource_list_add() 2961 if (!rle) { in resource_list_add() 2962 rle = malloc(sizeof(struct resource_list_entry), M_BUS, in resource_list_add() 2964 STAILQ_INSERT_TAIL(rl, rle, link); in resource_list_add() 2965 rle->type = type; in resource_list_add() [all …]
|
| /freebsd/sys/dev/scc/ |
| H A D | scc_core.c | 99 struct resource_list_entry *rle; in scc_bfe_attach() local 180 rle = resource_list_find(&ch->ch_rlist, sc->sc_rtype, 0); in scc_bfe_attach() 181 rle->res = &ch->ch_rres; in scc_bfe_attach() 184 rman_set_bushandle(rle->res, bh); in scc_bfe_attach() 185 rman_set_bustag(rle->res, rman_get_bustag(sc->sc_rres)); in scc_bfe_attach() 188 rle = resource_list_find(&ch->ch_rlist, SYS_RES_IRQ, 0); in scc_bfe_attach() 189 rle->res = (ch->ch_ires != NULL) ? ch->ch_ires : in scc_bfe_attach() 412 struct resource_list_entry *rle; in scc_bus_alloc_resource() local 425 rle = resource_list_find(&ch->ch_rlist, type, 0); in scc_bus_alloc_resource() 426 if (rle == NULL) in scc_bus_alloc_resource() [all …]
|
| /freebsd/sys/dev/pccbb/ |
| H A D | pccbb.c | 176 struct cbb_reslist *rle; in cbb_remove_res() local 178 SLIST_FOREACH(rle, &sc->rl, link) { in cbb_remove_res() 179 if (rle->res == res) { in cbb_remove_res() 180 SLIST_REMOVE(&sc->rl, rle, cbb_reslist, link); in cbb_remove_res() 181 free(rle, M_DEVBUF); in cbb_remove_res() 190 struct cbb_reslist *rle; in cbb_find_res() local 192 SLIST_FOREACH(rle, &sc->rl, link) in cbb_find_res() 193 if (SYS_RES_MEMORY == rle->type && rid == rle->rid) in cbb_find_res() 194 return (rle->res); in cbb_find_res() 202 struct cbb_reslist *rle; in cbb_insert_res() local [all …]
|
| /freebsd/sys/powerpc/powermac/ |
| H A D | uninorth.c | 487 struct resource_list_entry *rle; in unin_chip_alloc_resource() local 494 rle = resource_list_find(&dinfo->udi_resources, SYS_RES_MEMORY, in unin_chip_alloc_resource() 496 if (rle == NULL) { in unin_chip_alloc_resource() 502 rle->end = rle->end - 1; /* Hack? */ in unin_chip_alloc_resource() 504 if (start < rle->start) in unin_chip_alloc_resource() 505 adjstart = rle->start; in unin_chip_alloc_resource() 506 else if (start > rle->end) in unin_chip_alloc_resource() 507 adjstart = rle->end; in unin_chip_alloc_resource() 511 if (end < rle->start) in unin_chip_alloc_resource() 512 adjend = rle->start; in unin_chip_alloc_resource() [all …]
|
| H A D | macio.c | 530 struct resource_list_entry *rle; in macio_alloc_resource() local 537 rle = resource_list_find(&dinfo->mdi_resources, SYS_RES_MEMORY, in macio_alloc_resource() 539 if (rle == NULL) { in macio_alloc_resource() 545 if (start < rle->start) in macio_alloc_resource() 546 adjstart = rle->start; in macio_alloc_resource() 547 else if (start > rle->end) in macio_alloc_resource() 548 adjstart = rle->end; in macio_alloc_resource() 552 if (end < rle->start) in macio_alloc_resource() 553 adjend = rle->start; in macio_alloc_resource() 554 else if (end > rle->end) in macio_alloc_resource() [all …]
|
| /freebsd/sys/powerpc/ps3/ |
| H A D | ps3bus.c | 556 struct resource_list_entry *rle; in ps3bus_alloc_resource() local 562 rle = resource_list_find(&dinfo->resources, SYS_RES_MEMORY, in ps3bus_alloc_resource() 564 if (rle == NULL) { in ps3bus_alloc_resource() 570 if (start < rle->start) in ps3bus_alloc_resource() 571 adjstart = rle->start; in ps3bus_alloc_resource() 572 else if (start > rle->end) in ps3bus_alloc_resource() 573 adjstart = rle->end; in ps3bus_alloc_resource() 577 if (end < rle->start) in ps3bus_alloc_resource() 578 adjend = rle->start; in ps3bus_alloc_resource() 579 else if (end > rle->end) in ps3bus_alloc_resource() [all …]
|
| /freebsd/sys/dev/vnic/ |
| H A D | mrml_bridge.c | 136 struct resource_list_entry *rle; in mrmlb_ofw_bus_alloc_res() local 146 rle = resource_list_find(&di->di_rl, type, rid); in mrmlb_ofw_bus_alloc_res() 147 if (rle == NULL) in mrmlb_ofw_bus_alloc_res() 150 start = rle->start; in mrmlb_ofw_bus_alloc_res() 151 end = rle->end; in mrmlb_ofw_bus_alloc_res() 152 count = rle->count; in mrmlb_ofw_bus_alloc_res()
|
| /freebsd/sys/arm64/cavium/ |
| H A D | thunder_pcie_fdt.c | 235 struct resource_list_entry *rle; in thunder_pcie_fdt_alloc_resource() local 256 rle = resource_list_find(&di->di_rl, type, rid); in thunder_pcie_fdt_alloc_resource() 257 if (rle == NULL) in thunder_pcie_fdt_alloc_resource() 260 start = rle->start; in thunder_pcie_fdt_alloc_resource() 261 end = rle->end; in thunder_pcie_fdt_alloc_resource() 262 count = rle->count; in thunder_pcie_fdt_alloc_resource()
|
| /freebsd/sys/compat/linuxkpi/common/src/ |
| H A D | linux_pci.c | 652 struct resource_list_entry *rle; in linux_pci_get_rle() local 656 rle = resource_list_find(rl, type, rid); in linux_pci_get_rle() 658 if (rle == NULL && reserve_bar) in linux_pci_get_rle() 659 rle = linux_pci_reserve_bar(pdev, rl, type, rid); in linux_pci_get_rle() 660 return (rle); in linux_pci_get_rle() 667 struct resource_list_entry *rle; in linux_pci_attach_device() local 696 rle = linux_pci_get_rle(pdev, SYS_RES_IRQ, 0, false); in linux_pci_attach_device() 697 if (rle != NULL) in linux_pci_attach_device() 698 pdev->dev.irq = rle->start; in linux_pci_attach_device() 1295 struct resource_list_entry *rle; in pci_resource_start() local [all …]
|
| /freebsd/sys/dev/bhnd/cores/chipc/ |
| H A D | chipc.c | 772 struct resource_list_entry *rle; in chipc_alloc_resource() local 781 rle = NULL; in chipc_alloc_resource() 795 rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), in chipc_alloc_resource() 797 if (rle == NULL) { in chipc_alloc_resource() 805 if (rle->res != NULL) { in chipc_alloc_resource() 810 rman_get_flags(rle->res)); in chipc_alloc_resource() 815 start = rle->start; in chipc_alloc_resource() 816 end = rle->end; in chipc_alloc_resource() 817 count = ulmax(count, rle->count); in chipc_alloc_resource() 861 if (rle != NULL) { in chipc_alloc_resource() [all …]
|
| /freebsd/sys/x86/isa/ |
| H A D | isa.c | 97 struct resource_list_entry *rle; in isa_alloc_resource() local 100 rle = resource_list_find(rl, type, rid); in isa_alloc_resource() 101 if (!rle) { in isa_alloc_resource()
|
| /freebsd/sys/netinet/ |
| H A D | tcp_ratelimit.h | 109 tcp_hw_highest_rate(const struct tcp_hwrate_limit_table *rle) in tcp_hw_highest_rate() argument 111 return (rle->ptbl->rs_rlt[rle->ptbl->rs_highest_valid].rate); in tcp_hw_highest_rate() 167 tcp_hw_highest_rate(const struct tcp_hwrate_limit_table *rle) in tcp_hw_highest_rate() argument
|
| /freebsd/sys/dev/dpaa/ |
| H A D | fman.c | 196 struct resource_list_entry *rle; in fman_release_resource() 211 rle = resource_list_find(rl, rman_get_type(res), in fman_release_resource() 213 KASSERT(rle != NULL, in fman_release_resource() 215 KASSERT(rle->res != NULL, in fman_release_resource() 217 rle->res = NULL; in fman_release_resource() 231 struct resource_list_entry *rle = NULL; in fman_alloc_resource() 245 rle = resource_list_find(rl, type, rid); in fman_alloc_resource() 246 if (rle == NULL) in fman_alloc_resource() 248 KASSERT(rle->res == NULL, in fman_alloc_resource() 251 start = rle in fman_alloc_resource() 194 struct resource_list_entry *rle; fman_release_resource() local 228 struct resource_list_entry *rle = NULL; fman_alloc_resource() local [all...] |
| /freebsd/sys/dev/fdt/ |
| H A D | simplebus.c | 473 struct resource_list_entry *rle; in simplebus_alloc_resource() 486 rle = resource_list_find(&di->rl, type, rid); in simplebus_alloc_resource() 487 if (rle == NULL) { in simplebus_alloc_resource() 493 start = rle->start; in simplebus_alloc_resource() 494 end = rle->end; in simplebus_alloc_resource() 495 count = rle->count; in simplebus_alloc_resource() 602 struct resource_list_entry *rle; in simplebus_alloc_msi() 613 rle = resource_list_find(&ndi->rl, SYS_RES_IRQ, 0); in simplebus_alloc_msi() 614 if (rle != NULL && rle in simplebus_alloc_msi() 468 struct resource_list_entry *rle; simplebus_alloc_resource() local 597 struct resource_list_entry *rle; simplebus_alloc_msi() local [all...] |
| /freebsd/sys/riscv/riscv/ |
| H A D | nexus.c | 233 struct resource_list_entry *rle; in nexus_alloc_resource() local 244 rle = resource_list_find(&ndev->nx_resources, type, rid); in nexus_alloc_resource() 245 if (rle == NULL) in nexus_alloc_resource() 247 start = rle->start; in nexus_alloc_resource() 248 end = rle->end; in nexus_alloc_resource() 249 count = rle->count; in nexus_alloc_resource()
|
| /freebsd/sys/arm/mv/ |
| H A D | mv_pci_ctrl.c | 243 struct resource_list_entry *rle; in mv_pcib_ctrl_alloc_resource() local 254 rle = resource_list_find(&di->di_rl, type, rid); in mv_pcib_ctrl_alloc_resource() 256 if (rle == NULL) in mv_pcib_ctrl_alloc_resource() 259 start = rle->start; in mv_pcib_ctrl_alloc_resource() 260 end = rle->end; in mv_pcib_ctrl_alloc_resource() 261 count = rle->count; in mv_pcib_ctrl_alloc_resource()
|
| /freebsd/sys/dev/acpica/ |
| H A D | acpi.c | 1290 struct resource_list_entry *rle; in acpi_match_resource_hint() local 1292 STAILQ_FOREACH(rle, rl, link) { in acpi_match_resource_hint() 1293 if (rle->type != type) in acpi_match_resource_hint() 1295 if (rle->start <= value && rle->end >= value) in acpi_match_resource_hint() 1506 struct resource_list_entry *rle; in acpi_sysres_alloc() local 1523 STAILQ_FOREACH(rle, &sc->sysres_rl, link) { in acpi_sysres_alloc() 1524 if (rle->res != NULL) { in acpi_sysres_alloc() 1525 device_printf(dev, "duplicate resource for %jx\n", rle->start); in acpi_sysres_alloc() 1530 rm = acpi_get_rman(dev, rle in acpi_sysres_alloc() 1564 struct resource_list_entry *rle; acpi_reserve_resources() local 1650 struct resource_list_entry *rle; acpi_alloc_resource() local 1734 struct resource_list_entry *rle; acpi_managed_resource() local [all...] |
| /freebsd/sys/dev/bhnd/ |
| H A D | bhnd.c | 367 struct resource_list_entry *rle; in bhnd_generic_alloc_pmu() local 413 if ((rle = resource_list_find(rl, SYS_RES_MEMORY, 0)) == NULL) { in bhnd_generic_alloc_pmu() 419 if (rle->res == NULL) { in bhnd_generic_alloc_pmu() 425 if (r_addr+pmu_regs < rman_get_start(rle->res) || in bhnd_generic_alloc_pmu() 426 r_addr+pmu_regs >= rman_get_end(rle->res)) in bhnd_generic_alloc_pmu() 440 if (rman_get_start(rle->res) > r_addr) in bhnd_generic_alloc_pmu() 441 pmu_regs -= rman_get_start(rle->res) - r_addr; in bhnd_generic_alloc_pmu() 443 pmu_regs -= r_addr - rman_get_start(rle->res); in bhnd_generic_alloc_pmu() 464 r->res = rle->res; in bhnd_generic_alloc_pmu() 465 r->direct = ((rman_get_flags(rle->res) & RF_ACTIVE) != 0); in bhnd_generic_alloc_pmu()
|
| /freebsd/sys/dev/bhnd/bhndb/ |
| H A D | bhndb.c | 943 struct resource_list_entry *rle; in bhndb_alloc_resource() local 952 rle = NULL; in bhndb_alloc_resource() 966 rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), in bhndb_alloc_resource() 968 if (rle == NULL) { in bhndb_alloc_resource() 977 if (rle->res != NULL) { in bhndb_alloc_resource() 985 start = rle->start; in bhndb_alloc_resource() 986 end = rle->end; in bhndb_alloc_resource() 987 count = ulmax(count, rle->count); in bhndb_alloc_resource() 1019 if (rle != NULL) { in bhndb_alloc_resource() 1020 rle->res = rv; in bhndb_alloc_resource() [all …]
|