Lines Matching refs:resp

1181 	struct fc_resource	*resp, *nresp;  in opl_fc_ops_free_handle()  local
1193 for (resp = rp->head; resp != NULL; resp = nresp) { in opl_fc_ops_free_handle()
1194 nresp = resp->next; in opl_fc_ops_free_handle()
1195 switch (resp->type) { in opl_fc_ops_free_handle()
1203 if (resp->fc_map_handle != NULL) in opl_fc_ops_free_handle()
1204 opl_unmap_phys(&resp->fc_map_handle); in opl_fc_ops_free_handle()
1218 resp->fc_contig_virt, resp->fc_contig_len); in opl_fc_ops_free_handle()
1221 (uint64_t)resp->fc_contig_virt, in opl_fc_ops_free_handle()
1222 resp->fc_contig_len, "opl-fcodemem", in opl_fc_ops_free_handle()
1229 "unknown resource type %d", resp->type); in opl_fc_ops_free_handle()
1232 fc_rem_resource(rp, resp); in opl_fc_ops_free_handle()
1233 kmem_free(resp, sizeof (struct fc_resource)); in opl_fc_ops_free_handle()
1276 struct fc_resource *resp; in opl_map_in() local
1317 resp = kmem_zalloc(sizeof (struct fc_resource), KM_SLEEP); in opl_map_in()
1318 resp->type = RT_MAP; in opl_map_in()
1319 resp->fc_map_virt = virt; in opl_map_in()
1320 resp->fc_map_len = len; in opl_map_in()
1321 resp->fc_map_handle = h; in opl_map_in()
1322 fc_add_resource(rp, resp); in opl_map_in()
1335 struct fc_resource *resp; in opl_map_out() local
1351 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_map_out()
1352 if (resp->type != RT_MAP) in opl_map_out()
1354 if (resp->fc_map_virt != virt) in opl_map_out()
1356 if (resp->fc_map_len == len) in opl_map_out()
1361 if (resp == NULL) in opl_map_out()
1365 opl_unmap_phys(&resp->fc_map_handle); in opl_map_out()
1370 fc_rem_resource(rp, resp); in opl_map_out()
1371 kmem_free(resp, sizeof (struct fc_resource)); in opl_map_out()
1389 struct fc_resource *resp; in opl_register_fetch() local
1420 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_register_fetch()
1421 if (resp->type == RT_MAP) { in opl_register_fetch()
1422 if ((virt >= (caddr_t)resp->fc_map_virt) && in opl_register_fetch()
1424 ((caddr_t)resp->fc_map_virt + resp->fc_map_len))) in opl_register_fetch()
1426 } else if (resp->type == RT_CONTIGIOUS) { in opl_register_fetch()
1427 if ((virt >= (caddr_t)resp->fc_contig_virt) && in opl_register_fetch()
1428 ((virt + len) <= ((caddr_t)resp->fc_contig_virt + in opl_register_fetch()
1429 resp->fc_contig_len))) in opl_register_fetch()
1435 if (resp == NULL) { in opl_register_fetch()
1442 if (resp->type == RT_MAP) in opl_register_fetch()
1450 if (resp->type == RT_MAP) in opl_register_fetch()
1458 if (resp->type == RT_MAP) in opl_register_fetch()
1466 if (resp->type == RT_MAP) in opl_register_fetch()
1505 struct fc_resource *resp; in opl_register_store() local
1553 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_register_store()
1554 if (resp->type == RT_MAP) { in opl_register_store()
1555 if ((virt >= (caddr_t)resp->fc_map_virt) && in opl_register_store()
1557 ((caddr_t)resp->fc_map_virt + resp->fc_map_len))) in opl_register_store()
1559 } else if (resp->type == RT_CONTIGIOUS) { in opl_register_store()
1560 if ((virt >= (caddr_t)resp->fc_contig_virt) && in opl_register_store()
1561 ((virt + len) <= ((caddr_t)resp->fc_contig_virt + in opl_register_store()
1562 resp->fc_contig_len))) in opl_register_store()
1568 if (resp == NULL) in opl_register_store()
1574 if (resp->type == RT_MAP) in opl_register_store()
1576 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1580 if (resp->type == RT_MAP) in opl_register_store()
1582 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1586 if (resp->type == RT_MAP) in opl_register_store()
1588 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1592 if (resp->type == RT_MAP) in opl_register_store()
1594 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1620 struct fc_resource *resp; in opl_claim_memory() local
1669 resp = kmem_zalloc(sizeof (struct fc_resource), KM_SLEEP); in opl_claim_memory()
1670 resp->type = RT_CONTIGIOUS; in opl_claim_memory()
1671 resp->fc_contig_virt = (void *)answer; in opl_claim_memory()
1672 resp->fc_contig_len = size; in opl_claim_memory()
1673 fc_add_resource(rp, resp); in opl_claim_memory()
1687 struct fc_resource *resp; in opl_release_memory() local
1705 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_release_memory()
1706 if (resp->type != RT_CONTIGIOUS) in opl_release_memory()
1708 if (resp->fc_contig_virt != (void *)(uintptr_t)vaddr) in opl_release_memory()
1710 if (resp->fc_contig_len == size) in opl_release_memory()
1715 if (resp == NULL) in opl_release_memory()
1725 fc_rem_resource(rp, resp); in opl_release_memory()
1726 kmem_free(resp, sizeof (struct fc_resource)); in opl_release_memory()
1743 struct fc_resource *resp; in opl_vtop() local
1757 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_vtop()
1758 if (resp->type != RT_CONTIGIOUS) in opl_vtop()
1760 if (((uint64_t)resp->fc_contig_virt <= vaddr) && in opl_vtop()
1761 (vaddr < (uint64_t)resp->fc_contig_virt + in opl_vtop()
1762 resp->fc_contig_len)) in opl_vtop()
1767 if (resp == NULL) in opl_vtop()