Lines Matching refs:resp

1182 	struct fc_resource	*resp, *nresp;  in opl_fc_ops_free_handle()  local
1194 for (resp = rp->head; resp != NULL; resp = nresp) { in opl_fc_ops_free_handle()
1195 nresp = resp->next; in opl_fc_ops_free_handle()
1196 switch (resp->type) { in opl_fc_ops_free_handle()
1204 if (resp->fc_map_handle != NULL) in opl_fc_ops_free_handle()
1205 opl_unmap_phys(&resp->fc_map_handle); in opl_fc_ops_free_handle()
1219 resp->fc_contig_virt, resp->fc_contig_len); in opl_fc_ops_free_handle()
1222 (uint64_t)resp->fc_contig_virt, in opl_fc_ops_free_handle()
1223 resp->fc_contig_len, "opl-fcodemem", in opl_fc_ops_free_handle()
1230 "unknown resource type %d", resp->type); in opl_fc_ops_free_handle()
1233 fc_rem_resource(rp, resp); in opl_fc_ops_free_handle()
1234 kmem_free(resp, sizeof (struct fc_resource)); in opl_fc_ops_free_handle()
1277 struct fc_resource *resp; in opl_map_in() local
1318 resp = kmem_zalloc(sizeof (struct fc_resource), KM_SLEEP); in opl_map_in()
1319 resp->type = RT_MAP; in opl_map_in()
1320 resp->fc_map_virt = virt; in opl_map_in()
1321 resp->fc_map_len = len; in opl_map_in()
1322 resp->fc_map_handle = h; in opl_map_in()
1323 fc_add_resource(rp, resp); in opl_map_in()
1336 struct fc_resource *resp; in opl_map_out() local
1352 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_map_out()
1353 if (resp->type != RT_MAP) in opl_map_out()
1355 if (resp->fc_map_virt != virt) in opl_map_out()
1357 if (resp->fc_map_len == len) in opl_map_out()
1362 if (resp == NULL) in opl_map_out()
1366 opl_unmap_phys(&resp->fc_map_handle); in opl_map_out()
1371 fc_rem_resource(rp, resp); in opl_map_out()
1372 kmem_free(resp, sizeof (struct fc_resource)); in opl_map_out()
1390 struct fc_resource *resp; in opl_register_fetch() local
1421 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_register_fetch()
1422 if (resp->type == RT_MAP) { in opl_register_fetch()
1423 if ((virt >= (caddr_t)resp->fc_map_virt) && in opl_register_fetch()
1425 ((caddr_t)resp->fc_map_virt + resp->fc_map_len))) in opl_register_fetch()
1427 } else if (resp->type == RT_CONTIGIOUS) { in opl_register_fetch()
1428 if ((virt >= (caddr_t)resp->fc_contig_virt) && in opl_register_fetch()
1429 ((virt + len) <= ((caddr_t)resp->fc_contig_virt + in opl_register_fetch()
1430 resp->fc_contig_len))) in opl_register_fetch()
1436 if (resp == NULL) { in opl_register_fetch()
1443 if (resp->type == RT_MAP) in opl_register_fetch()
1451 if (resp->type == RT_MAP) in opl_register_fetch()
1459 if (resp->type == RT_MAP) in opl_register_fetch()
1467 if (resp->type == RT_MAP) in opl_register_fetch()
1506 struct fc_resource *resp; in opl_register_store() local
1554 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_register_store()
1555 if (resp->type == RT_MAP) { in opl_register_store()
1556 if ((virt >= (caddr_t)resp->fc_map_virt) && in opl_register_store()
1558 ((caddr_t)resp->fc_map_virt + resp->fc_map_len))) in opl_register_store()
1560 } else if (resp->type == RT_CONTIGIOUS) { in opl_register_store()
1561 if ((virt >= (caddr_t)resp->fc_contig_virt) && in opl_register_store()
1562 ((virt + len) <= ((caddr_t)resp->fc_contig_virt + in opl_register_store()
1563 resp->fc_contig_len))) in opl_register_store()
1569 if (resp == NULL) in opl_register_store()
1575 if (resp->type == RT_MAP) in opl_register_store()
1577 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1581 if (resp->type == RT_MAP) in opl_register_store()
1583 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1587 if (resp->type == RT_MAP) in opl_register_store()
1589 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1593 if (resp->type == RT_MAP) in opl_register_store()
1595 else if (resp->type == RT_CONTIGIOUS) in opl_register_store()
1621 struct fc_resource *resp; in opl_claim_memory() local
1670 resp = kmem_zalloc(sizeof (struct fc_resource), KM_SLEEP); in opl_claim_memory()
1671 resp->type = RT_CONTIGIOUS; in opl_claim_memory()
1672 resp->fc_contig_virt = (void *)answer; in opl_claim_memory()
1673 resp->fc_contig_len = size; in opl_claim_memory()
1674 fc_add_resource(rp, resp); in opl_claim_memory()
1688 struct fc_resource *resp; in opl_release_memory() local
1706 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_release_memory()
1707 if (resp->type != RT_CONTIGIOUS) in opl_release_memory()
1709 if (resp->fc_contig_virt != (void *)(uintptr_t)vaddr) in opl_release_memory()
1711 if (resp->fc_contig_len == size) in opl_release_memory()
1716 if (resp == NULL) in opl_release_memory()
1726 fc_rem_resource(rp, resp); in opl_release_memory()
1727 kmem_free(resp, sizeof (struct fc_resource)); in opl_release_memory()
1744 struct fc_resource *resp; in opl_vtop() local
1758 for (resp = rp->head; resp != NULL; resp = resp->next) { in opl_vtop()
1759 if (resp->type != RT_CONTIGIOUS) in opl_vtop()
1761 if (((uint64_t)resp->fc_contig_virt <= vaddr) && in opl_vtop()
1762 (vaddr < (uint64_t)resp->fc_contig_virt + in opl_vtop()
1763 resp->fc_contig_len)) in opl_vtop()
1768 if (resp == NULL) in opl_vtop()