/illumos-gate/usr/src/uts/sun4/io/px/ |
H A D | px_fdvma.c | 59 size_t npages, pg_index; in px_fdvma_load() local 63 npages = MMU_BTOPR(len + offset); in px_fdvma_load() 64 if (!npages) in px_fdvma_load() 73 index, npages); in px_fdvma_load() 76 fdvma_p->pagecnt[index] = npages; in px_fdvma_load() 137 size_t npages; in px_fdvma_reserve() local 159 npages = dmareq->dmar_object.dmao_size; in px_fdvma_reserve() 202 mp->dmai_ndvmapages = npages; in px_fdvma_reserve() 229 size_t npages; in px_fdvma_release() local 244 npages = mp->dmai_ndvmapages; in px_fdvma_release() [all …]
|
H A D | px_mmu.c | 178 size_t npages, size_t pfn_index) in px_mmu_map_pages() argument 184 ASSERT(npages <= mp->dmai_ndvmapages); in px_mmu_map_pages() 189 if (px_lib_iommu_map(dip, PCI_TSBID(0, pg_index), npages, in px_mmu_map_pages() 202 pg_index + npages); in px_mmu_map_pages() 229 uint_t npages) in px_mmu_unmap_pages() argument 236 (uint_t)npages); in px_mmu_unmap_pages() 239 PCI_TSBID(0, pg_index), npages) != DDI_SUCCESS) { in px_mmu_unmap_pages() 248 "redzone pg=%x\n", pg_index + npages); in px_mmu_unmap_pages() 253 PCI_TSBID(0, pg_index + npages), 1) != DDI_SUCCESS) { in px_mmu_unmap_pages() 306 uint_t npages = MMU_BTOP(mp->dmai_winsize); in px_mmu_unmap_window() local [all …]
|
H A D | px_dma.c | 149 size_t npages = mp->dmai_ndvmapages; in px_dma_freepfn() local 150 if (npages > 1) in px_dma_freepfn() 483 pplist, npages); in px_dma_pgpfn() 484 for (i = 1; i < npages; i++) { in px_dma_pgpfn() 554 uint32_t npages = mp->dmai_ndvmapages; in px_dma_pfn() local 570 if (npages == 1) { in px_dma_pfn() 589 for (i = 1; i < npages; i++) { in px_dma_pfn() 783 uint_t npages = PX_DMA_WINNPGS(mp); in px_dvma_map() local 885 MMU_PTOB(npages)); in px_dvma_unmap() 1130 uint_t npages = mp->dmai_ndvmapages; in px_dma_physwin() local [all …]
|
/illumos-gate/usr/src/uts/sun4u/io/pci/ |
H A D | pci_fdvma.c | 60 size_t npages, pg_index; in pci_fdvma_load() local 66 npages = IOMMU_BTOPR(len + offset); in pci_fdvma_load() 67 if (!npages) in pci_fdvma_load() 76 index, npages); in pci_fdvma_load() 118 fdvma_p->pagecnt[index] = npages; in pci_fdvma_load() 184 size_t npages; in pci_fdvma_reserve() local 206 npages = dmareq->dmar_object.dmao_size; in pci_fdvma_reserve() 208 -npages) < 0) { in pci_fdvma_reserve() 258 mp->dmai_ndvmapages = npages; in pci_fdvma_reserve() 274 size_t npages; in pci_fdvma_release() local [all …]
|
H A D | pci_iommu.c | 263 dvma_addr_t dvma_pg, size_t npages, size_t pfn_index) in iommu_map_pages() argument 268 size_t pfn_last = pfn_index + npages; in iommu_map_pages() 279 (uint_t)npages, (uint_t)pfn_index); in iommu_map_pages() 349 for (; npages; npages--, dvma_pg++, pg_index++) { in iommu_unmap_pages() 360 size_t npages, size_t pfn_index) in iommu_remap_pages() argument 362 iommu_unmap_pages(iommu_p, dvma_pg, npages); in iommu_remap_pages() 363 iommu_map_pages(iommu_p, mp, dvma_pg, npages, pfn_index); in iommu_remap_pages() 383 uint_t npages = IOMMU_BTOP(mp->dmai_winsize); in iommu_unmap_window() local 391 DEBUG2(DBG_UNMAP_WIN, dip, "mp=%p %x pfns:", mp, npages); in iommu_unmap_window() 394 for (; npages; npages--, pg_index++) { in iommu_unmap_window() [all …]
|
H A D | pci_dma.c | 330 size_t npages = mp->dmai_ndvmapages; in pci_dma_freepfn() local 331 if (npages > 1) in pci_dma_freepfn() 663 pplist, npages); in pci_dma_pgpfn() 664 for (i = 1; i < npages; i++) { in pci_dma_pgpfn() 702 uint_t npages) in pci_dma_vapfn() argument 777 if (npages == 1) { in pci_dma_pfn() 796 for (i = 1; i < npages; i++) { in pci_dma_pfn() 960 if (npages == 1) in pci_dvma_map_fast() 989 uint_t npages = PCI_DMA_WINNPGS(mp); in pci_dvma_map() local 1056 size_t npages; in pci_dvma_unmap() local [all …]
|
/illumos-gate/usr/src/lib/cfgadm_plugins/ac/common/ |
H A D | mema_test.c | 136 long npages, pageno; in memory_test_normal() local 171 ((pageno + 1) * 100) / npages); in memory_test_normal() 212 ((npages - pageno) * 100) / npages); in memory_test_normal() 291 long npages, pageno; in memory_test_quick() local 326 ((pageno + 1) * 100) / npages); in memory_test_quick() 368 ((npages - pageno) * 100) / npages); in memory_test_quick() 400 ((pageno + 1) * 100) / npages); in memory_test_quick() 419 long npages, pageno; in memory_test_extended() local 458 ((pageno + 1) * 100) / npages); in memory_test_extended() 563 ml_rd_cmp_msg, ((npages - pageno) * 100) / npages); in memory_test_extended() [all …]
|
/illumos-gate/usr/src/uts/i86pc/io/gfx_private/ |
H A D | gfxp_vm.c | 89 pgcnt_t npages; in gfxp_map_kernel_space() local 116 npages = btopr(size + pgoffset); in gfxp_map_kernel_space() 142 pgcnt_t npages; in gfxp_unmap_kernel_space() local 149 npages = btopr(size + pgoffset); in gfxp_unmap_kernel_space() 271 pgcnt_t npages; in gfxp_alloc_kernel_space() local 273 npages = btopr(size); in gfxp_alloc_kernel_space() 288 pgcnt_t npages; in gfxp_free_kernel_space() local 295 npages = btopr(size + pgoffset); in gfxp_free_kernel_space() 309 pgcnt_t npages; in gfxp_load_kernel_space() local 336 npages = btopr(size + pgoffset); in gfxp_load_kernel_space() [all …]
|
/illumos-gate/usr/src/uts/sun4u/io/ |
H A D | iommu.c | 360 pgcnt_t npages; in iommu_remove_mappings() local 408 npages--; in iommu_remove_mappings() 468 iomemp->npages = npages; in iommu_create_vaddr_mappings() 542 npages--; in iommu_create_vaddr_mappings() 614 iomemp->npages = npages; in iommu_create_pp_mappings() 653 npages--; in iommu_create_pp_mappings() 1033 iomemp->npages = npages; in iommu_dma_bindhdl() 1445 npages--; in iommu_dma_mctl() 1501 int npages; in iommu_dvma_kaddr_load() local 1531 iomemp->npages = npages; in iommu_dvma_kaddr_load() [all …]
|
H A D | iocache.c | 160 sync_stream_buf(struct sbus_soft_state *softsp, ioaddr_t addr, uint_t npages, in sync_stream_buf() argument 173 "0x%x, sync flag 0x%p, sync flag pf 0x%lx\n", addr, npages, in sync_stream_buf() 176 ASSERT(npages > (uint_t)0); in sync_stream_buf() 183 if (npages > stream_buf_sync_using_diag) { in sync_stream_buf() 188 uint_t hiaddr = addr + (npages * IOMMU_PAGESIZE); in sync_stream_buf() 214 addr + (npages * IOMMU_PAGESIZE))); in sync_stream_buf() 231 npages--; in sync_stream_buf() 232 } while (npages > (uint_t)0); in sync_stream_buf()
|
/illumos-gate/usr/src/uts/common/io/usb/hcd/xhci/ |
H A D | xhci_context.c | 33 int i, npages; in xhci_scratchpad_fini() local 34 npages = xhcip->xhci_caps.xcap_max_scratch; in xhci_scratchpad_fini() 35 for (i = 0; i < npages; i++) { in xhci_scratchpad_fini() 39 sizeof (xhci_dma_buffer_t) * npages); in xhci_scratchpad_fini() 57 int npages, i; in xhci_scratchpad_alloc() local 66 npages = xhcip->xhci_caps.xcap_max_scratch; in xhci_scratchpad_alloc() 71 B_TRUE, sizeof (uint64_t) * npages, B_FALSE) == B_FALSE) { in xhci_scratchpad_alloc() 89 for (i = 0; i < npages; i++) { in xhci_scratchpad_alloc() 164 int i, npages; in xhci_context_init() local 176 npages = xhcip->xhci_caps.xcap_max_scratch; in xhci_context_init() [all …]
|
/illumos-gate/usr/src/uts/common/vm/ |
H A D | seg_spt.c | 424 pgcnt_t npages; in segspt_shmincore() local 458 npages = btopr(len); in segspt_shmincore() 633 npages = new_npgs; in segspt_create() 764 pgcnt_t npages; in segspt_free_pages() local 782 npages = btop(len); in segspt_free_pages() 1002 npages = btopr(len); in segspt_dismpagelock() 1362 npages = btopr(len); in segspt_shmpagelock() 1599 ASSERT(npages); in segspt_reclaim() 1735 pgcnt_t npages; in segspt_softunlock() local 1977 pgcnt_t npages; in segspt_dismfault() local [all …]
|
H A D | vm_anon.c | 522 ASSERT((npages <= sahp->size) && (npages <= dahp->size)); in anon_copy_ptr() 1343 spgcnt_t npages; in anon_dup() local 1357 npages -= off; in anon_dup() 1371 npages--; in anon_dup() 1395 spgcnt_t npages; in anon_dup_fill_holes() local 1429 npages -= off; in anon_dup_fill_holes() 1506 spgcnt_t npages; in anon_fill_cow_holes() local 1537 npages -= off; in anon_fill_cow_holes() 1592 spgcnt_t npages; in anon_free() local 1614 npages--; in anon_free() [all …]
|
H A D | vm_seg.c | 533 pgcnt_t npages = 0; in seg_pinactive() local 625 npages = btop(len); in seg_pinactive() 716 if (npages) { in seg_pinactive() 806 pgcnt_t npages; in seg_pinsert() local 829 npages = btop(len); in seg_pinsert() 909 npages = 0; in seg_pinsert() 919 if (npages) { in seg_pinsert() 942 pgcnt_t npages = 0; in seg_ppurge_async() local 1179 if (npages) { in seg_ppurge_async() 1199 pgcnt_t npages = 0; in seg_ppurge_wiredpp() local [all …]
|
H A D | vm_page.c | 532 freemem += npages; in page_free_large_ctr() 542 npages -= lump; in page_free_large_ctr() 545 npages = 0; in page_free_large_ctr() 1656 freemem += npages; in page_create_putback() 1669 npages -= lump; in page_create_putback() 1672 npages = 0; in page_create_putback() 2150 pgcnt_t npages; in page_create_va_large() local 2253 while (npages--) { in page_create_va_large() 2276 pgcnt_t npages; in page_create_va() local 5590 pgcnt_t npages) in page_migrate() argument [all …]
|
H A D | seg_kmem.c | 453 pgcnt_t npages; in segkmem_fault() local 474 npages = btopr(size); in segkmem_fault() 504 while (npages--) { in segkmem_fault() 697 pgcnt_t npages; in segkmem_pagelock() local 711 npages = btopr(len); in segkmem_pagelock() 875 pgcnt_t npages = btopr(size); in segkmem_xalloc() local 893 page_unresv(npages); in segkmem_xalloc() 1000 pgcnt_t npages = btopr(size); in segkmem_xfree() local 1043 page_unresv(npages); in segkmem_xfree() 1221 page_unresv(npages); in segkmem_xalloc_lp() [all …]
|
/illumos-gate/usr/src/uts/i86pc/os/ |
H A D | mp_implfuncs.c | 211 pgcnt_t npages; in psm_map_phys_new() local 232 npages = mmu_btopr(len + pgoffset); in psm_map_phys_new() 233 cvaddr = device_arena_alloc(ptob(npages), VM_NOSLEEP); in psm_map_phys_new() 246 pgcnt_t npages; in psm_unmap_phys() local 253 npages = mmu_btopr(len + pgoffset); in psm_unmap_phys() 254 hat_unload(kas.a_hat, base, ptob(npages), HAT_UNLOAD_UNLOCK); in psm_unmap_phys() 255 device_arena_free(base, ptob(npages)); in psm_unmap_phys() 290 pgcnt_t npages; in psm_unmap() local 297 npages = mmu_btopr(len + pgoffset); in psm_unmap() 298 hat_unload(kas.a_hat, base, ptob(npages), HAT_UNLOAD_UNLOCK); in psm_unmap() [all …]
|
/illumos-gate/usr/src/cmd/mandoc/ |
H A D | dba_read.c | 45 int32_t im, ip, iv, npages; in dba_read() local 49 npages = dbm_page_count(); in dba_read() 50 dba = dba_new(npages < 128 ? 128 : npages); in dba_read() 51 for (ip = 0; ip < npages; ip++) { in dba_read()
|
H A D | dbm.c | 69 static int32_t npages; variable 94 if ((npages = be32toh(*dbm_getint(4))) < 0) { in dbm_open() 96 fname, npages); in dbm_open() 139 return npages; in dbm_page_count() 151 assert(ip < npages); in dbm_page_get() 265 ip = npages; in page_bytitle() 273 while (ip < npages) { in page_bytitle() 289 if (ip == npages) { in page_bytitle() 303 if (++ip < npages) { in page_bytitle() 331 for ( ; ip < npages; ip++) in page_byarch()
|
/illumos-gate/usr/src/uts/sun4v/io/ |
H A D | ldc_shm.c | 358 pgcnt_t npages; in i_ldc_mem_bind_handle() local 470 npages = ((len+v_offset)%pg_size == 0) ? npages : npages+1; in i_ldc_mem_bind_handle() 479 if (npages > mtbl->num_avail) { in i_ldc_mem_bind_handle() 497 ldcp->id, npages); in i_ldc_mem_bind_handle() 544 for (i = 0; i < npages; i++) { in i_ldc_mem_bind_handle() 649 memseg->npages = npages; in i_ldc_mem_bind_handle() 872 pgcnt_t npages; in ldc_mem_copy() local 939 npages = ((len+local_voff)%pg_size == 0) ? npages : npages+1; in ldc_mem_copy() 1097 pgcnt_t npages; in ldc_mem_rdwr_cookie() local 1143 npages = ((len + local_voff) % pg_size == 0) ? npages : npages+1; in ldc_mem_rdwr_cookie() [all …]
|
/illumos-gate/usr/src/uts/sun4/vm/ |
H A D | sfmmu.c | 756 calc_tsb_sizes(pgcnt_t npages) in calc_tsb_sizes() argument 758 PRM_DEBUG(npages); in calc_tsb_sizes() 760 if (npages <= TSB_FREEMEM_MIN) { in calc_tsb_sizes() 774 ktsb_szcode = highbit(npages - 1); in calc_tsb_sizes() 817 calc_tsb_sizes(npages); in ndata_alloc_tsbs() 851 calc_hmehash_sz(pgcnt_t npages) in calc_hmehash_sz() argument 1122 pgcnt_t npages = btopr(size); in sfmmu_tsb_xalloc() local 1146 page_unresv(npages); in sfmmu_tsb_xalloc() 1206 pgcnt_t npages = btopr(size); in sfmmu_tsb_segkmem_free() local 1207 pgcnt_t pgs_left = npages; in sfmmu_tsb_segkmem_free() [all …]
|
/illumos-gate/usr/src/uts/common/io/mlxcx/ |
H A D | mlxcx_intr.c | 447 npages = MIN(npages, MLXCX_MANAGE_PAGES_MAX_PAGES); in mlxcx_give_pages_once() 451 for (i = 0; i < npages; i++) { in mlxcx_give_pages_once() 458 npages); in mlxcx_give_pages_once() 472 "pages!", npages); in mlxcx_give_pages_once() 477 for (i = 0; i < npages; i++) { in mlxcx_give_pages_once() 480 mlxp->mlx_npages += npages; in mlxcx_give_pages_once() 488 for (i = 0; i < npages; i++) { in mlxcx_give_pages_once() 550 int32_t npages; in mlxcx_pages_task() local 561 npages = param->mla_pages.mlp_npages; in mlxcx_pages_task() 574 if (npages > 0) { in mlxcx_pages_task() [all …]
|
/illumos-gate/usr/src/psm/stand/cpr/sparcv9/sun4u/ |
H A D | pages.c | 280 int npages, compressed, regular; in cb_restore_kpages() local 288 npages = compressed = regular = 0; in cb_restore_kpages() 289 while (npages < sfile.kpages) { in cb_restore_kpages() 298 npages += desc.cpd_pages; in cb_restore_kpages() 326 str, sfile.kpages, npages, compressed, regular); in cb_restore_kpages() 331 if (npages != sfile.kpages) { in cb_restore_kpages() 333 str, sfile.kpages, npages); in cb_restore_kpages()
|
/illumos-gate/usr/src/uts/common/io/sfxge/common/ |
H A D | mcdi_mon.c | 382 __out_ecount(npages) uint32_t *sensor_maskp, in efx_mcdi_sensor_info() 383 __in size_t npages) in efx_mcdi_sensor_info() argument 393 for (page = 0; page < npages; page++) { in efx_mcdi_sensor_info() 414 if ((page != (npages - 1)) && in efx_mcdi_sensor_info() 422 if (sensor_maskp[npages - 1] & (1U << MC_CMD_SENSOR_PAGE0_NEXT)) { in efx_mcdi_sensor_info() 472 uint32_t npages; in mcdi_mon_cfg_build() local 497 npages = 0; in mcdi_mon_cfg_build() 498 if ((rc = efx_mcdi_sensor_info_npages(enp, &npages)) != 0) in mcdi_mon_cfg_build() 501 encp->enc_mon_stat_dma_buf_size = npages * EFX_MON_STATS_PAGE_SIZE; in mcdi_mon_cfg_build() 502 encp->enc_mcdi_sensor_mask_size = npages * sizeof (uint32_t); in mcdi_mon_cfg_build() [all …]
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | ramdisk.c | 309 rd_phys_alloc(pgcnt_t npages) in rd_phys_alloc() argument 324 page_unresv(npages); in rd_phys_alloc() 331 page_create_putback(npages); in rd_phys_alloc() 332 page_unresv(npages); in rd_phys_alloc() 352 for (i = 0; i < npages; i++) in rd_phys_alloc() 354 rd_tot_physmem += npages; in rd_phys_alloc() 359 ASSERT(i < npages); in rd_phys_alloc() 364 page_unresv(npages); in rd_phys_alloc() 380 for (i = 0; i < npages; ++i) { in rd_phys_free() 391 page_unresv(npages); in rd_phys_free() [all …]
|