Lines Matching refs:npages

174     u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment,
601 u_long npages;
611 npages = 0;
632 npages > VM_DMA32_NPAGES_THRESHOLD &&
639 npages += atop(seg->end - seg->start);
659 npages = 0;
664 seg->first_page = &vm_page_array[npages];
665 npages += atop(seg->end - seg->start);
1091 vm_phys_free_contig(vm_page_t m, u_long npages)
1101 for (;; npages -= n) {
1112 if (npages < n)
1117 /* The residual "npages" is less than "1 << (VM_NFREEORDER - 1)". */
1118 for (; npages > 0; npages -= n) {
1119 order = flsl(npages) - 1;
1134 * "npages" must be greater than zero. Both "alignment" and "boundary" must
1138 vm_phys_scan_contig(u_long npages, vm_paddr_t low, vm_paddr_t high,
1146 KASSERT(npages > 0, ("npages is 0"));
1165 if (pa_end - VM_PAGE_TO_PHYS(m_start) < ptoa(npages))
1168 m_run = vm_page_scan_contig(npages, m_start, m_end,
1302 * "npages" from the free lists. All of the physical pages must be at
1311 vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high,
1320 KASSERT(npages > 0, ("npages is 0"));
1347 if (pa_end - pa_start < ptoa(npages))
1349 m_run = vm_phys_alloc_seg_contig(seg, npages, low, high,
1365 vm_phys_alloc_seg_contig(struct vm_phys_seg *seg, u_long npages,
1374 KASSERT(npages > 0, ("npages is 0"));
1378 /* Compute the queue that is the best fit for npages. */
1379 for (order = 0; (1 << order) < npages; order++);
1381 size = npages << PAGE_SHIFT;
1435 for (m = m_ret; m < &m_ret[npages]; m = &m[1 << oind]) {
1444 npages_end = roundup2(npages, 1 << imin(oind, order));
1445 if (npages < npages_end)
1446 vm_phys_free_contig(&m_ret[npages], npages_end - npages);