Lines Matching refs:npages
60 dma_unmap_sg(&dev->persist->pdev->dev, chunk->sg, chunk->npages, in mlx4_free_icm_pages()
63 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_pages()
72 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_coherent()
132 struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, in mlx4_alloc_icm() argument
159 while (npages > 0) { in mlx4_alloc_icm()
179 while (1 << cur_order > npages) in mlx4_alloc_icm()
188 &chunk->buf[chunk->npages], in mlx4_alloc_icm()
191 ret = mlx4_alloc_icm_pages(&chunk->sg[chunk->npages], in mlx4_alloc_icm()
202 ++chunk->npages; in mlx4_alloc_icm()
206 else if (chunk->npages == MLX4_ICM_CHUNK_LEN) { in mlx4_alloc_icm()
208 chunk->sg, chunk->npages, in mlx4_alloc_icm()
215 if (chunk->npages == MLX4_ICM_CHUNK_LEN) in mlx4_alloc_icm()
218 npages -= 1 << cur_order; in mlx4_alloc_icm()
223 chunk->npages, DMA_BIDIRECTIONAL); in mlx4_alloc_icm()
336 for (i = 0; i < chunk->npages; ++i) { in mlx4_table_find()