Lines Matching refs:sd_entry
153 struct irdma_hmc_sd_entry *sd_entry; in irdma_hmc_sd_grp() local
161 sd_entry = &hmc_info->sd_table.sd_entry[i]; in irdma_hmc_sd_grp()
162 if (!sd_entry || (!sd_entry->valid && setsd) || in irdma_hmc_sd_grp()
163 (sd_entry->valid && !setsd)) in irdma_hmc_sd_grp()
166 pa = (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED) ? in irdma_hmc_sd_grp()
167 sd_entry->u.pd_table.pd_page_addr.pa : in irdma_hmc_sd_grp()
168 sd_entry->u.bp.addr.pa; in irdma_hmc_sd_grp()
169 irdma_set_sd_entry(pa, i, sd_entry->entry_type, in irdma_hmc_sd_grp()
172 irdma_clr_sd_entry(i, sd_entry->entry_type, in irdma_hmc_sd_grp()
229 struct irdma_hmc_sd_entry *sd_entry; in irdma_sc_create_hmc_obj() local
268 sd_entry = &info->hmc_info->sd_table.sd_entry[j]; in irdma_sc_create_hmc_obj()
269 if (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED && in irdma_sc_create_hmc_obj()
292 if (sd_entry->valid) in irdma_sc_create_hmc_obj()
297 sd_entry->valid = true; in irdma_sc_create_hmc_obj()
303 sd_entry = &info->hmc_info->sd_table.sd_entry[j - 1]; in irdma_sc_create_hmc_obj()
304 switch (sd_entry->entry_type) { in irdma_sc_create_hmc_obj()
334 struct irdma_hmc_sd_entry *sd_entry; in irdma_finish_del_sd_reg() local
348 sd_entry = &info->hmc_info->sd_table.sd_entry[sd_idx]; in irdma_finish_del_sd_reg()
349 mem = (sd_entry->entry_type == IRDMA_SD_TYPE_PAGED) ? in irdma_finish_del_sd_reg()
350 &sd_entry->u.pd_table.pd_page_addr : in irdma_finish_del_sd_reg()
351 &sd_entry->u.bp.addr; in irdma_finish_del_sd_reg()
410 if (!info->hmc_info->sd_table.sd_entry[sd_idx].valid) in irdma_sc_del_hmc_obj()
413 if (info->hmc_info->sd_table.sd_entry[sd_idx].entry_type != in irdma_sc_del_hmc_obj()
418 pd_table = &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_sc_del_hmc_obj()
440 pd_table = &info->hmc_info->sd_table.sd_entry[i].u.pd_table; in irdma_sc_del_hmc_obj()
441 if (!info->hmc_info->sd_table.sd_entry[i].valid) in irdma_sc_del_hmc_obj()
443 switch (info->hmc_info->sd_table.sd_entry[i].entry_type) { in irdma_sc_del_hmc_obj()
486 struct irdma_hmc_sd_entry *sd_entry; in irdma_add_sd_table_entry() local
490 sd_entry = &hmc_info->sd_table.sd_entry[sd_index]; in irdma_add_sd_table_entry()
491 if (!sd_entry->valid) { in irdma_add_sd_table_entry()
505 &sd_entry->u.pd_table.pd_entry_virt_mem; in irdma_add_sd_table_entry()
515 sd_entry->u.pd_table.pd_entry = vmem->va; in irdma_add_sd_table_entry()
517 memcpy(&sd_entry->u.pd_table.pd_page_addr, &dma_mem, in irdma_add_sd_table_entry()
518 sizeof(sd_entry->u.pd_table.pd_page_addr)); in irdma_add_sd_table_entry()
520 memcpy(&sd_entry->u.bp.addr, &dma_mem, in irdma_add_sd_table_entry()
521 sizeof(sd_entry->u.bp.addr)); in irdma_add_sd_table_entry()
523 sd_entry->u.bp.sd_pd_index = sd_index; in irdma_add_sd_table_entry()
526 hmc_info->sd_table.sd_entry[sd_index].entry_type = type; in irdma_add_sd_table_entry()
529 if (sd_entry->entry_type == IRDMA_SD_TYPE_DIRECT) in irdma_add_sd_table_entry()
530 sd_entry->u.bp.use_cnt++; in irdma_add_sd_table_entry()
569 if (hmc_info->sd_table.sd_entry[sd_idx].entry_type != in irdma_add_pd_table_entry()
574 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_add_pd_table_entry()
630 struct irdma_hmc_sd_entry *sd_entry; in irdma_remove_pd_bp() local
640 sd_entry = &hmc_info->sd_table.sd_entry[sd_idx]; in irdma_remove_pd_bp()
641 if (sd_entry->entry_type != IRDMA_SD_TYPE_PAGED) in irdma_remove_pd_bp()
644 pd_table = &hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; in irdma_remove_pd_bp()
679 struct irdma_hmc_sd_entry *sd_entry; in irdma_prep_remove_sd_bp() local
681 sd_entry = &hmc_info->sd_table.sd_entry[idx]; in irdma_prep_remove_sd_bp()
682 if (--sd_entry->u.bp.use_cnt) in irdma_prep_remove_sd_bp()
686 sd_entry->valid = false; in irdma_prep_remove_sd_bp()
699 struct irdma_hmc_sd_entry *sd_entry; in irdma_prep_remove_pd_page() local
701 sd_entry = &hmc_info->sd_table.sd_entry[idx]; in irdma_prep_remove_pd_page()
703 if (sd_entry->u.pd_table.use_cnt) in irdma_prep_remove_pd_page()
706 sd_entry->valid = false; in irdma_prep_remove_pd_page()