Searched refs:npages (Results 1 - 25 of 110) sorted by relevance

12345

/freebsd-13-stable/contrib/mandoc/
H A Ddba_read.c43 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 Ddbm.c69 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-13-stable/sys/vm/
H A Dvm_phys.h62 vm_page_t vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low,
66 int vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]);
69 void vm_phys_enqueue_contig(vm_page_t m, u_long npages);
74 void vm_phys_free_contig(vm_page_t m, u_long npages);
80 vm_page_t vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low,
H A Dvm_reserv.h51 int domain, int req, vm_page_t mpred, u_long npages,
62 bool vm_reserv_reclaim_contig(int domain, u_long npages,
H A Dvm_phys.c176 u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment,
492 u_long npages; local
502 npages = 0;
518 npages > VM_DMA32_NPAGES_THRESHOLD &&
525 npages += atop(seg->end - seg->start);
545 npages = 0;
550 seg->first_page = &vm_page_array[npages];
551 npages += atop(seg->end - seg->start);
678 * Add the physical pages [m, m + npages) at the end of a power-of-two aligned
690 vm_phys_enq_range(vm_page_t m, u_int npages, struc argument
727 vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) argument
1148 vm_phys_enqueue_contig(vm_page_t m, u_long npages) argument
1197 vm_phys_free_contig(vm_page_t m, u_long npages) argument
1236 vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options) argument
1363 vm_phys_alloc_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument
1407 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-13-stable/lib/libgeom/
H A Dgeom_stats.c50 static uint npages, spp; variable
59 munmap(statp, npages * pagesize);
78 munmap(statp, npages * pagesize);
84 npages = mediasize / pagesize;
110 npages = 1;
134 sp->ptr = malloc(pagesize * npages);
139 explicit_bzero(sp->ptr, pagesize * npages); /* page in, cache */
141 memcpy(sp->ptr, statp, pagesize * npages);
142 sp->pages = npages;
/freebsd-13-stable/sys/dev/mlx5/mlx5_core/
H A Dmlx5_pagealloc.c39 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 Dmlx5_alloc.c77 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-13-stable/contrib/netbsd-tests/sys/uvm/
H A Dt_uvm_physseg.c281 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-13-stable/sys/dev/drm2/ttm/
H A Dttm_page_alloc.c65 * @npages: Number of pages in pool.
73 unsigned npages; member in struct:ttm_page_pool
330 static void ttm_pages_put(vm_page_t *pages, unsigned npages) argument
335 if (set_pages_array_wb(pages, npages))
336 printf("[TTM] Failed to set %d pages to wb!\n", npages);
337 for (i = 0; i < npages; ++i)
344 pool->npages -= freed_pages;
440 total += _manager->pools[i].npages;
621 && count > pool->npages) {
639 pool->npages
691 ttm_put_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
734 ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
[all...]
/freebsd-13-stable/sys/ofed/drivers/infiniband/core/
H A Dib_umem.c64 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-13-stable/lib/libusbhid/
H A Dusage.c57 static int npages, npagesmax; variable
65 for (i = 0; i < npages; i++) {
128 if (npages >= npagesmax) {
142 curpage = &pages[npages++];
169 for (k = 0; k < npages; k++)
184 for (k = 0; k < npages; k++)
187 if (k >= npages)
213 for (k = 0; k < npages; k++)
231 for (k = 0; k < npages; k++)
/freebsd-13-stable/sys/dev/mlx4/mlx4_core/
H A Dmlx4_icm.c60 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 Dmlx4_mr.c200 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-13-stable/usr.sbin/lpr/filters/
H A Dlpf.c71 static int npages = 1; variable
205 npages++;
213 npages++;
217 printf("%7.2f\t%s:%s\n", (float)npages, host, name);
/freebsd-13-stable/sys/dev/virtio/balloon/
H A Dvirtio_balloon.c337 vtballoon_inflate(struct vtballoon_softc *sc, int npages) argument
345 if (npages > VTBALLOON_PAGES_PER_REQUEST)
346 npages = VTBALLOON_PAGES_PER_REQUEST;
348 for (i = 0; i < npages; i++) {
367 vtballoon_deflate(struct vtballoon_softc *sc, int npages) argument
377 if (npages > VTBALLOON_PAGES_PER_REQUEST)
378 npages = VTBALLOON_PAGES_PER_REQUEST;
380 for (i = 0; i < npages; i++) {
411 int npages)
421 npages * sizeo
410 vtballoon_send_page_frames(struct vtballoon_softc *sc, struct virtqueue *vq, int npages) argument
496 uint32_t npages; local
[all...]
/freebsd-13-stable/sys/dev/mthca/
H A Dmthca_allocator.c199 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 Dmthca_memfree.c68 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-13-stable/sys/arm/nvidia/drm2/
H A Dtegra_bo.c62 pmap_qremove(bo->vbase, bo->npages);
65 for (i = 0; i < bo->npages; i++) {
96 tegra_bo_alloc_contig(size_t npages, u_long alignment, vm_memattr_t memattr, argument
110 m = vm_page_alloc_contig(NULL, 0, pflags, npages, low, high, alignment,
114 if (!vm_page_reclaim_contig(pflags, npages, low, high,
123 for (i = 0; i < npages; i++, m++) {
148 for (i = 0; i < bo->npages; i++) {
168 pmap_qenter(bo->vbase, bo->m, bo->npages);
181 bo->npages = atop(size);
182 bo->m = malloc(sizeof(vm_page_t *) * bo->npages, DRM_MEM_DRIVE
[all...]
/freebsd-13-stable/sys/kern/
H A Dkern_sendfile.c91 int npages; member in struct:sf_io
326 for (i = 1; i < sfio->npages; i++) {
383 mb_free_notready(sfio->m, sfio->npages);
395 ktls_enqueue(sfio->m, so, sfio->npages);
400 sfio->npages);
419 int a, count, count1, grabbed, i, j, npages, rv; local
422 npages = sfio->npages;
432 VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages);
433 if (grabbed < npages) {
764 int nios, space, npages, rhpages; local
[all...]
H A Dkern_physio.c53 int error, i, npages, maxpages; local
57 npages = 0;
157 if ((npages = vm_fault_quick_hold_pages(
167 pages, npages);
171 bp->bio_ma_n = npages;
187 pmap_qremove((vm_offset_t)sa, npages);
188 vm_page_unhold_pages(pages, npages);
/freebsd-13-stable/sys/dev/mlx5/mlx5_ib/
H A Dmlx5_ib_mr.c158 int npages = 1 << ent->order; local
189 MLX5_SET(mkc, mkc, translations_octword_size, (npages + 1) / 2);
533 int npages; local
536 npages = ALIGN(len + offset, page_size) >> ilog2(page_size);
537 return (npages + 1) / 2;
546 int npages, int page_shift, int *size,
557 *size = ALIGN(sizeof(u64) * npages, MLX5_UMR_MTT_ALIGNMENT);
565 memset(pas + npages, 0, *size - npages * sizeof(u64));
596 umrwr->npages
545 dma_map_mr_pas(struct mlx5_ib_dev *dev, struct ib_umem *umem, int npages, int page_shift, int *size, __be64 **mr_pas, dma_addr_t *dma) argument
628 mr_umem_get(struct ib_pd *pd, u64 start, u64 length, int access_flags, int *npages, int *page_shift, int *ncont, int *order) argument
669 reg_umr(struct ib_pd *pd, struct ib_umem *umem, u64 virt_addr, u64 len, int npages, int page_shift, int order, int access_flags) argument
748 mlx5_ib_update_mtt(struct mlx5_ib_mr *mr, u64 start_page_index, int npages, int zap) argument
874 reg_create(struct ib_mr *ibmr, struct ib_pd *pd, u64 virt_addr, u64 length, struct ib_umem *umem, int npages, int page_shift, int access_flags) argument
950 set_mr_fileds(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr, int npages, u64 length, int access_flags) argument
969 int npages; local
1061 rereg_umr(struct ib_pd *pd, struct mlx5_ib_mr *mr, u64 virt_addr, u64 length, int npages, int page_shift, int order, int access_flags, int flags) argument
1142 int npages = 0; local
1315 int npages = mr->npages; local
[all...]
/freebsd-13-stable/sys/fs/smbfs/
H A Dsmbfs_io.c426 int i, error, nextoff, size, toff, npages, count;
451 npages = ap->a_count;
461 if (!vm_page_none_valid(pages[npages - 1]) && --npages == 0)
471 pmap_qenter(kva, pages, npages);
473 VM_CNT_ADD(v_vnodepgsin, npages);
475 count = npages << PAGE_SHIFT;
488 pmap_qremove(kva, npages);
500 for (i = 0, toff = 0; i < npages; i++, toff = nextoff) {
572 int i, npages, coun
[all...]
/freebsd-13-stable/sys/amd64/sgx/
H A Dsgxvar.h83 uint32_t npages; member in struct:sgx_softc
/freebsd-13-stable/sys/compat/linuxkpi/common/src/
H A Dlinux_page.c94 unsigned long npages = 1UL << order; local
108 npages, 0, pmax, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT);
113 npages, 0, pmax, PAGE_SIZE, 0)) {
125 for (x = 0; x != npages; x++) {
152 unsigned long npages = 1UL << order; local
155 for (x = 0; x != npages; x++) {

Completed in 316 milliseconds

12345