Lines Matching refs:begin
323 #define ubh_get_addr8(ubh,begin) \ argument
324 ((u8*)(ubh)->bh[(begin) >> uspi->s_fshift]->b_data + \
325 ((begin) & ~uspi->s_fmask))
327 #define ubh_get_addr16(ubh,begin) \ argument
328 (((__fs16*)((ubh)->bh[(begin) >> (uspi->s_fshift-1)]->b_data)) + \
329 ((begin) & ((uspi->fsize>>1) - 1)))
331 #define ubh_get_addr32(ubh,begin) \ argument
332 (((__fs32*)((ubh)->bh[(begin) >> (uspi->s_fshift-2)]->b_data)) + \
333 ((begin) & ((uspi->s_fsize>>2) - 1)))
335 #define ubh_get_addr64(ubh,begin) \ argument
336 (((__fs64*)((ubh)->bh[(begin) >> (uspi->s_fshift-3)]->b_data)) + \
337 ((begin) & ((uspi->s_fsize>>3) - 1)))
351 #define ubh_blkmap(ubh,begin,bit) \ argument
352 …((*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) >> ((bit) & 7)) & (0xff >> (UFS_MAXFRAG - uspi->s_fpb…
379 #define ubh_setbit(ubh,begin,bit) \ argument
380 (*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) |= (1 << ((bit) & 7)))
382 #define ubh_clrbit(ubh,begin,bit) \ argument
383 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) &= ~(1 << ((bit) & 7)))
385 #define ubh_isset(ubh,begin,bit) \ argument
386 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) & (1 << ((bit) & 7)))
388 #define ubh_isclr(ubh,begin,bit) (!ubh_isset(ubh,begin,bit)) argument
390 #define ubh_find_first_zero_bit(ubh,begin,size) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,0) argument
392 #define ubh_find_next_zero_bit(ubh,begin,size,offset) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,… argument
395 unsigned begin, unsigned size, unsigned offset) in _ubh_find_next_zero_bit_() argument
400 begin <<= 3; in _ubh_find_next_zero_bit_()
401 offset += begin; in _ubh_find_next_zero_bit_()
413 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_next_zero_bit_()
439 #define ubh_find_last_zero_bit(ubh,begin,size,offset) _ubh_find_last_zero_bit_(uspi,ubh,begin,size,… argument
442 unsigned begin, unsigned start, unsigned end) in _ubh_find_last_zero_bit_() argument
447 begin <<= 3; in _ubh_find_last_zero_bit_()
448 start += begin; in _ubh_find_last_zero_bit_()
463 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_last_zero_bit_()
466 #define ubh_isblockclear(ubh,begin,block) (!_ubh_isblockset_(uspi,ubh,begin,block)) argument
468 #define ubh_isblockset(ubh,begin,block) _ubh_isblockset_(uspi,ubh,begin,block) argument
470 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_isblockset_() argument
475 return (*ubh_get_addr (ubh, begin + block) == 0xff); in _ubh_isblockset_()
478 return (*ubh_get_addr (ubh, begin + (block >> 1)) & mask) == mask; in _ubh_isblockset_()
481 return (*ubh_get_addr (ubh, begin + (block >> 2)) & mask) == mask; in _ubh_isblockset_()
484 return (*ubh_get_addr (ubh, begin + (block >> 3)) & mask) == mask; in _ubh_isblockset_()
489 #define ubh_clrblock(ubh,begin,block) _ubh_clrblock_(uspi,ubh,begin,block) argument
491 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_clrblock_() argument
495 *ubh_get_addr (ubh, begin + block) = 0x00; in _ubh_clrblock_()
498 *ubh_get_addr (ubh, begin + (block >> 1)) &= ~(0x0f << ((block & 0x01) << 2)); in _ubh_clrblock_()
501 *ubh_get_addr (ubh, begin + (block >> 2)) &= ~(0x03 << ((block & 0x03) << 1)); in _ubh_clrblock_()
504 *ubh_get_addr (ubh, begin + (block >> 3)) &= ~(0x01 << ((block & 0x07))); in _ubh_clrblock_()
509 #define ubh_setblock(ubh,begin,block) _ubh_setblock_(uspi,ubh,begin,block) argument
511 struct ufs_buffer_head * ubh, unsigned begin, unsigned block) in _ubh_setblock_() argument
515 *ubh_get_addr(ubh, begin + block) = 0xff; in _ubh_setblock_()
518 *ubh_get_addr(ubh, begin + (block >> 1)) |= (0x0f << ((block & 0x01) << 2)); in _ubh_setblock_()
521 *ubh_get_addr(ubh, begin + (block >> 2)) |= (0x03 << ((block & 0x03) << 1)); in _ubh_setblock_()
524 *ubh_get_addr(ubh, begin + (block >> 3)) |= (0x01 << ((block & 0x07))); in _ubh_setblock_()