Lines Matching refs:start
163 ccp_bitmap_set(unsigned long *map, unsigned int start, int len) in ccp_bitmap_set() argument
165 unsigned long *p = map + WORD_OFFSET(start); in ccp_bitmap_set()
166 const unsigned int size = start + len; in ccp_bitmap_set()
167 int bits_to_set = BITS_PER_WORD - (start % BITS_PER_WORD); in ccp_bitmap_set()
168 unsigned long mask_to_set = CCP_BITMAP_FIRST_WORD_MASK(start); in ccp_bitmap_set()
184 ccp_bitmap_clear(unsigned long *map, unsigned int start, int len) in ccp_bitmap_clear() argument
186 unsigned long *p = map + WORD_OFFSET(start); in ccp_bitmap_clear()
187 const unsigned int size = start + len; in ccp_bitmap_clear()
188 int bits_to_clear = BITS_PER_WORD - (start % BITS_PER_WORD); in ccp_bitmap_clear()
189 unsigned long mask_to_clear = CCP_BITMAP_FIRST_WORD_MASK(start); in ccp_bitmap_clear()
208 unsigned long start, in _ccp_find_next_bit() argument
213 if (!nbits || start >= nbits) in _ccp_find_next_bit()
216 tmp = addr[start / BITS_PER_WORD] ^ invert; in _ccp_find_next_bit()
219 tmp &= CCP_BITMAP_FIRST_WORD_MASK(start); in _ccp_find_next_bit()
220 start = ccp_round_down(start, BITS_PER_WORD); in _ccp_find_next_bit()
223 start += BITS_PER_WORD; in _ccp_find_next_bit()
224 if (start >= nbits) in _ccp_find_next_bit()
227 tmp = addr[start / BITS_PER_WORD] ^ invert; in _ccp_find_next_bit()
230 return RTE_MIN(start + (ffs(tmp) - 1), nbits); in _ccp_find_next_bit()
259 unsigned long start, in ccp_bitmap_find_next_zero_area() argument
265 index = ccp_find_next_zero_bit(map, size, start); in ccp_bitmap_find_next_zero_area()
272 start = i + 1; in ccp_bitmap_find_next_zero_area()
282 int start; in ccp_lsb_alloc() local
286 start = (uint32_t)ccp_bitmap_find_next_zero_area(cmd_q->lsbmap, in ccp_lsb_alloc()
289 if (start < LSB_SIZE) { in ccp_lsb_alloc()
290 ccp_bitmap_set(cmd_q->lsbmap, start, count); in ccp_lsb_alloc()
291 return start + cmd_q->lsb * LSB_SIZE; in ccp_lsb_alloc()
300 start = (uint32_t)ccp_bitmap_find_next_zero_area(ccp->lsbmap, in ccp_lsb_alloc()
303 if (start <= MAX_LSB_CNT * LSB_SIZE) { in ccp_lsb_alloc()
304 ccp_bitmap_set(ccp->lsbmap, start, count); in ccp_lsb_alloc()
306 return start * LSB_ITEM_SIZE; in ccp_lsb_alloc()
317 unsigned int start, in ccp_lsb_free() argument
320 int lsbno = start / LSB_SIZE; in ccp_lsb_free()
322 if (!start) in ccp_lsb_free()
327 ccp_bitmap_clear(cmd_q->lsbmap, start % LSB_SIZE, count); in ccp_lsb_free()
333 ccp_bitmap_clear(ccp->lsbmap, start, count); in ccp_lsb_free()