/freebsd-11-stable/contrib/mdocml/ |
H A D | dba_read.c | 43 int32_t im, ip, iv, npages; local 47 npages = dbm_page_count(); 48 dba = dba_new(npages < 128 ? 128 : npages); 49 for (ip = 0; ip < npages; ip++) {
|
H A D | dbm.c | 69 static int32_t npages; variable 94 if ((npages = be32toh(*dbm_getint(4))) < 0) { 96 fname, npages); 139 return npages; 151 assert(ip < npages); 265 ip = npages; 273 while (ip < npages) { 289 if (ip == npages) { 303 if (++ip < npages) { 331 for ( ; ip < npages; i [all...] |
/freebsd-11-stable/lib/libgeom/ |
H A D | geom_stats.c | 45 static uint npages, spp; variable 54 munmap(statp, npages *pagesize); 68 p = mmap(statp, (npages + 1) * pagesize, 74 npages++; 100 npages = 1; 124 sp->ptr = malloc(pagesize * npages); 129 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */ 131 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */ 132 memcpy(sp->ptr, statp, pagesize * npages); 133 sp->pages = npages; [all...] |
/freebsd-11-stable/sys/dev/mlx5/mlx5_core/ |
H A D | mlx5_pagealloc.c | 39 s32 npages; member in struct:mlx5_pages_req 297 s32 *npages, int boot) 312 *npages = MLX5_GET(query_pages_out, out, num_pages); 318 static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, argument 328 inlen += npages * MLX5_FLD_SZ_BYTES(manage_pages_in, pas[0]); 336 for (i = 0; i < npages; i++) { 346 MLX5_SET(manage_pages_in, in, input_num_entries, npages); 350 mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n", 351 func_id, npages, err); 354 dev->priv.fw_pages += npages; 296 mlx5_cmd_query_pages(struct mlx5_core_dev *dev, u16 *func_id, s32 *npages, int boot) argument 390 u32 npages; local 415 reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages, int *nclaimed) argument 477 mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id, s32 npages) argument 520 s64 npages = 0; local [all...] |
H A D | mlx5_alloc.c | 77 buf->npages = howmany(size, PAGE_SIZE); 81 buf->page_list = kcalloc(buf->npages, sizeof(*buf->page_list), 91 PAGE_SIZE * buf->npages, /* maxsize */ 92 buf->npages, /* nsegments */ 111 PAGE_SIZE * buf->npages, &mlx5_buf_load_mem_cb, 125 memset(buf->direct.buf, 0, PAGE_SIZE * buf->npages); 258 for (i = 0; i != buf->npages; i++)
|
/freebsd-11-stable/contrib/netbsd-tests/sys/uvm/ |
H A D | t_uvm_physseg.c | 281 uvmexp.npages = 0; 487 ATF_REQUIRE_EQ(0, uvmexp.npages); 492 ATF_REQUIRE_EQ(0, uvmexp.npages); 501 , uvmexp.npages); 510 + npages3, uvmexp.npages); 554 ATF_REQUIRE_EQ(0, uvmexp.npages); /* Boot time sanity */ 579 ATF_CHECK_EQ(atop(FIVEONETWO_KILO), uvmexp.npages); 648 ATF_REQUIRE_EQ(0, uvmexp.npages); 661 ATF_REQUIRE_EQ(0, uvmexp.npages); 692 ATF_REQUIRE_EQ(0, uvmexp.npages); 776 const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */ local 831 const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */ local 869 const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */ local 1493 psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1); local 1642 psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1); local 1699 psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1); local 1743 psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1); local 1923 psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2); local 2028 psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2); local 2200 psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2); local [all...] |
/freebsd-11-stable/sys/dev/drm2/ttm/ |
H A D | ttm_page_alloc.c | 64 * @npages: Number of pages in pool. 72 unsigned npages; member in struct:ttm_page_pool 329 static void ttm_pages_put(vm_page_t *pages, unsigned npages) argument 334 if (set_pages_array_wb(pages, npages)) 335 printf("[TTM] Failed to set %d pages to wb!\n", npages); 336 for (i = 0; i < npages; ++i) 343 pool->npages -= freed_pages; 439 total += _manager->pools[i].npages; 620 && count > pool->npages) { 638 pool->npages 690 ttm_put_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument 733 ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument [all...] |
/freebsd-11-stable/sys/dev/cxgb/ulp/iw_cxgb/ |
H A D | iw_cxgb_mem.c | 118 int npages) 124 if (npages > mhp->attr.pbl_size) 145 int iwch_alloc_pbl(struct iwch_mr *mhp, int npages) argument 148 npages << 3); 153 mhp->attr.pbl_size = npages; 164 int iwch_write_pbl(struct iwch_mr *mhp, __be64 *pages, int npages, int offset) argument 167 mhp->attr.pbl_addr + (offset << 3), npages); 174 int *npages, 212 *npages = 0; 214 *npages 115 iwch_reregister_mem(struct iwch_dev *rhp, struct iwch_pd *php, struct iwch_mr *mhp, int shift, int npages) argument 170 build_phys_page_list(struct ib_phys_buf *buffer_list, int num_phys_buf, u64 *iova_start, u64 *total_size, int *npages, int *shift, __be64 **page_list) argument [all...] |
/freebsd-11-stable/sys/ofed/drivers/infiniband/core/ |
H A D | ib_umem.c | 64 for_each_sg(umem->sg_head.sgl, sg, umem->npages, i) { 95 unsigned long npages; local 159 npages = ib_umem_num_pages(umem); 163 locked = npages + current->mm->pinned_vm; 167 if (npages == 0 || npages > UINT_MAX) { 172 ret = sg_alloc_table(&umem->sg_head, npages, GFP_KERNEL); 182 while (npages) { 184 min_t(unsigned long, npages, 191 umem->npages [all...] |
/freebsd-11-stable/sys/vm/ |
H A D | vm_phys.h | 73 vm_page_t vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, 82 void vm_phys_free_contig(vm_page_t m, u_long npages); 86 vm_page_t vm_phys_scan_contig(u_long npages, vm_paddr_t low, vm_paddr_t high,
|
H A D | vm_reserv.h | 49 u_long npages, vm_paddr_t low, vm_paddr_t high, 59 boolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low,
|
H A D | vm_phys.c | 174 u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, 601 u_long npages; local 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) argument 1101 for (;; npages 1138 vm_phys_scan_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options) argument 1311 vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument 1365 vm_phys_alloc_seg_contig(struct vm_phys_seg *seg, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument [all...] |
/freebsd-11-stable/usr.sbin/lpr/filters/ |
H A D | lpf.c | 69 static int npages = 1; variable 203 npages++; 211 npages++; 215 printf("%7.2f\t%s:%s\n", (float)npages, host, name);
|
/freebsd-11-stable/sys/dev/mlx4/mlx4_core/ |
H A D | mlx4_icm.c | 60 pci_unmap_sg(dev->persist->pdev, chunk->mem, chunk->npages, 63 for (i = 0; i < chunk->npages; ++i) 72 for (i = 0; i < chunk->npages; ++i) 128 struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, argument 154 while (npages > 0) { 169 chunk->npages = 0; 174 while (1 << cur_order > npages) 179 &chunk->mem[chunk->npages], 182 ret = mlx4_alloc_icm_pages(&chunk->mem[chunk->npages], 193 ++chunk->npages; [all...] |
H A D | mlx4_mr.c | 200 int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, argument 205 if (!npages) { 212 for (mtt->order = 0, i = 1; i < npages; i <<= 1) 423 u64 iova, u64 size, u32 access, int npages, 433 return mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); 533 int npages, int page_shift, struct mlx4_mr *mr) 543 access, npages, page_shift, mr); 595 u64 iova, u64 size, int npages, 600 err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); 698 int start_index, int npages, u6 422 mlx4_mr_alloc_reserved(struct mlx4_dev *dev, u32 mridx, u32 pd, u64 iova, u64 size, u32 access, int npages, int page_shift, struct mlx4_mr *mr) argument 532 mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, int npages, int page_shift, struct mlx4_mr *mr) argument 594 mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, u64 iova, u64 size, int npages, int page_shift, struct mlx4_mpt_entry *mpt_entry) argument 697 mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument 723 __mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument 751 mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument 975 mlx4_check_fmr(struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova) argument 1002 mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova, u32 *lkey, u32 *rkey) argument [all...] |
/freebsd-11-stable/lib/libusbhid/ |
H A D | usage.c | 55 static int npages, npagesmax; variable 63 for (i = 0; i < npages; i++) { 126 if (npages >= npagesmax) { 140 curpage = &pages[npages++]; 167 for (k = 0; k < npages; k++) 182 for (k = 0; k < npages; k++) 185 if (k >= npages) 211 for (k = 0; k < npages; k++) 229 for (k = 0; k < npages; k++)
|
/freebsd-11-stable/sys/kern/ |
H A D | kern_sendfile.c | 82 int npages; member in struct:sf_io 289 for (int i = 0; i < sfio->npages; i++) 294 sfio->npages); 308 int npages, int rhpages, int flags) 323 VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); 324 if (grabbed < npages) { 325 for (int i = grabbed; i < npages; i++) 327 npages = grabbed; 331 for (int i = 0; i < npages;) { 336 xfsize(i, npages, of 307 sendfile_swapin(vm_object_t obj, struct sf_io *sfio, off_t off, off_t len, int npages, int rhpages, int flags) argument 588 int nios, space, npages, rhpages; local [all...] |
H A D | subr_mbpool.c | 89 u_int npages; /* current number of pages */ member in struct:mbpool 160 for (i = 0; i < p->npages; i++) { 203 if (p->npages == p->max_pages) { 210 pg = &p->pages[p->npages]; 226 t->page = p->npages; 231 p->npages++; 302 for (i = 0; i < p->npages; i++) { 328 for (i = 0; i < p->npages; i++) {
|
H A D | kern_physio.c | 48 int error, i, npages, maxpages; local 171 if ((npages = vm_fault_quick_hold_pages( 180 pages, npages); 184 bp->bio_ma_n = npages; 200 pmap_qremove((vm_offset_t)sa, npages); 201 vm_page_unhold_pages(pages, npages);
|
/freebsd-11-stable/sys/arm/nvidia/drm2/ |
H A D | tegra_bo.c | 62 pmap_qremove(bo->vbase, bo->npages); 65 for (i = 0; i < bo->npages; i++) { 97 tegra_bo_alloc_contig(size_t npages, u_long alignment, vm_memattr_t memattr, argument 111 m = vm_page_alloc_contig(NULL, 0, pflags, npages, low, high, alignment, 115 if (!vm_page_reclaim_contig(pflags, npages, low, high, 124 for (i = 0; i < npages; i++, m++) { 149 for (i = 0; i < bo->npages; i++) { 169 pmap_qenter(bo->vbase, bo->m, bo->npages); 182 bo->npages = atop(size); 183 bo->m = malloc(sizeof(vm_page_t *) * bo->npages, DRM_MEM_DRIVE [all...] |
/freebsd-11-stable/sys/dev/mthca/ |
H A D | mthca_allocator.c | 199 int npages, shift; local 206 npages = 1; 220 npages *= 2; 223 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); 227 for (i = 0; i < npages; ++i) 231 npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; 234 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); 238 buf->page_list = kmalloc(npages * sizeof *buf->page_list, 243 for (i = 0; i < npages; ++i) 246 for (i = 0; i < npages; [all...] |
H A D | mthca_memfree.c | 68 pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages, 71 for (i = 0; i < chunk->npages; ++i) 80 for (i = 0; i < chunk->npages; ++i) { 136 struct mthca_icm *mthca_alloc_icm(struct mthca_dev *dev, int npages, argument 156 while (npages > 0) { 164 chunk->npages = 0; 169 while (1 << cur_order > npages) 174 &chunk->mem[chunk->npages], 177 ret = mthca_alloc_icm_pages(&chunk->mem[chunk->npages], 181 ++chunk->npages; 524 int npages; local [all...] |
/freebsd-11-stable/sys/fs/smbfs/ |
H A D | smbfs_io.c | 427 int i, error, nextoff, size, toff, npages, count; 452 npages = ap->a_count; 462 if (pages[npages - 1]->valid != 0 && --npages == 0) 472 pmap_qenter(kva, pages, npages); 474 PCPU_ADD(cnt.v_vnodepgsin, npages); 476 count = npages << PAGE_SHIFT; 489 pmap_qremove(kva, npages); 501 for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { 573 int i, npages, coun [all...] |
/freebsd-11-stable/sys/dev/mlx4/mlx4_ib/ |
H A D | mlx4_ib_mr.c | 466 int npages, u64 iova) 471 return mlx4_map_phys_fmr(dev->dev, &ifmr->mfmr, page_list, npages, iova, 528 if (unlikely(mr->npages == mr->max_pages)) 531 mr->pages[mr->npages++] = cpu_to_be64(addr | MLX4_MTT_FLAG_PRESENT); 542 mr->npages = 0; 570 int npages; local 593 npages = 0; 595 npages += (buffer_list[i].size + (1ULL << shift) - 1) >> shift; 597 if (!npages) 604 pages = kzalloc(sizeof(pages[0]) * npages, GFP_KERNE 465 mlx4_ib_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, int npages, u64 iova) argument [all...] |
/freebsd-11-stable/sys/dev/virtio/balloon/ |
H A D | virtio_balloon.c | 315 vtballoon_inflate(struct vtballoon_softc *sc, int npages) argument 323 if (npages > VTBALLOON_PAGES_PER_REQUEST) 324 npages = VTBALLOON_PAGES_PER_REQUEST; 326 for (i = 0; i < npages; i++) { 345 vtballoon_deflate(struct vtballoon_softc *sc, int npages) argument 355 if (npages > VTBALLOON_PAGES_PER_REQUEST) 356 npages = VTBALLOON_PAGES_PER_REQUEST; 358 for (i = 0; i < npages; i++) { 389 int npages) 399 npages * sizeo 388 vtballoon_send_page_frames(struct vtballoon_softc *sc, struct virtqueue *vq, int npages) argument [all...] |