Lines Matching refs:ubh
270 #define ubh_ubhcpymem(mem,ubh,size) _ubh_ubhcpymem_(uspi,mem,ubh,size) argument
272 #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) argument
309 #define ubh_get_ucg(ubh) \ argument
310 ((struct ufs_cylinder_group *)((ubh)->bh[0]->b_data))
317 #define ubh_get_addr8(ubh,begin) \ argument
318 ((u8*)(ubh)->bh[(begin) >> uspi->s_fshift]->b_data + \
321 #define ubh_get_addr16(ubh,begin) \ argument
322 (((__fs16*)((ubh)->bh[(begin) >> (uspi->s_fshift-1)]->b_data)) + \
325 #define ubh_get_addr32(ubh,begin) \ argument
326 (((__fs32*)((ubh)->bh[(begin) >> (uspi->s_fshift-2)]->b_data)) + \
329 #define ubh_get_addr64(ubh,begin) \ argument
330 (((__fs64*)((ubh)->bh[(begin) >> (uspi->s_fshift-3)]->b_data)) + \
336 struct ufs_buffer_head *ubh, in ubh_get_data_ptr() argument
340 return ubh_get_addr64(ubh, blk); in ubh_get_data_ptr()
342 return ubh_get_addr32(ubh, blk); in ubh_get_data_ptr()
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
388 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_next_zero_bit_() argument
401 pos = find_next_zero_bit_le(ubh->bh[base]->b_data, count, offset); 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
435 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_last_zero_bit_() argument
450 pos = find_last_zero_bit (ubh->bh[base]->b_data, 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_()