/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 219 page_size=SCSI_MODE_PAGE_01_LENGTH; in sati_mode_select_get_mode_page_size() 223 page_size=SCSI_MODE_PAGE_02_LENGTH; in sati_mode_select_get_mode_page_size() 227 page_size=SCSI_MODE_PAGE_08_LENGTH; in sati_mode_select_get_mode_page_size() 231 page_size=SCSI_MODE_PAGE_0A_LENGTH; in sati_mode_select_get_mode_page_size() 235 page_size=SCSI_MODE_PAGE_1C_LENGTH; in sati_mode_select_get_mode_page_size() 239 page_size=SCSI_MODE_PAGE_1A_LENGTH; in sati_mode_select_get_mode_page_size() 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 [all …]
|
H A D | sati_reassign_blocks.c | 199 U8 page_size; in sati_reassign_blocks_verify_condition() local 204 page_size = sequence->command_specific_data.reassign_blocks_process_state.lba_size; in sati_reassign_blocks_verify_condition() 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 242 page_size = sequence->command_specific_data.reassign_blocks_process_state.lba_size; in sati_reassign_blocks_write_condition() 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() [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() 148 aarch64_round_page(vmst->hdr.msgbufsize, vmst->page_size); in _aarch64_minidump_initvtop() 152 aarch64_round_page(vmst->hdr.dumpavailsize, vmst->page_size); in _aarch64_minidump_initvtop() 156 aarch64_round_page(vmst->hdr.bitmapsize, vmst->page_size) + in _aarch64_minidump_initvtop() 157 aarch64_round_page(vmst->hdr.pmapsize, vmst->page_size); in _aarch64_minidump_initvtop() 159 vmst->hdr.bitmapsize, off, sparse_off, vmst->page_size) == -1) { in _aarch64_minidump_initvtop() 162 off += aarch64_round_page(vmst->hdr.bitmapsize, vmst->page_size); in _aarch64_minidump_initvtop() [all …]
|
H A D | kvm_private.c | 274 _kvm_map_get(kvm_t *kd, u_long pa, unsigned int page_size) in _kvm_map_get() argument 279 off = _kvm_pt_find(kd, pa, page_size); in _kvm_map_get() 291 size_t map_len, off_t map_off, off_t sparse_off, int page_size) in _kvm_pt_init() argument 311 kd->dump_avail[1] = _kvm64toh(kd, map_len * 8 * page_size); in _kvm_pt_init() 366 kd->pt_sparse_size = (uint64_t)*popcount_bin * page_size; in _kvm_pt_init() 367 kd->pt_page_size = page_size; in _kvm_pt_init() 415 _kvm_pa_bit_id(kvm_t *kd, uint64_t pa, unsigned int page_size) in _kvm_pa_bit_id() argument 423 adj += howmany(dump_avail_n(kd, i + 1), page_size) - in _kvm_pa_bit_id() 424 dump_avail_n(kd, i) / page_size; in _kvm_pa_bit_id() 426 return (pa / page_size - in _kvm_pa_bit_id() [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() 111 ATF_CHECK(mmap(NULL, 3 * page_size, PROT_READ | PROT_WRITE, MAP_SHARED, in ATF_TC_BODY() 113 ATF_REQUIRE((data1 = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in ATF_TC_BODY() 115 ATF_REQUIRE((data2 = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in ATF_TC_BODY() 123 munmap(data1, 2 * page_size); in ATF_TC_BODY() 124 munmap(data2, 2 * page_size); in ATF_TC_BODY() [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 | 99 long page_size; in ATF_TC_BODY() 108 page_size = sysconf(_SC_PAGESIZE); in ATF_TC_BODY() 109 ATF_REQUIRE(page_size != (long)-1); in ATF_TC_BODY() 123 addr = mmap((void *)(maxuser - page_size), page_size, PROT_READ, in ATF_TC_BODY() 100 long page_size; ATF_TC_BODY() local
|
/freebsd/lib/libc/tests/string/ |
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(mprotect(buf + alloc_size - page_size, page_size, PROT_NONE) == 0); in makebuf() 58 return (buf + alloc_size - page_size - len); in makebuf() 60 assert(mprotect(buf, page_size, PROT_NONE) == 0); in makebuf() 61 return (buf + page_size); in makebuf() 68 size_t alloc_size, page_size; in freebuf() local 70 page_size = getpagesize(); in freebuf() 71 alloc_size = roundup2(len, page_size) + page_size; in freebuf() [all …]
|
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()
|
/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() 467 if (posix_memalign(&ptr, page_size, size) != 0) { in _alloc_aligned() 500 page_mask = page_size - 1U; in _unprotected_ptr_from_user_ptr() 502 if (unprotected_ptr_u <= page_size * 2U) { in _unprotected_ptr_from_user_ptr() 528 if (size >= (size_t) SIZE_MAX - page_size * 4U) { in _sodium_malloc() 532 if (page_size <= sizeof canary || page_size < sizeof unprotected_size) { in _sodium_malloc() [all …]
|
/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/sys/contrib/openzfs/config/ |
H A D | kernel-mm-pagemap.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/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/sys/contrib/openzfs/tests/zfs-tests/tests/functional/direct/ |
H A D | dio_mixed.ksh | 56 page_size=$(getconf PAGESIZE) 65 for ibs in "512" "$page_size" "131072"; do 66 for obs in "512" "$page_size" "131072"; do 73 if [[ $ibs -ge $page_size ]]; then 77 if [[ $obs -ge $page_size ]]; then
|
H A D | dio_random.ksh | 60 page_size=$(getconf PAGESIZE) 68 --bsrange=$page_size-1m --direct=1 --fsync=32 --numjobs=2 \ 76 --bsrange=$page_size-1m --direct=0 --fsync=32 --numjobs=2 \
|
/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() 529 full_pages_chunk_count_max = page_size / chunk_size; 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() 536 full_pages_chunk_count_max = page_size / chunk_size + 1; in ReleaseFreeMemoryToOS() 538 } else if (chunk_size <= page_size) { in ReleaseFreeMemoryToOS() 541 full_pages_chunk_count_max = page_size / chunk_size + 2; 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() [all …]
|
/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/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() 130 if ((segs[nsegs]->p_align & (page_size - 1)) != 0) { in map_object() 161 if (phdr->p_offset > page_size || in map_object() 162 phdr->p_offset + phdr->p_filesz > page_size) { in map_object() 259 mprotect(clear_page, page_size, in map_object() 270 mprotect(clear_page, page_size, in map_object() 343 munmap(hdr, page_size); in map_object() 353 munmap(hdr, page_size); in map_object() 404 hdr = mmap(NULL, page_size, PROT_READ, MAP_PRIVATE | MAP_PREFAULT_READ, in get_elf_header() 435 munmap(hdr, page_size); in get_elf_header()
|
/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 219 page_size = getpagesize(); in check_content_dealloc() 220 buf = malloc(page_size * 2); in check_content_dealloc() 223 sblk = buf + page_size; in check_content_dealloc() 225 memset(sblk, 0, page_size); in check_content_dealloc() 236 blen = resid < (off_t)page_size ? (size_t)resid : page_size; in check_content_dealloc() [all …]
|
/freebsd/contrib/ofed/libmlx5/ |
H A D | mlx5.c | 426 static int get_total_uuars(int page_size) in get_total_uuars() argument 439 uuars_in_page = page_size / MLX5_ADAPTER_PAGE_SIZE * MLX5_NUM_NON_FP_BFREGS_PER_UAR; in get_total_uuars() 605 hca_clock_page = mmap(NULL, mdev->page_size, in mlx5_map_internal_clock() 607 mdev->page_size * offset); in mlx5_map_internal_clock() 617 (context->core_clock.offset & (mdev->page_size - 1)); 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() 875 context->uar[i] = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, in mlx5_init_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/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()
|