Lines Matching refs:block_shift
154 u64 block_shift) in mlx4_ib_umem_calc_block_mtt() argument
160 if ((next_block_start & ((1ULL << block_shift) - 1ULL)) != 0) in mlx4_ib_umem_calc_block_mtt()
166 block_shift = alignment_of(next_block_start); in mlx4_ib_umem_calc_block_mtt()
172 if (((current_block_end) & ((1ULL << block_shift) - 1ULL)) != 0) in mlx4_ib_umem_calc_block_mtt()
177 block_shift = alignment_of(current_block_end); in mlx4_ib_umem_calc_block_mtt()
179 return block_shift; in mlx4_ib_umem_calc_block_mtt()
260 u64 block_shift = MLX4_MAX_MTT_SHIFT; in mlx4_ib_umem_calc_optimal_mtt_size() local
300 block_shift = min(alignment_of(misalignment_bits), in mlx4_ib_umem_calc_optimal_mtt_size()
301 block_shift); in mlx4_ib_umem_calc_optimal_mtt_size()
312 block_shift = mlx4_ib_umem_calc_block_mtt in mlx4_ib_umem_calc_optimal_mtt_size()
315 block_shift); in mlx4_ib_umem_calc_optimal_mtt_size()
321 if (block_shift <= min_shift) in mlx4_ib_umem_calc_optimal_mtt_size()
347 total_len += (first_block_start & ((1ULL << block_shift) - 1ULL)); in mlx4_ib_umem_calc_optimal_mtt_size()
349 last_block_aligned_end = round_up(last_block_end, 1ULL << block_shift); in mlx4_ib_umem_calc_optimal_mtt_size()
352 if (total_len & ((1ULL << block_shift) - 1ULL)) in mlx4_ib_umem_calc_optimal_mtt_size()
354 total_len, block_shift); in mlx4_ib_umem_calc_optimal_mtt_size()
356 *num_of_mtts = total_len >> block_shift; in mlx4_ib_umem_calc_optimal_mtt_size()
358 if (block_shift < min_shift) { in mlx4_ib_umem_calc_optimal_mtt_size()
363 pr_warn("umem_calc_optimal_mtt_size - unexpected shift %lld\n", block_shift); in mlx4_ib_umem_calc_optimal_mtt_size()
365 block_shift = min_shift; in mlx4_ib_umem_calc_optimal_mtt_size()
367 return block_shift; in mlx4_ib_umem_calc_optimal_mtt_size()