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

1234

/freebsd-10.3-release/contrib/ofed/libmthca/src/
H A Dmemfree.c52 int npages; member in struct:mthca_db_table
81 start = db_tab->npages - 1;
173 int npages; local
176 npages = uarc_size / MTHCA_DB_REC_PAGE_SIZE;
178 npages * sizeof (struct mthca_db_page));
182 db_tab->npages = npages;
184 db_tab->min_group2 = npages - 1;
186 for (i = 0; i < npages; ++i)
199 for (i = 0; i < db_tab->npages;
[all...]
/freebsd-10.3-release/lib/libgeom/
H A Dgeom_stats.c47 static uint npages, pagesize, spp; variable
56 munmap(statp, npages *pagesize);
70 p = mmap(statp, (npages + 1) * pagesize,
76 npages++;
102 npages = 1;
126 sp->ptr = malloc(pagesize * npages);
131 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */
133 memset(sp->ptr, 0, pagesize * npages); /* page in, cache */
134 memcpy(sp->ptr, statp, pagesize * npages);
135 sp->pages = npages;
[all...]
/freebsd-10.3-release/sys/dev/mlx5/mlx5_core/
H A Dmlx5_pagealloc.c36 s32 npages; member in struct:mlx5_pages_req
133 s32 *npages, int boot)
150 *npages = MLX5_GET(query_pages_out, out, num_pages);
240 static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, argument
251 inlen = sizeof(*in) + npages * sizeof(in->pas[0]);
259 for (i = 0; i < npages; i++) {
276 in->num_entries = cpu_to_be32(npages);
279 mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n",
280 func_id, npages, err);
283 dev->priv.fw_pages += npages;
132 mlx5_cmd_query_pages(struct mlx5_core_dev *dev, u16 *func_id, s32 *npages, int boot) argument
317 reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages, int *nclaimed) argument
387 mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id, s32 npages) argument
[all...]
/freebsd-10.3-release/sys/dev/drm2/ttm/
H A Dttm_page_alloc.c64 * @npages: Number of pages in pool.
72 unsigned npages; member in struct:ttm_page_pool
333 static void ttm_pages_put(vm_page_t *pages, unsigned npages) argument
338 if (set_pages_array_wb(pages, npages))
339 printf("[TTM] Failed to set %d pages to wb!\n", npages);
340 for (i = 0; i < npages; ++i)
347 pool->npages -= freed_pages;
443 total += _manager->pools[i].npages;
624 && count > pool->npages) {
642 pool->npages
694 ttm_put_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
737 ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, enum ttm_caching_state cstate) argument
[all...]
/freebsd-10.3-release/sys/dev/cxgb/ulp/iw_cxgb/
H A Diw_cxgb_mem.c118 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-10.3-release/sys/vm/
H A Dvm_reserv.h49 u_long npages, vm_paddr_t low, vm_paddr_t high,
58 boolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low,
H A Dsg_pager.c72 vm_pindex_t npages, pindex; local
85 npages = 0;
91 npages += sg->sg_segs[i].ss_len / PAGE_SIZE;
100 if (pindex > npages)
111 object = vm_object_allocate(OBJT_SG, npages);
H A Dvm_phys.h73 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);
H A Dvm_phys.c366 u_long npages; local
376 npages = 0;
397 npages > VM_DMA32_NPAGES_THRESHOLD &&
404 npages += atop(seg->end - seg->start);
424 npages = 0;
429 seg->first_page = &vm_page_array[npages];
430 npages += atop(seg->end - seg->start);
818 vm_phys_free_contig(vm_page_t m, u_long npages) argument
828 for (;; npages -= n) {
839 if (npages <
988 vm_phys_alloc_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument
[all...]
H A Dvm_reserv.c301 * Allocates a contiguous set of physical pages of the given size "npages"
313 vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, u_long npages, argument
325 KASSERT(npages != 0, ("vm_reserv_alloc_contig: npages is 0"));
331 pindex + npages > object->size)
347 size = npages << PAGE_SHIFT;
386 minpages = VM_RESERV_INDEX(object, pindex) + npages;
462 n = ulmin(VM_LEVEL_0_NPAGES - index, npages);
465 npages -= n;
482 if (index + npages > VM_LEVEL_0_NPAGE
826 vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary) argument
[all...]
/freebsd-10.3-release/sys/ofed/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c198 int npages, shift; local
205 npages = 1;
219 npages *= 2;
222 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
226 for (i = 0; i < npages; ++i)
230 npages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
233 dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL);
237 buf->page_list = kmalloc(npages * sizeof *buf->page_list,
242 for (i = 0; i < npages; ++i)
245 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;
631 int npages; local
[all...]
/freebsd-10.3-release/lib/libusbhid/
H A Dusage.c55 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-10.3-release/sys/ofed/drivers/net/mlx4/
H A Dicm.c60 pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages,
63 for (i = 0; i < chunk->npages; ++i)
72 for (i = 0; i < chunk->npages; ++i)
127 struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, argument
151 while (npages > 0) {
164 chunk->npages = 0;
169 while (1 << cur_order > npages)
174 &chunk->mem[chunk->npages],
177 ret = mlx4_alloc_icm_pages(&chunk->mem[chunk->npages],
188 ++chunk->npages;
[all...]
H A Dmr.c197 int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, argument
202 if (!npages) {
209 for (mtt->order = 0, i = 1; i < npages; i <<= 1)
215 npages, mtt->order);
299 u64 iova, u64 size, u32 access, int npages,
309 return mlx4_mtt_init(dev, npages, page_shift, &mr->mtt);
409 int npages, int page_shift, struct mlx4_mr *mr)
419 access, npages, page_shift, mr);
532 int start_index, int npages, u64 *page_list)
546 npages * sizeo
298 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
408 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
531 mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
557 __mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
585 mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list) argument
804 mlx4_check_fmr(struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova) argument
831 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-10.3-release/usr.sbin/lpr/filters/
H A Dlpf.c69 static int npages = 1; variable
203 npages++;
211 npages++;
215 printf("%7.2f\t%s:%s\n", (float)npages, host, name);
/freebsd-10.3-release/sys/dev/sfxge/common/
H A Dmcdi_mon.c383 __out_ecount(npages) uint32_t *sensor_maskp,
384 __in size_t npages)
394 for (page = 0; page < npages; page++) {
415 if ((page != (npages - 1)) &&
423 if (sensor_maskp[npages - 1] & (1U << MC_CMD_SENSOR_PAGE0_NEXT)) {
473 uint32_t npages; local
498 npages = 0;
499 if ((rc = efx_mcdi_sensor_info_npages(enp, &npages)) != 0)
502 encp->enc_mon_stat_dma_buf_size = npages * EFX_MON_STATS_PAGE_SIZE;
503 encp->enc_mcdi_sensor_mask_size = npages * sizeo
381 efx_mcdi_sensor_info( __in efx_nic_t *enp, __out_ecount(npages) uint32_t *sensor_maskp, __in size_t npages) argument
[all...]
/freebsd-10.3-release/sys/kern/
H A Dsubr_mbpool.c89 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];
229 t->page = p->npages;
234 p->npages++;
306 for (i = 0; i < p->npages; i++) {
332 for (i = 0; i < p->npages; i++) {
H A Dkern_physio.c47 int error, i, npages, maxpages; local
154 if ((npages = vm_fault_quick_hold_pages(
163 pages, npages);
167 bp->bio_ma_n = npages;
182 pmap_qremove((vm_offset_t)sa, npages);
183 vm_page_unhold_pages(pages, npages);
/freebsd-10.3-release/sys/i386/include/xen/
H A Dxenvar.h104 int xen_create_contiguous_region(vm_page_t pages, int npages);
106 void xen_destroy_contiguous_region(void * addr, int npages);
/freebsd-10.3-release/sys/amd64/include/xen/
H A Dxenvar.h116 int xen_create_contiguous_region(vm_page_t pages, int npages);
118 void xen_destroy_contiguous_region(void * addr, int npages);
/freebsd-10.3-release/sys/dev/virtio/balloon/
H A Dvirtio_balloon.c315 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...]
/freebsd-10.3-release/sys/ofed/drivers/infiniband/core/
H A Dumem.c178 unsigned long npages; local
228 npages = PAGE_ALIGN(size + umem->offset) >> PAGE_SHIFT;
232 locked = npages + current->mm->locked_vm;
244 while (npages) {
246 min_t(unsigned long, npages,
254 npages -= ret;
318 vm_size_t npages;
334 npages = atop(end - start);
335 if (npages > vm_page_max_wired)
342 if (ptoa(npages
[all...]
/freebsd-10.3-release/sys/ofed/drivers/infiniband/hw/mlx4/
H A Dmr.c148 int *npages)
181 pages[*npages] = cur_start_addr + (mtt_size * k);
182 (*npages)++;
187 if (*npages == PAGE_SIZE / sizeof(u64)) {
190 *npages, pages);
194 (*start_index) += *npages;
195 *npages = 0;
214 int npages = 0; local
240 &npages);
259 &npages);
140 mlx4_ib_umem_write_mtt_block(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt, u64 mtt_size, u64 mtt_shift, u64 len, u64 cur_start_addr, u64 *pages, int *start_index, int *npages) argument
696 mlx4_ib_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, int npages, u64 iova) argument
[all...]
/freebsd-10.3-release/lib/libc/db/hash/
H A Dhash_buf.c300 int npages; local
303 npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT;
304 npages = MAX(npages, MIN_BUFFERS);
306 hashp->nbufs = npages;

Completed in 143 milliseconds

1234