Home
last modified time | relevance | path

Searched refs:npgs (Results 1 – 25 of 31) sorted by relevance

12

/netbsd-src/tests/lib/libc/sys/
H A Dt_mincore.c90 check_residency(void *addr, size_t npgs) in check_residency() argument
95 vec = malloc(npgs); in check_residency()
98 ATF_REQUIRE(mincore(addr, npgs * page, vec) == 0); in check_residency()
100 for (i = resident = 0; i < npgs; i++) { in check_residency()
155 size_t npgs = 0, resident; in ATF_TC_BODY() local
190 npgs = st.st_size / page; in ATF_TC_BODY()
193 npgs++; in ATF_TC_BODY()
195 (void)check_residency(addr, npgs); in ATF_TC_BODY()
197 rv = mlock(addr, npgs * page); in ATF_TC_BODY()
202 npgs = 128; in ATF_TC_BODY()
[all …]
/netbsd-src/sys/external/bsd/drm2/linux/
H A Dlinux_sgt.c44 sg_alloc_table(struct sg_table *sgt, unsigned npgs, gfp_t gfp) in sg_alloc_table() argument
47 sgt->sgl->sg_pgs = kcalloc(npgs, sizeof(sgt->sgl->sg_pgs[0]), gfp); in sg_alloc_table()
50 sgt->sgl->sg_npgs = sgt->nents = npgs; in sg_alloc_table()
58 unsigned npgs, bus_size_t offset, bus_size_t size, unsigned maxseg, in __sg_alloc_table_from_pages() argument
65 KASSERT(size == (bus_size_t)npgs << PAGE_SHIFT); in __sg_alloc_table_from_pages()
67 ret = sg_alloc_table(sgt, npgs, gfp); in __sg_alloc_table_from_pages()
71 for (i = 0; i < npgs; i++) in __sg_alloc_table_from_pages()
79 unsigned npgs, bus_size_t offset, bus_size_t size, gfp_t gfp) in sg_alloc_table_from_pages() argument
82 return __sg_alloc_table_from_pages(sgt, pgs, npgs, offset, size, in sg_alloc_table_from_pages()
90 int i, npgs = 0; in sg_alloc_table_from_bus_dmamem() local
[all …]
H A Dlinux_io_mapping.c118 bus_size_t pg, npgs = size >> PAGE_SHIFT; in io_mapping_map_wc() local
130 for (pg = 0; pg < npgs; pg++) { in io_mapping_map_wc()
/netbsd-src/regress/sys/uvm/pdsim/
H A Dlru.hs60 npgs::Int
61 npgs = read $ args !! 0 function
64 mapM_ print $ do_lru npgs pgs
H A Drand.hs65 npgs::Int
66 npgs = read $ args !! 0 function
69 mapM_ print $ do_rand npgs pgs
H A Dopt.hs66 npgs::Int
67 npgs = read $ args !! 0 function
70 mapM_ print $ do_opt npgs pgs
H A Dlfu.hs77 npgs::Int
78 npgs = read $ args !! 0 function
81 mapM_ print $ do_lfu npgs pgs
H A Dnbsd.hs146 npgs::Int
147 npgs = read $ args !! 0 function
151 mapM_ print $ do_nbsd npgs pct pgs
/netbsd-src/sys/external/bsd/drm2/include/drm/
H A Dbus_dma_hacks.h203 int nsegs, struct page **pgs, unsigned npgs) in bus_dmamem_export_pages() argument
216 KASSERT(pg < npgs); in bus_dmamem_export_pages()
225 KASSERT(pg == npgs); in bus_dmamem_export_pages()
232 int nsegs, int *rsegs, struct page *const *pgs, unsigned npgs) in bus_dmamem_import_pages() argument
238 for (i = 0; i < npgs; i++) { in bus_dmamem_import_pages()
/netbsd-src/sys/arch/vax/vax/
H A Dvm_machdep.c205 ioaccess(vaddr_t vaddr, paddr_t paddr, size_t npgs) in ioaccess() argument
210 for (i = 0; i < npgs; i++) in ioaccess()
218 iounaccess(vaddr_t vaddr, size_t npgs) in iounaccess() argument
223 for (i = 0; i < npgs; i++) in iounaccess()
/netbsd-src/sys/kern/
H A Dsubr_physmap.c187 physmap_create_pagelist(struct vm_page **pgs, size_t npgs) in physmap_create_pagelist() argument
189 physmap_t * const map = physmap_alloc(npgs); in physmap_create_pagelist()
200 for (pgs++; npgs-- > 1; pgs++) { in physmap_create_pagelist()
H A Duipc_socket.c255 int npgs; in sodoloanfree()
262 npgs = len >> PAGE_SHIFT; in sodoloanfree()
266 uvm_unloan(pgs, npgs, UVM_LOAN_TOPAGE);
338 int npgs, error; in sosend_loan()
353 npgs = len >> PAGE_SHIFT; in sosend_loan()
355 KASSERT(npgs <= M_EXT_MAXPAGES); in sosend_loan()
368 for (i = 0, va = lva; i < npgs; i++, va += PAGE_SIZE) in sosend_loan()
252 int npgs; sodoloanfree() local
335 int npgs, error; sosend_loan() local
/netbsd-src/sys/arch/ia64/ia64/
H A Dpmap.c1318 int npgs; in pmap_steal_memory() local
1324 npgs = atop(size); in pmap_steal_memory()
1337 < npgs) in pmap_steal_memory()
1344 uvm_physseg_unplug(atop(pa), npgs); in pmap_steal_memory()
1348 pmap_pages_stolen += npgs; in pmap_steal_memory()
1368 int npgs; in pmap_steal_vhpt_memory() local
1375 npgs = atop(size); in pmap_steal_vhpt_memory()
1392 end1 = vhpt_start = roundup(start1, npgs); in pmap_steal_vhpt_memory()
1394 start2 = vhpt_start + npgs; in pmap_steal_vhpt_memory()
1466 pmap_pages_stolen += npgs; in pmap_steal_vhpt_memory()
[all...]
/netbsd-src/sys/uvm/
H A Duvm_mmap.c137 size_t npgs; in sys_mincore() local
157 npgs = len >> PAGE_SHIFT; in sys_mincore()
158 error = uvm_vslock(p->p_vmspace, vec, npgs, VM_PROT_WRITE); in sys_mincore()
249 uvm_vsunlock(p->p_vmspace, SCARG(uap, vec), npgs); in sys_mincore()
/netbsd-src/sys/uvm/pmap/
H A Dpmap.c568 size_t npgs; in pmap_steal_memory() local
575 npgs = atop(size); in pmap_steal_memory()
577 DPRINTF("%s: need %zu pages\n", __func__, npgs); in pmap_steal_memory()
597 if (uvm_physseg_get_avail_end(bank) - uvm_physseg_get_avail_start(bank) < npgs) { in pmap_steal_memory()
599 __func__, bank, npgs); in pmap_steal_memory()
603 if (!pmap_md_ok_to_steal_p(bank, npgs)) { in pmap_steal_memory()
625 uvm_physseg_unplug(atop(pa), npgs); in pmap_steal_memory()
628 __func__, bank, npgs, VM_PHYSMEM_SPACE(bank)); in pmap_steal_memory()
638 panic("pmap_steal_memory: no memory to steal %zu pages", npgs); in pmap_steal_memory()
/netbsd-src/sys/arch/powerpc/ibm4xx/
H A Dpmap.c142 static int npgs; variable
381 npgs += btoc(sz); in pmap_bootstrap()
411 npgs -= btoc(sz); in pmap_bootstrap()
471 sz = (vsize_t)((sizeof(struct pv_entry) + 1) * npgs); in pmap_init()
478 for (i = npgs; --i >= 0;) in pmap_init()
481 memset(pv, 0, npgs); in pmap_init()
/netbsd-src/sys/external/bsd/drm2/dist/drm/i915/gt/
H A Dgen6_ppgtt.c350 bus_size_t npgs = vma->size >> PAGE_SHIFT; in pd_vma_bind() local
351 bus_size_t gtt_nbytes = npgs * sizeof(gen6_pte_t); in pd_vma_bind()
361 (uint64_t)vma->size, (uint64_t)npgs, in pd_vma_bind()
H A Dintel_reset.c717 vsize_t npgs = vma->size >> PAGE_SHIFT; in revoke_mmaps() local
718 while (npgs --> 0) in revoke_mmaps()
719 pmap_pv_protect(pa + (npgs << PAGE_SHIFT), in revoke_mmaps()
/netbsd-src/sys/arch/powerpc/include/booke/
H A Dpmap.h153 pmap_md_ok_to_steal_p(const uvm_physseg_t bank, size_t npgs) in pmap_md_ok_to_steal_p() argument
/netbsd-src/sys/arch/mips/mips/
H A Dpmap_machdep.c325 pmap_md_ok_to_steal_p(const uvm_physseg_t bank, size_t npgs) in pmap_md_ok_to_steal_p() argument
328 if (uvm_physseg_get_avail_start(bank) + npgs >= atop(MIPS_PHYS_MASK + 1)) { in pmap_md_ok_to_steal_p()
330 __func__, npgs); in pmap_md_ok_to_steal_p()
/netbsd-src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/
H A Dvchiq_2835_arm.c372 int npgs = ((off + len + VCPAGE_OFFSET) >> VCPAGE_SHIFT); in vchiq_prepare_bulk_data() local
375 pagelist->addrs[i] |= npgs - 1; in vchiq_prepare_bulk_data()
/netbsd-src/sys/rump/librump/rumpkern/
H A Dvm.c688 uvm_page_unbusy(struct vm_page **pgs, int npgs) in uvm_page_unbusy() argument
693 KASSERT(npgs > 0); in uvm_page_unbusy()
696 for (i = 0; i < npgs; i++) { in uvm_page_unbusy()
/netbsd-src/sys/arch/alpha/alpha/
H A Dpmap.c1490 int npgs; in pmap_steal_memory() local
1497 npgs = atop(size); in pmap_steal_memory()
1500 printf("PSM: size 0x%lx (npgs 0x%x)\n", size, npgs); in pmap_steal_memory()
1525 < npgs) in pmap_steal_memory()
1532 uvm_physseg_unplug(atop(pa), npgs); in pmap_steal_memory()
1536 pmap_pages_stolen += npgs; in pmap_steal_memory()
/netbsd-src/sys/arch/powerpc/oea/
H A Dpmap.c2937 int npgs, freelist; in pmap_steal_memory() local
2947 npgs = atop(size); in pmap_steal_memory()
2963 (end - start) >= npgs) { in pmap_steal_memory()
2972 uvm_physseg_unplug(start, npgs); in pmap_steal_memory()
2976 pmap_pages_stolen += npgs; in pmap_steal_memory()
2978 if (pmapdebug && npgs > 1) { in pmap_steal_memory()
2986 npgs, pmap_pages_stolen, cnt); in pmap_steal_memory()
/netbsd-src/sys/arch/riscv/riscv/
H A Dpmap_machdep.c161 pmap_md_ok_to_steal_p(const uvm_physseg_t bank, size_t npgs) in pmap_md_ok_to_steal_p() argument

12