Lines Matching refs:begin

317 #define ubh_get_addr8(ubh,begin) \  argument
318 ((u8*)(ubh)->bh[(begin) >> uspi->s_fshift]->b_data + \
319 ((begin) & ~uspi->s_fmask))
321 #define ubh_get_addr16(ubh,begin) \ argument
322 (((__fs16*)((ubh)->bh[(begin) >> (uspi->s_fshift-1)]->b_data)) + \
323 ((begin) & ((uspi->fsize>>1) - 1)))
325 #define ubh_get_addr32(ubh,begin) \ argument
326 (((__fs32*)((ubh)->bh[(begin) >> (uspi->s_fshift-2)]->b_data)) + \
327 ((begin) & ((uspi->s_fsize>>2) - 1)))
329 #define ubh_get_addr64(ubh,begin) \ argument
330 (((__fs64*)((ubh)->bh[(begin) >> (uspi->s_fshift-3)]->b_data)) + \
331 ((begin) & ((uspi->s_fsize>>3) - 1)))
345 #define ubh_blkmap(ubh,begin,bit) \ argument
346 …((*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) >> ((bit) & 7)) & (0xff >> (UFS_MAXFRAG - uspi->s_fpb…
373 #define ubh_setbit(ubh,begin,bit) \ argument
374 (*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) |= (1 << ((bit) & 7)))
376 #define ubh_clrbit(ubh,begin,bit) \ argument
377 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) &= ~(1 << ((bit) & 7)))
379 #define ubh_isset(ubh,begin,bit) \ argument
380 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) & (1 << ((bit) & 7)))
382 #define ubh_isclr(ubh,begin,bit) (!ubh_isset(ubh,begin,bit)) argument
384 #define ubh_find_first_zero_bit(ubh,begin,size) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,0) argument
386 #define ubh_find_next_zero_bit(ubh,begin,size,offset) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,… argument
389 unsigned begin, unsigned size, unsigned offset) in _ubh_find_next_zero_bit_() argument
394 begin <<= 3; in _ubh_find_next_zero_bit_()
395 offset += begin; in _ubh_find_next_zero_bit_()
407 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_next_zero_bit_()
433 #define ubh_find_last_zero_bit(ubh,begin,size,offset) _ubh_find_last_zero_bit_(uspi,ubh,begin,size,… argument
436 unsigned begin, unsigned start, unsigned end) in _ubh_find_last_zero_bit_() argument
441 begin <<= 3; in _ubh_find_last_zero_bit_()
442 start += begin; in _ubh_find_last_zero_bit_()
457 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_last_zero_bit_()
460 #define ubh_isblockclear(ubh,begin,block) (!_ubh_isblockset_(uspi,ubh,begin,block)) argument
462 #define ubh_isblockset(ubh,begin,block) _ubh_isblockset_(uspi,ubh,begin,block) argument
464 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_isblockset_() argument
469 return (*ubh_get_addr (ubh, begin + block) == 0xff); in _ubh_isblockset_()
472 return (*ubh_get_addr (ubh, begin + (block >> 1)) & mask) == mask; in _ubh_isblockset_()
475 return (*ubh_get_addr (ubh, begin + (block >> 2)) & mask) == mask; in _ubh_isblockset_()
478 return (*ubh_get_addr (ubh, begin + (block >> 3)) & mask) == mask; in _ubh_isblockset_()
483 #define ubh_clrblock(ubh,begin,block) _ubh_clrblock_(uspi,ubh,begin,block) argument
485 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_clrblock_() argument
489 *ubh_get_addr (ubh, begin + block) = 0x00; in _ubh_clrblock_()
492 *ubh_get_addr (ubh, begin + (block >> 1)) &= ~(0x0f << ((block & 0x01) << 2)); in _ubh_clrblock_()
495 *ubh_get_addr (ubh, begin + (block >> 2)) &= ~(0x03 << ((block & 0x03) << 1)); in _ubh_clrblock_()
498 *ubh_get_addr (ubh, begin + (block >> 3)) &= ~(0x01 << ((block & 0x07))); in _ubh_clrblock_()
503 #define ubh_setblock(ubh,begin,block) _ubh_setblock_(uspi,ubh,begin,block) argument
505 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_setblock_() argument
509 *ubh_get_addr(ubh, begin + block) = 0xff; in _ubh_setblock_()
512 *ubh_get_addr(ubh, begin + (block >> 1)) |= (0x0f << ((block & 0x01) << 2)); in _ubh_setblock_()
515 *ubh_get_addr(ubh, begin + (block >> 2)) |= (0x03 << ((block & 0x03) << 1)); in _ubh_setblock_()
518 *ubh_get_addr(ubh, begin + (block >> 3)) |= (0x01 << ((block & 0x07))); in _ubh_setblock_()