Lines Matching defs:unit
1099 * @unit: ba entries per bt page
1101 static u64 hem_list_calc_ba_range(int hopnum, int bt_level, int unit)
1111 * 1 0 unit
1113 * 2 0 unit * unit
1114 * 2 1 unit
1116 * 3 0 unit * unit * unit
1117 * 3 1 unit * unit
1118 * 3 2 unit
1123 step = step * unit;
1132 * @unit: ba entries per bt page
1135 int region_cnt, int unit)
1149 step = hem_list_calc_ba_range(r->hopnum, 1, unit);
1161 const struct hns_roce_buf_region *r, int unit,
1206 step = hem_list_calc_ba_range(hopnum, level, unit);
1214 cur = hem_list_alloc_item(hr_dev, start_aligned, end, unit,
1247 alloc_root_hem(struct hns_roce_dev *hr_dev, int unit, int *max_ba_num,
1255 ba_num = hns_roce_hem_list_calc_root_ba(regions, region_cnt, unit);
1259 if (ba_num > unit)
1305 int unit, const struct hns_roce_buf_region *r,
1313 step = hem_list_calc_ba_range(r->hopnum, 1, unit);
1329 int unit, int max_ba_num, struct hns_roce_hem_head *head,
1361 ret = setup_middle_bt(hr_dev, cpu_base, unit, r,
1379 struct hns_roce_hem_list *hem_list, int unit,
1394 root_hem = alloc_root_hem(hr_dev, unit, &max_ba_num, regions,
1407 ret = setup_root_hem(hr_dev, hem_list, unit, max_ba_num, &head, regions,
1433 int unit;
1443 unit = (1 << bt_pg_shift) / BA_BYTE_LEN;
1450 for (ofs = r->offset, loop = 1; ofs < end; ofs += unit, loop++) {
1454 ret = hem_list_alloc_mid_bt(hr_dev, r, unit, ofs,
1465 ret = hem_list_alloc_root_bt(hr_dev, hem_list, unit, regions,