Lines Matching refs:npages
59 pci_unmap_sg(dev->persist->pdev, chunk->mem, chunk->npages, in mlx4_free_icm_pages()
62 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_pages()
71 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_coherent()
127 struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, in mlx4_alloc_icm() argument
153 while (npages > 0) { in mlx4_alloc_icm()
168 chunk->npages = 0; in mlx4_alloc_icm()
173 while (1 << cur_order > npages) in mlx4_alloc_icm()
178 &chunk->mem[chunk->npages], in mlx4_alloc_icm()
181 ret = mlx4_alloc_icm_pages(&chunk->mem[chunk->npages], in mlx4_alloc_icm()
192 ++chunk->npages; in mlx4_alloc_icm()
196 else if (chunk->npages == MLX4_ICM_CHUNK_LEN) { in mlx4_alloc_icm()
198 chunk->npages, in mlx4_alloc_icm()
205 if (chunk->npages == MLX4_ICM_CHUNK_LEN) in mlx4_alloc_icm()
208 npages -= 1 << cur_order; in mlx4_alloc_icm()
213 chunk->npages, in mlx4_alloc_icm()
328 for (i = 0; i < chunk->npages; ++i) { in mlx4_table_find()