• Home
  • Raw
  • Download

Lines Matching refs:npages

69 		pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages,  in mthca_free_icm_pages()
72 for (i = 0; i < chunk->npages; ++i) in mthca_free_icm_pages()
81 for (i = 0; i < chunk->npages; ++i) { in mthca_free_icm_coherent()
137 struct mthca_icm *mthca_alloc_icm(struct mthca_dev *dev, int npages, in mthca_alloc_icm() argument
157 while (npages > 0) { in mthca_alloc_icm()
165 chunk->npages = 0; in mthca_alloc_icm()
170 while (1 << cur_order > npages) in mthca_alloc_icm()
175 &chunk->mem[chunk->npages], in mthca_alloc_icm()
178 ret = mthca_alloc_icm_pages(&chunk->mem[chunk->npages], in mthca_alloc_icm()
182 ++chunk->npages; in mthca_alloc_icm()
186 else if (chunk->npages == MTHCA_ICM_CHUNK_LEN) { in mthca_alloc_icm()
188 chunk->npages, in mthca_alloc_icm()
195 if (chunk->npages == MTHCA_ICM_CHUNK_LEN) in mthca_alloc_icm()
198 npages -= 1 << cur_order; in mthca_alloc_icm()
208 chunk->npages, in mthca_alloc_icm()
298 for (i = 0; i < chunk->npages; ++i) { in mthca_table_find()
526 int npages; in mthca_init_user_db_tab() local
532 npages = dev->uar_table.uarc_size / MTHCA_ICM_PAGE_SIZE; in mthca_init_user_db_tab()
533 db_tab = kmalloc(struct_size(db_tab, page, npages), GFP_KERNEL); in mthca_init_user_db_tab()
538 for (i = 0; i < npages; ++i) { in mthca_init_user_db_tab()
590 start = dev->db_tab->npages - 1; in mthca_alloc_db()
713 dev->db_tab->npages = dev->uar_table.uarc_size / MTHCA_ICM_PAGE_SIZE; in mthca_init_db_tab()
715 dev->db_tab->min_group2 = dev->db_tab->npages - 1; in mthca_init_db_tab()
717 dev->db_tab->page = kmalloc_array(dev->db_tab->npages, in mthca_init_db_tab()
725 for (i = 0; i < dev->db_tab->npages; ++i) in mthca_init_db_tab()
744 for (i = 0; i < dev->db_tab->npages; ++i) { in mthca_cleanup_db_tab()