Lines Matching refs:hem_cfg
113 mr->npages = mr->pbl_mtr.hem_cfg.buf_pg_count; in alloc_mr_pbl()
409 if (likely(mr->npages < mr->pbl_mtr.hem_cfg.buf_pg_count)) { in hns_roce_set_page()
427 mr->page_list = kvcalloc(mr->pbl_mtr.hem_cfg.buf_pg_count, in hns_roce_map_mr_sg()
435 mr->npages, mr->pbl_mtr.hem_cfg.buf_pg_count, ret); in hns_roce_map_mr_sg()
439 mtr->hem_cfg.region[0].offset = 0; in hns_roce_map_mr_sg()
440 mtr->hem_cfg.region[0].count = mr->npages; in hns_roce_map_mr_sg()
441 mtr->hem_cfg.region[0].hopnum = mr->pbl_hop_num; in hns_roce_map_mr_sg()
442 mtr->hem_cfg.region_count = 1; in hns_roce_map_mr_sg()
448 mr->pbl_mtr.hem_cfg.buf_pg_shift = (u32)ilog2(ibmr->page_size); in hns_roce_map_mr_sg()
686 mtr->hem_cfg.is_direct ? in mtr_alloc_bufs()
725 if (mtr->hem_cfg.is_direct && npage > 1) { in mtr_map_bufs()
757 if (mtr->hem_cfg.is_direct) { in hns_roce_mtr_map()
758 mtr->hem_cfg.root_ba = pages[0]; in hns_roce_mtr_map()
762 for (i = 0, mapped_cnt = 0; i < mtr->hem_cfg.region_count && in hns_roce_mtr_map()
764 r = &mtr->hem_cfg.region[i]; in hns_roce_mtr_map()
803 struct hns_roce_hem_cfg *cfg = &mtr->hem_cfg; in hns_roce_mtr_find()
935 for (i = 0; i < mtr->hem_cfg.region_count; i++) { in cal_best_bt_pg_sz()
936 re = &mtr->hem_cfg.region[i]; in cal_best_bt_pg_sz()
954 struct hns_roce_hem_cfg *cfg = &mtr->hem_cfg; in mtr_alloc_mtt()
1002 buf_page_cnt = mtr_init_buf_cfg(hr_dev, buf_attr, &mtr->hem_cfg, in hns_roce_mtr_create()