• Home
  • Raw
  • Download

Lines Matching refs:npages

68 		pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages,  in mthca_free_icm_pages()
71 for (i = 0; i < chunk->npages; ++i) in mthca_free_icm_pages()
80 for (i = 0; i < chunk->npages; ++i) { in mthca_free_icm_coherent()
136 struct mthca_icm *mthca_alloc_icm(struct mthca_dev *dev, int npages, in mthca_alloc_icm() argument
156 while (npages > 0) { in mthca_alloc_icm()
164 chunk->npages = 0; in mthca_alloc_icm()
169 while (1 << cur_order > npages) in mthca_alloc_icm()
174 &chunk->mem[chunk->npages], in mthca_alloc_icm()
177 ret = mthca_alloc_icm_pages(&chunk->mem[chunk->npages], in mthca_alloc_icm()
181 ++chunk->npages; in mthca_alloc_icm()
185 else if (chunk->npages == MTHCA_ICM_CHUNK_LEN) { in mthca_alloc_icm()
187 chunk->npages, in mthca_alloc_icm()
194 if (chunk->npages == MTHCA_ICM_CHUNK_LEN) in mthca_alloc_icm()
197 npages -= 1 << cur_order; in mthca_alloc_icm()
207 chunk->npages, in mthca_alloc_icm()
300 for (i = 0; i < chunk->npages; ++i) { in mthca_table_find()
534 int npages; in mthca_init_user_db_tab() local
540 npages = dev->uar_table.uarc_size / MTHCA_ICM_PAGE_SIZE; in mthca_init_user_db_tab()
541 db_tab = kmalloc(sizeof *db_tab + npages * sizeof *db_tab->page, GFP_KERNEL); in mthca_init_user_db_tab()
546 for (i = 0; i < npages; ++i) { in mthca_init_user_db_tab()
600 start = dev->db_tab->npages - 1; in mthca_alloc_db()
726 dev->db_tab->npages = dev->uar_table.uarc_size / MTHCA_ICM_PAGE_SIZE; in mthca_init_db_tab()
728 dev->db_tab->min_group2 = dev->db_tab->npages - 1; in mthca_init_db_tab()
730 dev->db_tab->page = kmalloc(dev->db_tab->npages * in mthca_init_db_tab()
738 for (i = 0; i < dev->db_tab->npages; ++i) in mthca_init_db_tab()
758 for (i = 0; i < dev->db_tab->npages; ++i) { in mthca_cleanup_db_tab()