pble_rsrc 254 drivers/infiniband/hw/i40iw/i40iw.h struct i40iw_hmc_pble_rsrc *pble_rsrc; pble_rsrc 1334 drivers/infiniband/hw/i40iw/i40iw_main.c iwdev->pble_rsrc = (struct i40iw_hmc_pble_rsrc *)iwdev->hmc_info_mem; pble_rsrc 1336 drivers/infiniband/hw/i40iw/i40iw_main.c dev->hmc_info->hmc_obj = (struct i40iw_hmc_obj_info *)(iwdev->pble_rsrc + 1); pble_rsrc 1505 drivers/infiniband/hw/i40iw/i40iw_main.c i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc); pble_rsrc 1698 drivers/infiniband/hw/i40iw/i40iw_main.c status = i40iw_hmc_init_pble(&iwdev->sc_dev, iwdev->pble_rsrc); pble_rsrc 52 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc); pble_rsrc 59 drivers/infiniband/hw/i40iw/i40iw_pble.c void i40iw_destroy_pble_pool(struct i40iw_sc_dev *dev, struct i40iw_hmc_pble_rsrc *pble_rsrc) pble_rsrc 64 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_pble_pool *pinfo = &pble_rsrc->pinfo; pble_rsrc 83 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc) pble_rsrc 89 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->fpm_base_addr = hmc_info->hmc_obj[I40IW_HMC_IW_PBLE].base; pble_rsrc 91 drivers/infiniband/hw/i40iw/i40iw_pble.c if (pble_rsrc->fpm_base_addr & 0xfff) pble_rsrc 92 drivers/infiniband/hw/i40iw/i40iw_pble.c fpm_idx = (PAGE_SIZE - (pble_rsrc->fpm_base_addr & 0xfff)) >> 3; pble_rsrc 94 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->unallocated_pble = pble_rsrc 96 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->next_fpm_addr = pble_rsrc->fpm_base_addr + (fpm_idx << 3); pble_rsrc 98 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->pinfo.pool_shift = POOL_SHIFT; pble_rsrc 99 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->pinfo.pool = gen_pool_create(pble_rsrc->pinfo.pool_shift, -1); pble_rsrc 100 drivers/infiniband/hw/i40iw/i40iw_pble.c INIT_LIST_HEAD(&pble_rsrc->pinfo.clist); pble_rsrc 101 drivers/infiniband/hw/i40iw/i40iw_pble.c if (!pble_rsrc->pinfo.pool) pble_rsrc 104 drivers/infiniband/hw/i40iw/i40iw_pble.c if (add_pble_pool(dev, pble_rsrc)) pble_rsrc 109 drivers/infiniband/hw/i40iw/i40iw_pble.c error:i40iw_destroy_pble_pool(dev, pble_rsrc); pble_rsrc 118 drivers/infiniband/hw/i40iw/i40iw_pble.c static inline void get_sd_pd_idx(struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 121 drivers/infiniband/hw/i40iw/i40iw_pble.c idx->sd_idx = (u32)(pble_rsrc->next_fpm_addr) / I40IW_HMC_DIRECT_BP_SIZE; pble_rsrc 122 drivers/infiniband/hw/i40iw/i40iw_pble.c idx->pd_idx = (u32)(pble_rsrc->next_fpm_addr) / I40IW_HMC_PAGED_BP_SIZE; pble_rsrc 133 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 157 drivers/infiniband/hw/i40iw/i40iw_pble.c chunk->fpm_addr = pble_rsrc->next_fpm_addr; pble_rsrc 239 drivers/infiniband/hw/i40iw/i40iw_pble.c static inline u32 fpm_to_idx(struct i40iw_hmc_pble_rsrc *pble_rsrc, u64 addr) pble_rsrc 241 drivers/infiniband/hw/i40iw/i40iw_pble.c return (addr - (pble_rsrc->fpm_base_addr)) >> 3; pble_rsrc 251 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 276 drivers/infiniband/hw/i40iw/i40iw_pble.c fpm_to_idx(pble_rsrc, pble_rsrc 277 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->next_fpm_addr), pble_rsrc 312 drivers/infiniband/hw/i40iw/i40iw_pble.c chunk->fpm_addr = pble_rsrc->next_fpm_addr; pble_rsrc 325 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc) pble_rsrc 337 drivers/infiniband/hw/i40iw/i40iw_pble.c if (pble_rsrc->unallocated_pble < PBLE_PER_PAGE) pble_rsrc 339 drivers/infiniband/hw/i40iw/i40iw_pble.c if (pble_rsrc->next_fpm_addr & 0xfff) { pble_rsrc 340 drivers/infiniband/hw/i40iw/i40iw_pble.c i40iw_pr_err("next fpm_addr %llx\n", pble_rsrc->next_fpm_addr); pble_rsrc 347 drivers/infiniband/hw/i40iw/i40iw_pble.c chunk->fpm_addr = pble_rsrc->next_fpm_addr; pble_rsrc 348 drivers/infiniband/hw/i40iw/i40iw_pble.c get_sd_pd_idx(pble_rsrc, idx); pble_rsrc 352 drivers/infiniband/hw/i40iw/i40iw_pble.c pages = min(pages, pble_rsrc->unallocated_pble >> PBLE_512_SHIFT); pble_rsrc 366 drivers/infiniband/hw/i40iw/i40iw_pble.c pages, pble_rsrc->unallocated_pble, pble_rsrc->next_fpm_addr); pble_rsrc 371 drivers/infiniband/hw/i40iw/i40iw_pble.c ret_code = add_sd_direct(dev, pble_rsrc, &info); pble_rsrc 375 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_direct_sds++; pble_rsrc 378 drivers/infiniband/hw/i40iw/i40iw_pble.c ret_code = add_bp_pages(dev, pble_rsrc, &info); pble_rsrc 382 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_paged_sds++; pble_rsrc 385 drivers/infiniband/hw/i40iw/i40iw_pble.c if (gen_pool_add_virt(pble_rsrc->pinfo.pool, (unsigned long)chunk->vaddr, pble_rsrc 391 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->next_fpm_addr += chunk->size; pble_rsrc 393 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->next_fpm_addr, chunk->size, chunk->size); pble_rsrc 394 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->unallocated_pble -= (chunk->size >> 3); pble_rsrc 395 drivers/infiniband/hw/i40iw/i40iw_pble.c list_add(&chunk->list, &pble_rsrc->pinfo.clist); pble_rsrc 422 drivers/infiniband/hw/i40iw/i40iw_pble.c static void free_lvl2(struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 431 drivers/infiniband/hw/i40iw/i40iw_pble.c pool = pble_rsrc->pinfo.pool; pble_rsrc 453 drivers/infiniband/hw/i40iw/i40iw_pble.c static enum i40iw_status_code get_lvl2_pble(struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 481 drivers/infiniband/hw/i40iw/i40iw_pble.c root->idx = fpm_to_idx(pble_rsrc, pble_rsrc 490 drivers/infiniband/hw/i40iw/i40iw_pble.c leaf->idx = fpm_to_idx(pble_rsrc, (u64)gen_pool_virt_to_phys(pool, leaf->addr)); pble_rsrc 497 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_lvl2++; pble_rsrc 500 drivers/infiniband/hw/i40iw/i40iw_pble.c free_lvl2(pble_rsrc, palloc); pble_rsrc 511 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 518 drivers/infiniband/hw/i40iw/i40iw_pble.c pool = pble_rsrc->pinfo.pool; pble_rsrc 526 drivers/infiniband/hw/i40iw/i40iw_pble.c lvl1->idx = fpm_to_idx(pble_rsrc, (u64)gen_pool_virt_to_phys(pool, pble_rsrc 529 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_lvl1++; pble_rsrc 541 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 547 drivers/infiniband/hw/i40iw/i40iw_pble.c status = get_lvl1_pble(dev, pble_rsrc, palloc); pble_rsrc 549 drivers/infiniband/hw/i40iw/i40iw_pble.c status = get_lvl2_pble(pble_rsrc, palloc, pool); pble_rsrc 561 drivers/infiniband/hw/i40iw/i40iw_pble.c struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 570 drivers/infiniband/hw/i40iw/i40iw_pble.c pool = pble_rsrc->pinfo.pool; pble_rsrc 574 drivers/infiniband/hw/i40iw/i40iw_pble.c status = get_lvl1_lvl2_pble(dev, pble_rsrc, palloc, pool); pble_rsrc 579 drivers/infiniband/hw/i40iw/i40iw_pble.c status = add_pble_pool(dev, pble_rsrc); pble_rsrc 582 drivers/infiniband/hw/i40iw/i40iw_pble.c status = get_lvl1_lvl2_pble(dev, pble_rsrc, palloc, pool); pble_rsrc 588 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_alloc_ok++; pble_rsrc 590 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_alloc_fail++; pble_rsrc 600 drivers/infiniband/hw/i40iw/i40iw_pble.c void i40iw_free_pble(struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 605 drivers/infiniband/hw/i40iw/i40iw_pble.c pool = pble_rsrc->pinfo.pool; pble_rsrc 607 drivers/infiniband/hw/i40iw/i40iw_pble.c free_lvl2(pble_rsrc, palloc); pble_rsrc 611 drivers/infiniband/hw/i40iw/i40iw_pble.c pble_rsrc->stats_alloc_freed++; pble_rsrc 123 drivers/infiniband/hw/i40iw/i40iw_pble.h void i40iw_destroy_pble_pool(struct i40iw_sc_dev *dev, struct i40iw_hmc_pble_rsrc *pble_rsrc); pble_rsrc 125 drivers/infiniband/hw/i40iw/i40iw_pble.h struct i40iw_hmc_pble_rsrc *pble_rsrc); pble_rsrc 126 drivers/infiniband/hw/i40iw/i40iw_pble.h void i40iw_free_pble(struct i40iw_hmc_pble_rsrc *pble_rsrc, struct i40iw_pble_alloc *palloc); pble_rsrc 128 drivers/infiniband/hw/i40iw/i40iw_pble.h struct i40iw_hmc_pble_rsrc *pble_rsrc, pble_rsrc 380 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, &iwpbl->pble_alloc); pble_rsrc 1404 drivers/infiniband/hw/i40iw/i40iw_verbs.c status = i40iw_get_pble(&iwdev->sc_dev, iwdev->pble_rsrc, palloc, iwmr->page_cnt); pble_rsrc 1456 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 1497 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 1583 drivers/infiniband/hw/i40iw/i40iw_verbs.c status = i40iw_get_pble(&iwdev->sc_dev, iwdev->pble_rsrc, palloc, iwmr->page_cnt); pble_rsrc 1597 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 1837 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 1871 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 2012 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc); pble_rsrc 2042 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_free_pble(iwdev->pble_rsrc, palloc);