Lines Matching defs:hmc_info
11 * @hmc_info: pointer to the HMC configuration information structure
22 static void irdma_find_sd_index_limit(struct irdma_hmc_info *hmc_info, u32 type,
28 fpm_addr = hmc_info->hmc_obj[(type)].base +
29 hmc_info->hmc_obj[type].size * idx;
30 fpm_limit = fpm_addr + hmc_info->hmc_obj[type].size * cnt;
38 * @hmc_info: pointer to the HMC configuration information struct
49 static void irdma_find_pd_index_limit(struct irdma_hmc_info *hmc_info, u32 type,
55 fpm_adr = hmc_info->hmc_obj[type].base +
56 hmc_info->hmc_obj[type].size * idx;
57 fpm_limit = fpm_adr + (hmc_info)->hmc_obj[(type)].size * (cnt);
140 * @hmc_info: pointer to the HMC configuration information struct
146 struct irdma_hmc_info *hmc_info, u32 sd_index,
155 sdinfo.hmc_fn_id = hmc_info->hmc_fn_id;
157 sd_entry = &hmc_info->sd_table.sd_entry[i];
198 if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt)
202 info->hmc_info->hmc_obj[info->rsrc_type].cnt)
207 return irdma_hmc_sd_grp(dev, info->hmc_info,
208 info->hmc_info->sd_indexes[0], info->add_sd_cnt,
231 if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt)
235 info->hmc_info->hmc_obj[info->rsrc_type].cnt) {
239 info->hmc_info->hmc_obj[info->rsrc_type].cnt);
243 irdma_find_sd_index_limit(info->hmc_info, info->rsrc_type,
246 if (sd_idx >= info->hmc_info->sd_table.sd_cnt ||
247 sd_lmt > info->hmc_info->sd_table.sd_cnt) {
251 irdma_find_pd_index_limit(info->hmc_info, info->rsrc_type,
256 ret_code = irdma_add_sd_table_entry(dev->hw, info->hmc_info, j,
262 sd_entry = &info->hmc_info->sd_table.sd_entry[j];
264 (dev->hmc_info == info->hmc_info &&
271 info->hmc_info,
280 irdma_remove_pd_bp(dev, info->hmc_info,
289 info->hmc_info->sd_indexes[info->add_sd_cnt] = (u16)j;
297 sd_entry = &info->hmc_info->sd_table.sd_entry[j - 1];
303 irdma_prep_remove_pd_page(info->hmc_info, i);
306 irdma_prep_remove_pd_page(info->hmc_info, (j - 1));
334 ret_code = irdma_hmc_sd_grp(dev, info->hmc_info,
335 info->hmc_info->sd_indexes[0],
341 sd_idx = info->hmc_info->sd_indexes[i];
342 sd_entry = &info->hmc_info->sd_table.sd_entry[sd_idx];
379 if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt) {
383 info->hmc_info->hmc_obj[info->rsrc_type].cnt);
388 info->hmc_info->hmc_obj[info->rsrc_type].cnt) {
392 info->hmc_info->hmc_obj[info->rsrc_type].cnt);
396 irdma_find_pd_index_limit(info->hmc_info, info->rsrc_type,
403 if (!info->hmc_info->sd_table.sd_entry[sd_idx].valid)
406 if (info->hmc_info->sd_table.sd_entry[sd_idx].entry_type !=
411 pd_table = &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table;
414 ret_code = irdma_remove_pd_bp(dev, info->hmc_info, j);
423 irdma_find_sd_index_limit(info->hmc_info, info->rsrc_type,
426 if (sd_idx >= info->hmc_info->sd_table.sd_cnt ||
427 sd_lmt > info->hmc_info->sd_table.sd_cnt) {
433 pd_table = &info->hmc_info->sd_table.sd_entry[i].u.pd_table;
434 if (!info->hmc_info->sd_table.sd_entry[i].valid)
436 switch (info->hmc_info->sd_table.sd_entry[i].entry_type) {
438 ret_code = irdma_prep_remove_sd_bp(info->hmc_info, i);
440 info->hmc_info->sd_indexes[info->del_sd_cnt] =
446 ret_code = irdma_prep_remove_pd_page(info->hmc_info, i);
449 if (dev->hmc_info != info->hmc_info &&
455 info->hmc_info->sd_indexes[info->del_sd_cnt] = (u16)i;
468 * @hmc_info: pointer to the HMC configuration information struct
474 struct irdma_hmc_info *hmc_info, u32 sd_index,
481 sd_entry = &hmc_info->sd_table.sd_entry[sd_index];
517 hmc_info->sd_table.sd_entry[sd_index].entry_type = type;
518 hmc_info->sd_table.use_cnt++;
529 * @hmc_info: pointer to the HMC configuration information structure
544 struct irdma_hmc_info *hmc_info, u32 pd_index,
555 if (pd_index / IRDMA_HMC_PD_CNT_IN_SD >= hmc_info->sd_table.sd_cnt)
559 if (hmc_info->sd_table.sd_entry[sd_idx].entry_type !=
564 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table;
602 * @hmc_info: pointer to the HMC configuration information structure
615 struct irdma_hmc_info *hmc_info, u32 idx)
626 if (sd_idx >= hmc_info->sd_table.sd_cnt)
629 sd_entry = &hmc_info->sd_table.sd_entry[sd_idx];
633 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table;
662 * @hmc_info: pointer to the HMC configuration information structure
665 int irdma_prep_remove_sd_bp(struct irdma_hmc_info *hmc_info, u32 idx)
669 sd_entry = &hmc_info->sd_table.sd_entry[idx];
673 hmc_info->sd_table.use_cnt--;
681 * @hmc_info: pointer to the HMC configuration information structure
684 int irdma_prep_remove_pd_page(struct irdma_hmc_info *hmc_info, u32 idx)
688 sd_entry = &hmc_info->sd_table.sd_entry[idx];
694 hmc_info->sd_table.use_cnt--;