Lines Matching refs:pprm
2116 int irdma_prm_add_pble_mem(struct irdma_pble_prm *pprm, in irdma_prm_add_pble_mem() argument
2124 sizeofbitmap = (u64)pchunk->size >> pprm->pble_shift; in irdma_prm_add_pble_mem()
2132 pprm->total_pble_alloc += pchunk->size >> 3; in irdma_prm_add_pble_mem()
2133 pprm->free_pble_cnt += pchunk->size >> 3; in irdma_prm_add_pble_mem()
2146 int irdma_prm_get_pbles(struct irdma_pble_prm *pprm, in irdma_prm_get_pbles() argument
2153 struct list_head *chunk_entry = pprm->clist.next; in irdma_prm_get_pbles()
2159 bits_needed = DIV_ROUND_UP_ULL(mem_size, BIT_ULL(pprm->pble_shift)); in irdma_prm_get_pbles()
2161 spin_lock_irqsave(&pprm->prm_lock, flags); in irdma_prm_get_pbles()
2162 while (chunk_entry != &pprm->clist) { in irdma_prm_get_pbles()
2175 spin_unlock_irqrestore(&pprm->prm_lock, flags); in irdma_prm_get_pbles()
2180 offset = bit_idx << pprm->pble_shift; in irdma_prm_get_pbles()
2188 pprm->free_pble_cnt -= chunkinfo->bits_used << (pprm->pble_shift - 3); in irdma_prm_get_pbles()
2189 spin_unlock_irqrestore(&pprm->prm_lock, flags); in irdma_prm_get_pbles()
2199 void irdma_prm_return_pbles(struct irdma_pble_prm *pprm, in irdma_prm_return_pbles() argument
2204 spin_lock_irqsave(&pprm->prm_lock, flags); in irdma_prm_return_pbles()
2205 pprm->free_pble_cnt += chunkinfo->bits_used << (pprm->pble_shift - 3); in irdma_prm_return_pbles()
2208 spin_unlock_irqrestore(&pprm->prm_lock, flags); in irdma_prm_return_pbles()