Lines Matching refs:sd_entry
149 struct irdma_hmc_sd_entry *sd_entry; in irdma_hmc_sd_grp() local
157 sd_entry = &hmc_info->sd_table.sd_entry[i]; in irdma_hmc_sd_grp()
158 if (!sd_entry || (!sd_entry->valid && setsd) || in irdma_hmc_sd_grp()
159 (sd_entry->valid && !setsd)) in irdma_hmc_sd_grp()
162 pa = (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED) ? in irdma_hmc_sd_grp()
163 sd_entry->u.pd_table.pd_page_addr.pa : in irdma_hmc_sd_grp()
164 sd_entry->u.bp.addr.pa; in irdma_hmc_sd_grp()
165 irdma_set_sd_entry(pa, i, sd_entry->entry_type, in irdma_hmc_sd_grp()
168 irdma_clr_sd_entry(i, sd_entry->entry_type, in irdma_hmc_sd_grp()
223 struct irdma_hmc_sd_entry *sd_entry; in irdma_sc_create_hmc_obj() local
262 sd_entry = &info->hmc_info->sd_table.sd_entry[j]; in irdma_sc_create_hmc_obj()
263 if (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED && in irdma_sc_create_hmc_obj()
286 if (sd_entry->valid) in irdma_sc_create_hmc_obj()
291 sd_entry->valid = true; in irdma_sc_create_hmc_obj()
297 sd_entry = &info->hmc_info->sd_table.sd_entry[j - 1]; in irdma_sc_create_hmc_obj()
298 switch (sd_entry->entry_type) { in irdma_sc_create_hmc_obj()
328 struct irdma_hmc_sd_entry *sd_entry; in irdma_finish_del_sd_reg() local
342 sd_entry = &info->hmc_info->sd_table.sd_entry[sd_idx]; in irdma_finish_del_sd_reg()
343 mem = (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED) ? in irdma_finish_del_sd_reg()
344 &sd_entry->u.pd_table.pd_page_addr : in irdma_finish_del_sd_reg()
345 &sd_entry->u.bp.addr; in irdma_finish_del_sd_reg()
403 if (!info->hmc_info->sd_table.sd_entry[sd_idx].valid) in irdma_sc_del_hmc_obj()
406 if (info->hmc_info->sd_table.sd_entry[sd_idx].entry_type != in irdma_sc_del_hmc_obj()
411 pd_table = &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_sc_del_hmc_obj()
433 pd_table = &info->hmc_info->sd_table.sd_entry[i].u.pd_table; in irdma_sc_del_hmc_obj()
434 if (!info->hmc_info->sd_table.sd_entry[i].valid) in irdma_sc_del_hmc_obj()
436 switch (info->hmc_info->sd_table.sd_entry[i].entry_type) { in irdma_sc_del_hmc_obj()
477 struct irdma_hmc_sd_entry *sd_entry; in irdma_add_sd_table_entry() local
481 sd_entry = &hmc_info->sd_table.sd_entry[sd_index]; in irdma_add_sd_table_entry()
482 if (!sd_entry->valid) { in irdma_add_sd_table_entry()
496 &sd_entry->u.pd_table.pd_entry_virt_mem; in irdma_add_sd_table_entry()
506 sd_entry->u.pd_table.pd_entry = vmem->va; in irdma_add_sd_table_entry()
508 memcpy(&sd_entry->u.pd_table.pd_page_addr, &dma_mem, in irdma_add_sd_table_entry()
509 sizeof(sd_entry->u.pd_table.pd_page_addr)); in irdma_add_sd_table_entry()
511 memcpy(&sd_entry->u.bp.addr, &dma_mem, in irdma_add_sd_table_entry()
512 sizeof(sd_entry->u.bp.addr)); in irdma_add_sd_table_entry()
514 sd_entry->u.bp.sd_pd_index = sd_index; in irdma_add_sd_table_entry()
517 hmc_info->sd_table.sd_entry[sd_index].entry_type = type; in irdma_add_sd_table_entry()
520 if (sd_entry->entry_type == IRDMA_SD_TYPE_DIRECT) in irdma_add_sd_table_entry()
521 sd_entry->u.bp.use_cnt++; in irdma_add_sd_table_entry()
559 if (hmc_info->sd_table.sd_entry[sd_idx].entry_type != in irdma_add_pd_table_entry()
564 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_add_pd_table_entry()
619 struct irdma_hmc_sd_entry *sd_entry; in irdma_remove_pd_bp() local
629 sd_entry = &hmc_info->sd_table.sd_entry[sd_idx]; in irdma_remove_pd_bp()
630 if (sd_entry->entry_type != IRDMA_SD_TYPE_PAGED) in irdma_remove_pd_bp()
633 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_remove_pd_bp()
667 struct irdma_hmc_sd_entry *sd_entry; in irdma_prep_remove_sd_bp() local
669 sd_entry = &hmc_info->sd_table.sd_entry[idx]; in irdma_prep_remove_sd_bp()
670 if (--sd_entry->u.bp.use_cnt) in irdma_prep_remove_sd_bp()
674 sd_entry->valid = false; in irdma_prep_remove_sd_bp()
686 struct irdma_hmc_sd_entry *sd_entry; in irdma_prep_remove_pd_page() local
688 sd_entry = &hmc_info->sd_table.sd_entry[idx]; in irdma_prep_remove_pd_page()
690 if (sd_entry->u.pd_table.use_cnt) in irdma_prep_remove_pd_page()
693 sd_entry->valid = false; in irdma_prep_remove_pd_page()