/freebsd/stand/efi/loader/ |
H A D | copy.c | 93 efi_verify_staging_size(unsigned long *nr_pages) in efi_verify_staging_size() argument 165 if (*nr_pages > available_pages) { in efi_verify_staging_size() 167 *nr_pages, available_pages); in efi_verify_staging_size() 168 *nr_pages = available_pages; in efi_verify_staging_size() 310 unsigned long nr_pages; in efi_copy_init() local 316 nr_pages = EFI_SIZE_TO_PAGES(M(1) * ess); in efi_copy_init() 325 efi_verify_staging_size(&nr_pages); in efi_copy_init() 331 nr_pages, &staging); in efi_copy_init() 338 staging_end = staging + nr_pages * EFI_PAGE_SIZE; in efi_copy_init() 359 unsigned long nr_pages; in efi_check_space() local [all …]
|
/freebsd/sys/dev/xen/balloon/ |
H A D | balloon.c | 149 increase_reservation(unsigned long nr_pages) in increase_reservation() argument 161 if (nr_pages > nitems(frame_list)) in increase_reservation() 162 nr_pages = nitems(frame_list); in increase_reservation() 165 i < nr_pages; i++, page = TAILQ_NEXT(page, plinks.q)) { in increase_reservation() 171 reservation.nr_extents = nr_pages; in increase_reservation() 174 if (rc < nr_pages) { in increase_reservation() 190 for (i = 0; i < nr_pages; i++) { in increase_reservation() 202 bs.current_pages += nr_pages; in increase_reservation() 209 decrease_reservation(unsigned long nr_pages) in decrease_reservation() argument 222 if (nr_pages > nitems(frame_list)) in decrease_reservation() [all …]
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | mm.h | 279 lkpi_get_user_pages(unsigned long start, unsigned long nr_pages, 282 #define get_user_pages(start, nr_pages, gup_flags, pages) \ argument 283 lkpi_get_user_pages(start, nr_pages, gup_flags, pages) 285 #define get_user_pages(start, nr_pages, gup_flags, pages, vmas) \ argument 286 lkpi_get_user_pages(start, nr_pages, gup_flags, pages) 291 pin_user_pages(unsigned long start, unsigned long nr_pages, in pin_user_pages() argument 294 return (get_user_pages(start, nr_pages, gup_flags, pages)); in pin_user_pages() 298 pin_user_pages(unsigned long start, unsigned long nr_pages, in pin_user_pages() argument 302 return (get_user_pages(start, nr_pages, gup_flags, pages, vmas)); in pin_user_pages() 307 __get_user_pages_fast(unsigned long start, int nr_pages, int write, [all …]
|
/freebsd/sys/dev/drm2/ |
H A D | drm_buffer.c | 46 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_alloc() local 51 *buf = malloc(sizeof(struct drm_buffer) + nr_pages*sizeof(char *), in drm_buffer_alloc() 55 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_alloc() 75 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_copy_from_user() local 85 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_copy_from_user() 110 int nr_pages = buf->size / PAGE_SIZE + 1; in drm_buffer_free() local 112 for (idx = 0; idx < nr_pages; ++idx) in drm_buffer_free()
|
H A D | drmP.h | 1391 extern struct sg_table *drm_prime_pages_to_sg(vm_page_t *pages, int nr_pages);
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_page.c | 211 linux_get_user_pages_internal(vm_map_t map, unsigned long start, int nr_pages, in linux_get_user_pages_internal() argument 219 len = ptoa((vm_offset_t)nr_pages); in linux_get_user_pages_internal() 220 count = vm_fault_quick_hold_pages(map, start, len, prot, pages, nr_pages); in linux_get_user_pages_internal() 221 return (count == -1 ? -EFAULT : nr_pages); in linux_get_user_pages_internal() 225 __get_user_pages_fast(unsigned long start, int nr_pages, int write, in __get_user_pages_fast() argument 235 if (nr_pages == 0 || in_interrupt()) in __get_user_pages_fast() 240 end = start + ptoa((vm_offset_t)nr_pages); in __get_user_pages_fast() 269 unsigned long start, unsigned long nr_pages, unsigned int gup_flags, in get_user_pages_remote() argument 275 return (linux_get_user_pages_internal(map, start, nr_pages, in get_user_pages_remote() 280 lkpi_get_user_pages(unsigned long start, unsigned long nr_pages, in lkpi_get_user_pages() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | abd_os.c | 280 unsigned int nr_pages = abd_chunkcnt_for_bytes(size); in abd_alloc_chunks() local 288 ASSERT3U(alloc_pages, <, nr_pages); in abd_alloc_chunks() 290 while (alloc_pages < nr_pages) { in abd_alloc_chunks() 294 order = MIN(highbit64(nr_pages - alloc_pages) - 1, max_order); in abd_alloc_chunks() 319 ASSERT3S(alloc_pages, ==, nr_pages); in abd_alloc_chunks() 399 int nr_pages = abd_chunkcnt_for_bytes(size); in abd_alloc_chunks() local 402 while (sg_alloc_table(&table, nr_pages, gfp)) { in abd_alloc_chunks() 407 ASSERT3U(table.nents, ==, nr_pages); in abd_alloc_chunks() 409 ABD_SCATTER(abd).abd_nents = nr_pages; in abd_alloc_chunks() 411 abd_for_each_sg(abd, sg, nr_pages, i) { in abd_alloc_chunks() [all …]
|
H A D | zpl_file.c | 489 struct list_head *pages, unsigned nr_pages) in zpl_readpages() argument
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | spl_uio.c | 175 zfs_uio_hold_pages(unsigned long start, size_t len, int nr_pages, in zfs_uio_hold_pages() argument 187 nr_pages); in zfs_uio_hold_pages() 210 zfs_uio_get_user_pages(unsigned long start, int nr_pages, in zfs_uio_get_user_pages() argument 215 count = zfs_uio_hold_pages(start, len, nr_pages, rw, pages); in zfs_uio_get_user_pages() 217 if (count != nr_pages) { in zfs_uio_get_user_pages() 223 ASSERT3S(count, ==, nr_pages); in zfs_uio_get_user_pages()
|
/freebsd/sys/dev/bnxt/bnxt_en/ |
H A D | if_bnxt.c | 826 for (i = 0; i < rmem->nr_pages; i++) { in bnxt_free_ring() 870 if ((rmem->nr_pages > 1 || rmem->depth > 0) && !rmem->pg_tbl.idi_vaddr) { in bnxt_alloc_ring() 871 size_t pg_tbl_size = rmem->nr_pages * 8; in bnxt_alloc_ring() 881 for (i = 0; i < rmem->nr_pages; i++) { in bnxt_alloc_ring() 893 if (rmem->nr_pages > 1 || rmem->depth > 0) { in bnxt_alloc_ring() 894 if (i == rmem->nr_pages - 2 && in bnxt_alloc_ring() 897 else if (i == rmem->nr_pages - 1 && in bnxt_alloc_ring() 946 ctx_pg->nr_pages = DIV_ROUND_UP(mem_size, BNXT_PAGE_SIZE); in bnxt_alloc_ctx_pg_tbls() 947 if (ctx_pg->nr_pages > MAX_CTX_TOTAL_PAGES) { in bnxt_alloc_ctx_pg_tbls() 948 ctx_pg->nr_pages in bnxt_alloc_ctx_pg_tbls() [all...] |
H A D | bnxt.h | 680 int nr_pages; 698 uint32_t nr_pages; 679 int nr_pages; global() member 697 uint32_t nr_pages; global() member
|
/freebsd/sys/dev/xen/blkback/ |
H A D | blkback.c | 292 int nr_pages; member 908 xbb_get_kva(struct xbb_softc *xbb, int nr_pages) in xbb_get_kva() argument 915 KASSERT(nr_pages != 0, ("xbb_get_kva of zero length")); in xbb_get_kva() 954 if (++num_clear == nr_pages) { in xbb_get_kva() 956 first_clear + nr_pages - 1); in xbb_get_kva() 962 free_kva + (nr_pages * PAGE_SIZE) <= in xbb_get_kva() 966 nr_pages * PAGE_SIZE, (uintmax_t)xbb->kva, in xbb_get_kva() 992 xbb_free_kva(struct xbb_softc *xbb, uint8_t *kva_ptr, int nr_pages) in xbb_free_kva() argument 999 bit_nclear(xbb->kva_free, start_page, start_page + nr_pages - 1); in xbb_free_kva() 1567 nreq->nr_pages = nseg; in xbb_dispatch_io()
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_mem2.c | 2343 int nr_pages; in netmap_mem_ext_create() local 2391 nr_pages = nm_os_extmem_nr_pages(os); in netmap_mem_ext_create() 2422 if (nr_pages == 0) { in netmap_mem_ext_create() 2429 for (j = 0; j < o->num && nr_pages > 0; j++) { in netmap_mem_ext_create() 2447 nr_pages--; in netmap_mem_ext_create() 2449 page_to_virt(*pages), nr_pages); in netmap_mem_ext_create() 2451 (nr_pages == 0 || in netmap_mem_ext_create() 2460 if (nr_pages == 0) in netmap_mem_ext_create()
|
/freebsd/sys/contrib/xen/ |
H A D | memory.h | 594 xen_ulong_t nr_pages; member
|
H A D | xen.h | 848 unsigned long nr_pages; /* Total pages allocated to this domain. */ member
|
/freebsd/contrib/llvm-project/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 1515 #define __sanitizer_syscall_pre_move_pages(pid, nr_pages, pages, nodes, \ argument 1517 __sanitizer_syscall_pre_impl_move_pages((long)(pid), (long)(nr_pages), \ 1520 #define __sanitizer_syscall_post_move_pages(res, pid, nr_pages, pages, nodes, \ argument 1522 __sanitizer_syscall_post_impl_move_pages(res, (long)(pid), (long)(nr_pages), \ 2889 void __sanitizer_syscall_pre_impl_move_pages(long pid, long nr_pages, 2892 void __sanitizer_syscall_post_impl_move_pages(long res, long pid, long nr_pages,
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_common_syscalls.inc | 2644 (long pid, long nr_pages, const void **pages, const int *nodes, int *status, 2647 PRE_READ(pages, nr_pages * sizeof(*pages)); 2649 PRE_READ(nodes, nr_pages * sizeof(*nodes)); 2653 (long res, long pid, long nr_pages, const void **pages, const int *nodes, 2657 POST_WRITE(status, nr_pages * sizeof(*status));
|