/freebsd/sys/dev/isci/scil/ |
H A D | sati_mode_select.c | 214 U32 page_size=0; in sati_mode_select_get_mode_page_size() local 242 page_size=0; in sati_mode_select_get_mode_page_size() 246 return page_size; in sati_mode_select_get_mode_page_size() 264 U32 page_size in sati_mode_select_process_mode_page_read_write_error_recovery() argument 322 U32 page_size in sati_mode_select_process_mode_page_disconnect_reconnect() argument 357 U32 page_size in sati_mode_select_process_mode_page_caching() argument 454 U32 page_size in sati_mode_select_process_mode_page_control() argument 520 U32 page_size in sati_mode_select_process_mode_page_informational_exception_control() argument 589 U32 page_size in sati_mode_select_process_mode_page_power_condition() argument 710 U32 page_size = 0; // in bytes in sati_mode_select_process_mode_page() local [all …]
|
H A D | sati_reassign_blocks.c | 199 U8 page_size; in sati_reassign_blocks_verify_condition() local 206 for(index = 0; index < page_size; index++) in sati_reassign_blocks_verify_condition() 211 if (page_size == 4) in sati_reassign_blocks_verify_condition() 237 U8 page_size; in sati_reassign_blocks_write_condition() local 244 for(index = 0; index < page_size; index++) in sati_reassign_blocks_write_condition() 249 if (page_size == 4) in sati_reassign_blocks_write_condition() 275 U8 page_size; in sati_reassign_blocks_initial_processing() local 286 page_size = 4; //beginning of lba list in sati_reassign_blocks_initial_processing() 291 page_size = 8; in sati_reassign_blocks_initial_processing() 445 U32 page_size = 0; // in bytes in sati_reassign_blocks_process() local [all …]
|
/freebsd/lib/libkvm/ |
H A D | kvm_minidump_aarch64.c | 53 size_t page_size; member 133 vmst->page_size = AARCH64_PAGE_SIZE_4K; in _aarch64_minidump_initvtop() 137 vmst->page_size = AARCH64_PAGE_SIZE_16K; in _aarch64_minidump_initvtop() 147 dump_avail_off = vmst->page_size + in _aarch64_minidump_initvtop() 183 offset = va & (kd->vmst->page_size - 1); in _aarch64_minidump_vatop() 187 kd->vmst->page_size); in _aarch64_minidump_vatop() 188 ofs = _kvm_pt_find(kd, a, kd->vmst->page_size); in _aarch64_minidump_vatop() 196 return (kd->vmst->page_size - offset); in _aarch64_minidump_vatop() 208 ofs = _kvm_pt_find(kd, a, kd->vmst->page_size); in _aarch64_minidump_vatop() 216 return (kd->vmst->page_size - offset); in _aarch64_minidump_vatop() [all …]
|
H A D | kvm_private.c | 279 off = _kvm_pt_find(kd, pa, page_size); in _kvm_map_get() 367 kd->pt_page_size = page_size; in _kvm_pt_init() 424 dump_avail_n(kd, i) / page_size; in _kvm_pa_bit_id() 426 return (pa / page_size - in _kvm_pa_bit_id() 427 dump_avail_n(kd, i) / page_size + adj); in _kvm_pa_bit_id() 440 sz = howmany(dump_avail_n(kd, i + 1), page_size) - in _kvm_bit_id_pa() 441 dump_avail_n(kd, i) / page_size; in _kvm_bit_id_pa() 444 bit_id * page_size); in _kvm_bit_id_pa() 511 if (count >= (kd->pt_sparse_size / page_size)) in _kvm_pt_find() 810 unsigned int page_size) in _kvm_visit_cb() argument [all …]
|
/freebsd/tests/sys/kern/ |
H A D | kcov.c | 50 static size_t page_size; variable 55 page_size = getpagesize(); in init_page_size() 103 ATF_CHECK(mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in ATF_TC_BODY() 107 2 * page_size / KCOV_ENTRY_SIZE) == 0); in ATF_TC_BODY() 109 ATF_CHECK(mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in ATF_TC_BODY() 123 munmap(data1, 2 * page_size); in ATF_TC_BODY() 124 munmap(data2, 2 * page_size); in ATF_TC_BODY() 144 ATF_CHECK(mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in ATF_TC_BODY() 164 ATF_CHECK(mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in ATF_TC_BODY() 286 page_size / KCOV_ENTRY_SIZE) == 0, in common_head() [all …]
|
H A D | coredump_phnum_helper.c | 44 size_t i, pages, page_size; in main() local 46 page_size = getpagesize(); in main() 48 v = mmap(NULL, pages * page_size, PROT_READ | PROT_WRITE, in main() 57 if (mprotect((char *)v + i * page_size, page_size, in main()
|
H A D | kern_copyin.c | 100 long page_size; in ATF_TC_BODY() local 109 page_size = sysconf(_SC_PAGESIZE); in ATF_TC_BODY() 110 ATF_REQUIRE(page_size != (long)-1); in ATF_TC_BODY() 124 addr = mmap((void *)(maxuser - page_size), page_size, PROT_READ, in ATF_TC_BODY()
|
/freebsd/lib/libc/tests/string/ |
H A D | wcsnlen_test.c | 41 size_t alloc_size, page_size; in makebuf() local 43 page_size = getpagesize(); in makebuf() 44 alloc_size = roundup2(len, page_size) + page_size; in makebuf() 49 ATF_CHECK(munmap(buf + alloc_size - page_size, page_size) == 0); in makebuf() 50 return (buf + alloc_size - page_size - len); in makebuf() 52 ATF_CHECK(munmap(buf, page_size) == 0); in makebuf() 53 return (buf + page_size); in makebuf()
|
H A D | strlcpy_test.c | 48 size_t alloc_size, page_size; in makebuf() local 50 page_size = getpagesize(); in makebuf() 51 alloc_size = roundup2(len, page_size) + page_size; in makebuf() 56 assert(munmap(buf + alloc_size - page_size, page_size) == 0); in makebuf() 57 return (buf + alloc_size - page_size - len); in makebuf() 59 assert(munmap(buf, page_size) == 0); in makebuf() 60 return (buf + page_size); in makebuf()
|
H A D | stpncpy_test.c | 47 size_t alloc_size, page_size; in makebuf() local 49 page_size = getpagesize(); in makebuf() 50 alloc_size = roundup2(len, page_size) + page_size; in makebuf() 55 assert(munmap(buf + alloc_size - page_size, page_size) == 0); in makebuf() 56 return (buf + alloc_size - page_size - len); in makebuf() 58 assert(munmap(buf, page_size) == 0); in makebuf() 59 return (buf + page_size); in makebuf()
|
H A D | memccpy_test.c | 49 size_t alloc_size, page_size; in makebuf() local 51 page_size = getpagesize(); in makebuf() 52 alloc_size = roundup2(len, page_size) + page_size; in makebuf() 57 assert(munmap(buf + alloc_size - page_size, page_size) == 0); in makebuf() 58 return (buf + alloc_size - page_size - len); in makebuf() 60 assert(munmap(buf, page_size) == 0); in makebuf() 61 return (buf + page_size); in makebuf()
|
/freebsd/sys/contrib/libsodium/src/libsodium/sodium/ |
H A D | utils.c | 84 static size_t page_size; variable 343 page_size = (size_t) page_size_; in _sodium_alloc_init() 348 page_size = (size_t) si.dwPageSize; in _sodium_alloc_init() 350 if (page_size < CANARY_SIZE || page_size < sizeof(size_t)) { in _sodium_alloc_init() 450 const size_t page_mask = page_size - 1U; in _page_round() 500 page_mask = page_size - 1U; in _unprotected_ptr_from_user_ptr() 532 if (page_size <= sizeof canary || page_size < sizeof unprotected_size) { in _sodium_malloc() 537 total_size = page_size + page_size + unprotected_size + page_size; in _sodium_malloc() 542 _mprotect_noaccess(base_ptr + page_size, page_size); in _sodium_malloc() 553 _mprotect_readonly(base_ptr, page_size); in _sodium_malloc() [all …]
|
/freebsd/sbin/hastd/ |
H A D | ebuf.c | 70 size_t page_size; in ebuf_alloc() local 76 page_size = getpagesize(); in ebuf_alloc() 77 size += page_size; in ebuf_alloc() 90 eb->eb_used = eb->eb_start + page_size / 4; in ebuf_alloc() 217 size_t newsize, page_size; in ebuf_head_extend() local 221 page_size = getpagesize(); in ebuf_head_extend() 222 newsize = eb->eb_end - eb->eb_start + (page_size / 4) + size; in ebuf_head_extend() 228 newstart + (page_size / 4) + size + (eb->eb_used - eb->eb_start); in ebuf_head_extend() 246 size_t newsize, page_size; in ebuf_tail_extend() local 250 page_size = getpagesize(); in ebuf_tail_extend() [all …]
|
/freebsd/sys/contrib/openzfs/config/ |
H A D | kernel-mm-page-size.m4 | 2 ZFS_LINUX_TEST_SRC([page_size], [ 6 s = page_size(NULL); 10 AC_MSG_CHECKING([whether page_size() is available]) 11 ZFS_LINUX_TEST_RESULT([page_size], [ 13 AC_DEFINE(HAVE_MM_PAGE_SIZE, 1, [page_size() is available])
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | mmapwrite.c | 63 int page_size = getpagesize(); in normal_writer() local 79 if ((bytes_written = lseek(fd, page_size, SEEK_CUR)) == -1) { in normal_writer() 98 int page_size = getpagesize(); in map_writer() local 109 ret = ftruncate(fd, page_size); in map_writer() 118 if ((buf = mmap(NULL, page_size, PROT_READ | PROT_WRITE, in map_writer() 128 ret = munmap(buf, page_size); in map_writer()
|
/freebsd/lib/libthr/thread/ |
H A D | thr_pshared.c | 50 static int page_size; variable 57 page_size = getpagesize(); in __thr_pshared_init() 58 THR_ASSERT(page_size >= THR_PAGE_SIZE_MIN, in __thr_pshared_init() 117 munmap(h->val, page_size); in pshared_gc() 169 munmap(*val, page_size); in pshared_insert() 209 munmap(val, page_size); in pshared_clean() 246 res = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in __thr_pshared_offpage()
|
/freebsd/contrib/ofed/libmlx4/ |
H A D | mlx4.c | 127 hca_clock_page = mmap(NULL, mdev->page_size, in mlx4_map_internal_clock() 129 mdev->page_size * 3); in mlx4_map_internal_clock() 139 (context->core_clock.offset & (mdev->page_size - 1)); in mlx4_map_internal_clock() 206 context->uar = mmap(NULL, dev->page_size, PROT_WRITE, in mlx4_init_context() 212 context->bf_page = mmap(NULL, dev->page_size, in mlx4_init_context() 214 dev->page_size); in mlx4_init_context() 287 munmap(context->uar, to_mdev(&v_device->device)->page_size); in mlx4_uninit_context() 289 munmap(context->bf_page, to_mdev(&v_device->device)->page_size); in mlx4_uninit_context() 292 to_mdev(&v_device->device)->page_size); in mlx4_uninit_context() 342 dev->page_size = sysconf(_SC_PAGESIZE); in mlx4_driver_init()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_allocator_primary64.h | 521 const uptr page_size = GetPageSizeCached(); in ReleaseFreeMemoryToOS() local 527 if (chunk_size <= page_size && page_size % chunk_size == 0) { in ReleaseFreeMemoryToOS() 531 } else if (chunk_size <= page_size && page_size % chunk_size != 0 && in ReleaseFreeMemoryToOS() 532 chunk_size % (page_size % chunk_size) == 0) { in ReleaseFreeMemoryToOS() 538 } else if (chunk_size <= page_size) { in ReleaseFreeMemoryToOS() 543 } else if (chunk_size > page_size && chunk_size % page_size == 0) { in ReleaseFreeMemoryToOS() 547 } else if (chunk_size > page_size) { in ReleaseFreeMemoryToOS() 567 if (chunk_size <= page_size && page_size % chunk_size == 0) { in ReleaseFreeMemoryToOS() 865 const uptr page_size = GetPageSizeCached(); in MaybeReleaseToOS() local 868 if (n * chunk_size < page_size) in MaybeReleaseToOS() [all …]
|
/freebsd/tests/sys/posixshm/ |
H A D | posixshm_test.c | 185 size_t blen, page_size; in shm_fill() local 189 page_size = getpagesize(); in shm_fill() 190 buf = malloc(page_size); in shm_fill() 195 blen = len < (off_t)page_size ? (size_t)len : page_size; in shm_fill() 213 size_t blen, page_size; in check_content_dealloc() local 223 sblk = buf + page_size; in check_content_dealloc() 236 blen = resid < (off_t)page_size ? (size_t)resid : page_size; in check_content_dealloc() 257 blen = resid < (off_t)page_size ? (size_t)resid : page_size; in check_content_dealloc() 276 blen = resid < (off_t)page_size ? (size_t)resid : page_size; in check_content_dealloc() 1091 size_t page_size; in ATF_TC_BODY() local [all …]
|
/freebsd/contrib/netbsd-tests/modules/k_uvm/ |
H A D | k_uvm.c | 44 static int page_size; variable 62 NULL, 0, &page_size, 0, 75 page_size = PAGE_SIZE; in k_uvm_init()
|
/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_mem.c | 130 unsigned long umem_page_shift = ilog2(umem->page_size); in __mlx5_ib_populate_pas() 184 u64 page_size; in mlx5_ib_get_buf_offset() local 190 page_size = (u64)1 << page_shift; in mlx5_ib_get_buf_offset() 191 page_mask = page_size - 1; in mlx5_ib_get_buf_offset() 193 off_size = page_size >> 6; in mlx5_ib_get_buf_offset()
|
/freebsd/contrib/ofed/libmlx5/ |
H A D | mlx5.c | 426 static int get_total_uuars(int page_size) in get_total_uuars() argument 607 mdev->page_size * offset); in mlx5_map_internal_clock() 748 context->uar_size = mdev->page_size; in adjust_uar_info() 764 int page_size; in mlx5_init_context() local 780 page_size = mdev->page_size; in mlx5_init_context() 792 tot_uuars = get_total_uuars(page_size); in mlx5_init_context() 876 cmd_fd, page_size * offset); in mlx5_init_context() 985 munmap(context->uar[i], page_size); in mlx5_init_context() 995 int page_size = to_mdev(ibctx->device)->page_size; in mlx5_cleanup_context() local 1021 munmap(context->uar[i], page_size); in mlx5_cleanup_context() [all …]
|
H A D | buf.c | 238 size_t size, int page_size) in alloc_huge_buf() argument 325 size_t size, int page_size, in mlx5_alloc_prefered_buf() argument 340 ret = alloc_huge_buf(mctx, buf, size, page_size); in mlx5_alloc_prefered_buf() 355 ret = mlx5_alloc_buf_contig(mctx, buf, size, page_size, component); in mlx5_alloc_prefered_buf() 365 return mlx5_alloc_buf(buf, size, page_size); in mlx5_alloc_prefered_buf() 485 int page_size, in mlx5_alloc_buf_contig() argument 509 context->cmd_fd, page_size * offset); in mlx5_alloc_buf_contig() 545 int mlx5_alloc_buf(struct mlx5_buf *buf, size_t size, int page_size) in mlx5_alloc_buf() argument 550 al_size = align(size, page_size); in mlx5_alloc_buf() 551 ret = posix_memalign(&buf->buf, page_size, al_size); in mlx5_alloc_buf()
|
/freebsd/libexec/rtld-elf/ |
H A D | map_object.c | 51 return (hdr->e_phoff + hdr->e_phnum * sizeof(Elf_Phdr) <= page_size); in phdr_in_zero_page() 135 if ((segs[nsegs]->p_align & (page_size - 1)) != 0) { in map_object() 170 if (phdr->p_offset > page_size || in map_object() 171 phdr->p_offset + phdr->p_filesz > page_size) { in map_object() 255 mprotect(clear_page, page_size, data_prot|PROT_WRITE)) { in map_object() 265 mprotect(clear_page, page_size, data_prot); in map_object() 333 munmap(hdr, page_size); in map_object() 343 munmap(hdr, page_size); in map_object() 393 hdr = mmap(NULL, page_size, PROT_READ, MAP_PRIVATE | MAP_PREFAULT_READ, in get_elf_header() 425 munmap(hdr, page_size); in get_elf_header()
|
/freebsd/contrib/diff/lib/ |
H A D | c-stack.c | 190 size_t page_size = sysconf (_SC_PAGESIZE); in segv_handler() 192 s += page_size; in segv_handler() 193 if (s < stack_size + page_size) in segv_handler() 202 (unsigned long) page_size, signo); in segv_handler()
|