• Home
  • Raw
  • Download

Lines Matching refs:e_mr

207 	struct ehca_mr *e_mr;  in ehca_reg_phys_mr()  local
249 e_mr = ehca_mr_new(); in ehca_reg_phys_mr()
250 if (!e_mr) { in ehca_reg_phys_mr()
258 e_mr->flags |= EHCA_MR_FLAG_MAXMR; in ehca_reg_phys_mr()
259 ret = ehca_reg_maxmr(shca, e_mr, iova_start, mr_access_flags, in ehca_reg_phys_mr()
260 e_pd, &e_mr->ib.ib_mr.lkey, in ehca_reg_phys_mr()
261 &e_mr->ib.ib_mr.rkey); in ehca_reg_phys_mr()
288 ret = ehca_reg_mr(shca, e_mr, iova_start, size, mr_access_flags, in ehca_reg_phys_mr()
289 e_pd, &pginfo, &e_mr->ib.ib_mr.lkey, in ehca_reg_phys_mr()
290 &e_mr->ib.ib_mr.rkey, EHCA_REG_MR); in ehca_reg_phys_mr()
298 return &e_mr->ib.ib_mr; in ehca_reg_phys_mr()
301 ehca_mr_delete(e_mr); in ehca_reg_phys_mr()
318 struct ehca_mr *e_mr; in ehca_reg_user_mr() local
354 e_mr = ehca_mr_new(); in ehca_reg_user_mr()
355 if (!e_mr) { in ehca_reg_user_mr()
361 e_mr->umem = ib_umem_get(pd->uobject->context, start, length, in ehca_reg_user_mr()
363 if (IS_ERR(e_mr->umem)) { in ehca_reg_user_mr()
364 ib_mr = (void *)e_mr->umem; in ehca_reg_user_mr()
368 if (e_mr->umem->page_size != PAGE_SIZE) { in ehca_reg_user_mr()
370 "e_mr->umem->page_size=%x", e_mr->umem->page_size); in ehca_reg_user_mr()
379 if (e_mr->umem->hugetlb) { in ehca_reg_user_mr()
401 pginfo.u.usr.region = e_mr->umem; in ehca_reg_user_mr()
402 pginfo.next_hwpage = e_mr->umem->offset / hwpage_size; in ehca_reg_user_mr()
404 (&e_mr->umem->chunk_list), in ehca_reg_user_mr()
407 ret = ehca_reg_mr(shca, e_mr, (u64 *)virt, length, mr_access_flags, in ehca_reg_user_mr()
408 e_pd, &pginfo, &e_mr->ib.ib_mr.lkey, in ehca_reg_user_mr()
409 &e_mr->ib.ib_mr.rkey, EHCA_REG_MR); in ehca_reg_user_mr()
428 return &e_mr->ib.ib_mr; in ehca_reg_user_mr()
431 ib_umem_release(e_mr->umem); in ehca_reg_user_mr()
433 ehca_mr_delete(e_mr); in ehca_reg_user_mr()
455 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); in ehca_rereg_phys_mr() local
491 if (e_mr == shca->maxmr) { in ehca_rereg_phys_mr()
500 if (e_mr->flags & EHCA_MR_FLAG_FMR) { in ehca_rereg_phys_mr()
502 "flags=%x", mr, e_mr->flags); in ehca_rereg_phys_mr()
530 spin_lock_irqsave(&e_mr->mrlock, sl_flags); in ehca_rereg_phys_mr()
531 new_start = e_mr->start; in ehca_rereg_phys_mr()
532 new_size = e_mr->size; in ehca_rereg_phys_mr()
533 new_acl = e_mr->acl; in ehca_rereg_phys_mr()
572 ret = ehca_rereg_mr(shca, e_mr, new_start, new_size, new_acl, in ehca_rereg_phys_mr()
584 spin_unlock_irqrestore(&e_mr->mrlock, sl_flags); in ehca_rereg_phys_mr()
603 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); in ehca_query_mr() local
607 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) { in ehca_query_mr()
609 "e_mr->flags=%x", mr, e_mr, e_mr->flags); in ehca_query_mr()
615 spin_lock_irqsave(&e_mr->mrlock, sl_flags); in ehca_query_mr()
617 h_ret = hipz_h_query_mr(shca->ipz_hca_handle, e_mr, &hipzout); in ehca_query_mr()
622 e_mr->ipz_mr_handle.handle, mr->lkey); in ehca_query_mr()
634 spin_unlock_irqrestore(&e_mr->mrlock, sl_flags); in ehca_query_mr()
650 struct ehca_mr *e_mr = container_of(mr, struct ehca_mr, ib.ib_mr); in ehca_dereg_mr() local
652 if ((e_mr->flags & EHCA_MR_FLAG_FMR)) { in ehca_dereg_mr()
654 "e_mr->flags=%x", mr, e_mr, e_mr->flags); in ehca_dereg_mr()
657 } else if (e_mr == shca->maxmr) { in ehca_dereg_mr()
667 h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); in ehca_dereg_mr()
671 h_ret, shca, e_mr, shca->ipz_hca_handle.handle, in ehca_dereg_mr()
672 e_mr->ipz_mr_handle.handle, mr->lkey); in ehca_dereg_mr()
677 if (e_mr->umem) in ehca_dereg_mr()
678 ib_umem_release(e_mr->umem); in ehca_dereg_mr()
681 ehca_mr_delete(e_mr); in ehca_dereg_mr()
1018 struct ehca_mr *e_mr,
1022 struct ehca_mr *e_mr, in ehca_reg_mr() argument
1042 h_ret = hipz_h_alloc_resource_mr(shca->ipz_hca_handle, e_mr, in ehca_reg_mr()
1052 e_mr->ipz_mr_handle = hipzout.handle; in ehca_reg_mr()
1055 ret = ehca_reg_bmap_mr_rpages(shca, e_mr, pginfo); in ehca_reg_mr()
1057 ret = ehca_reg_mr_rpages(shca, e_mr, pginfo); in ehca_reg_mr()
1065 e_mr->num_kpages = pginfo->num_kpages; in ehca_reg_mr()
1066 e_mr->num_hwpages = pginfo->num_hwpages; in ehca_reg_mr()
1067 e_mr->hwpage_size = pginfo->hwpage_size; in ehca_reg_mr()
1068 e_mr->start = iova_start; in ehca_reg_mr()
1069 e_mr->size = size; in ehca_reg_mr()
1070 e_mr->acl = acl; in ehca_reg_mr()
1076 h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); in ehca_reg_mr()
1081 h_ret, shca, e_mr, iova_start, size, acl, e_pd, in ehca_reg_mr()
1092 ret, shca, e_mr, iova_start, size, acl, e_pd, pginfo, in ehca_reg_mr()
1100 struct ehca_mr *e_mr, in ehca_reg_mr_rpages() argument
1150 shca->ipz_hca_handle, e_mr, in ehca_reg_mr_rpages()
1163 " lkey=%x", h_ret, e_mr, i, in ehca_reg_mr_rpages()
1165 e_mr->ipz_mr_handle.handle, in ehca_reg_mr_rpages()
1166 e_mr->ib.ib_mr.lkey); in ehca_reg_mr_rpages()
1174 "mr_hndl=%llx", h_ret, e_mr, i, in ehca_reg_mr_rpages()
1175 e_mr->ib.ib_mr.lkey, in ehca_reg_mr_rpages()
1177 e_mr->ipz_mr_handle.handle); in ehca_reg_mr_rpages()
1190 "num_kpages=%llx num_hwpages=%llx", ret, shca, e_mr, in ehca_reg_mr_rpages()
1198 struct ehca_mr *e_mr, in ehca_rereg_mr_rereg1() argument
1230 "kpage=%p", e_mr, pginfo, pginfo->type, in ehca_rereg_mr_rereg1()
1240 h_ret = hipz_h_reregister_pmr(shca->ipz_hca_handle, e_mr, in ehca_rereg_mr_rereg1()
1250 "(Rereg1), h_ret=%lli e_mr=%p", h_ret, e_mr); in ehca_rereg_mr_rereg1()
1257 hipzout.vaddr, e_mr, e_mr->ipz_mr_handle.handle, in ehca_rereg_mr_rereg1()
1258 e_mr->ib.ib_mr.lkey, hipzout.lkey); in ehca_rereg_mr_rereg1()
1265 e_mr->num_kpages = pginfo->num_kpages; in ehca_rereg_mr_rereg1()
1266 e_mr->num_hwpages = pginfo->num_hwpages; in ehca_rereg_mr_rereg1()
1267 e_mr->hwpage_size = pginfo->hwpage_size; in ehca_rereg_mr_rereg1()
1268 e_mr->start = iova_start; in ehca_rereg_mr_rereg1()
1269 e_mr->size = size; in ehca_rereg_mr_rereg1()
1270 e_mr->acl = acl; in ehca_rereg_mr_rereg1()
1289 struct ehca_mr *e_mr, in ehca_rereg_mr() argument
1305 (e_mr->num_hwpages > MAX_RPAGES) || in ehca_rereg_mr()
1306 (pginfo->num_hwpages > e_mr->num_hwpages)) { in ehca_rereg_mr()
1309 pginfo->num_hwpages, e_mr->num_hwpages); in ehca_rereg_mr()
1314 if (e_mr->flags & EHCA_MR_FLAG_MAXMR) { /* check for max-MR */ in ehca_rereg_mr()
1317 e_mr->flags &= ~EHCA_MR_FLAG_MAXMR; in ehca_rereg_mr()
1319 e_mr); in ehca_rereg_mr()
1323 ret = ehca_rereg_mr_rereg1(shca, e_mr, iova_start, size, in ehca_rereg_mr()
1337 h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); in ehca_rereg_mr()
1342 h_ret, e_mr, shca->ipz_hca_handle.handle, in ehca_rereg_mr()
1343 e_mr->ipz_mr_handle.handle, in ehca_rereg_mr()
1344 e_mr->ib.ib_mr.lkey); in ehca_rereg_mr()
1349 save_mr = *e_mr; in ehca_rereg_mr()
1350 ehca_mr_deletenew(e_mr); in ehca_rereg_mr()
1353 e_mr->flags = save_mr.flags; in ehca_rereg_mr()
1354 e_mr->hwpage_size = save_mr.hwpage_size; in ehca_rereg_mr()
1355 e_mr->fmr_page_size = save_mr.fmr_page_size; in ehca_rereg_mr()
1356 e_mr->fmr_max_pages = save_mr.fmr_max_pages; in ehca_rereg_mr()
1357 e_mr->fmr_max_maps = save_mr.fmr_max_maps; in ehca_rereg_mr()
1358 e_mr->fmr_map_cnt = save_mr.fmr_map_cnt; in ehca_rereg_mr()
1360 ret = ehca_reg_mr(shca, e_mr, iova_start, size, acl, in ehca_rereg_mr()
1363 u32 offset = (u64)(&e_mr->flags) - (u64)e_mr; in ehca_rereg_mr()
1364 memcpy(&e_mr->flags, &(save_mr.flags), in ehca_rereg_mr()
1375 "rereg_3_hcall=%x", ret, shca, e_mr, iova_start, size, in ehca_rereg_mr()
1615 struct ehca_mr *e_mr; in ehca_reg_internal_maxmr() local
1629 e_mr = ehca_mr_new(); in ehca_reg_internal_maxmr()
1630 if (!e_mr) { in ehca_reg_internal_maxmr()
1635 e_mr->flags |= EHCA_MR_FLAG_MAXMR; in ehca_reg_internal_maxmr()
1656 ret = ehca_reg_mr(shca, e_mr, iova_start, size_maxmr, 0, e_pd, in ehca_reg_internal_maxmr()
1657 &pginfo, &e_mr->ib.ib_mr.lkey, in ehca_reg_internal_maxmr()
1658 &e_mr->ib.ib_mr.rkey, EHCA_REG_BUSMAP_MR); in ehca_reg_internal_maxmr()
1662 "num_hwpages=%x", e_mr, iova_start, size_maxmr, in ehca_reg_internal_maxmr()
1668 e_mr->ib.ib_mr.device = e_pd->ib_pd.device; in ehca_reg_internal_maxmr()
1669 e_mr->ib.ib_mr.pd = &e_pd->ib_pd; in ehca_reg_internal_maxmr()
1670 e_mr->ib.ib_mr.uobject = NULL; in ehca_reg_internal_maxmr()
1672 atomic_set(&(e_mr->ib.ib_mr.usecnt), 0); in ehca_reg_internal_maxmr()
1673 *e_maxmr = e_mr; in ehca_reg_internal_maxmr()
1677 ehca_mr_delete(e_mr); in ehca_reg_internal_maxmr()
2468 struct ehca_mr *e_mr, in ehca_reg_bmap_mr_rpages() argument
2482 hret = ehca_reg_mr_dir_sections(top, kpage, shca, e_mr, pginfo); in ehca_reg_bmap_mr_rpages()
2494 "hca_hndl=%llx mr_hndl=%llx", hret, e_mr, top, in ehca_reg_bmap_mr_rpages()
2495 e_mr->ib.ib_mr.lkey, in ehca_reg_bmap_mr_rpages()
2497 e_mr->ipz_mr_handle.handle); in ehca_reg_bmap_mr_rpages()