Lines Matching refs:ubh
276 #define ubh_ubhcpymem(mem,ubh,size) _ubh_ubhcpymem_(uspi,mem,ubh,size) argument
278 #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) argument
315 #define ubh_get_ucg(ubh) \ argument
316 ((struct ufs_cylinder_group *)((ubh)->bh[0]->b_data))
323 #define ubh_get_addr8(ubh,begin) \ argument
324 ((u8*)(ubh)->bh[(begin) >> uspi->s_fshift]->b_data + \
327 #define ubh_get_addr16(ubh,begin) \ argument
328 (((__fs16*)((ubh)->bh[(begin) >> (uspi->s_fshift-1)]->b_data)) + \
331 #define ubh_get_addr32(ubh,begin) \ argument
332 (((__fs32*)((ubh)->bh[(begin) >> (uspi->s_fshift-2)]->b_data)) + \
335 #define ubh_get_addr64(ubh,begin) \ argument
336 (((__fs64*)((ubh)->bh[(begin) >> (uspi->s_fshift-3)]->b_data)) + \
342 struct ufs_buffer_head *ubh, in ubh_get_data_ptr() argument
346 return ubh_get_addr64(ubh, blk); in ubh_get_data_ptr()
348 return ubh_get_addr32(ubh, blk); in ubh_get_data_ptr()
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
394 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_next_zero_bit_() argument
407 pos = find_next_zero_bit_le(ubh->bh[base]->b_data, count, offset); 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
441 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_last_zero_bit_() argument
456 pos = find_last_zero_bit (ubh->bh[base]->b_data, 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_()