/tools/testing/selftests/vm/ |
D | map_fixed_noreplace.c | 33 unsigned long flags, addr, size, page_size; in main() local 36 page_size = sysconf(_SC_PAGE_SIZE); in main() 43 size = 5 * page_size; in main() 55 if (munmap((void *)addr, 5 * page_size) != 0) { in main() 63 addr = BASE_ADDRESS + page_size; in main() 64 size = 3 * page_size; in main() 84 size = 5 * page_size; in main() 104 addr = BASE_ADDRESS + (2 * page_size); in main() 105 size = page_size; in main() 124 addr = BASE_ADDRESS + (3 * page_size); in main() [all …]
|
D | mlock2-tests.c | 228 unsigned long page_size = getpagesize(); in lock_check() local 232 page2_flags = get_pageflags((unsigned long)map + page_size); in lock_check() 256 if (!is_vmflag_set((unsigned long)map + page_size, LOCKED)) { in lock_check() 266 unsigned long page_size = getpagesize(); in unlock_lock_check() local 270 page2_flags = get_pageflags((unsigned long)map + page_size); in unlock_lock_check() 284 if (is_vmflag_set((unsigned long)map + page_size, LOCKED)) { in unlock_lock_check() 296 unsigned long page_size = getpagesize(); in test_mlock_lock() local 298 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_lock() 305 if (mlock2_(map, 2 * page_size, 0)) { in test_mlock_lock() 318 if (munlock(map, 2 * page_size)) { in test_mlock_lock() [all …]
|
D | userfaultfd.c | 62 static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size; variable 91 ((pthread_mutex_t *) ((___area) + (___nr)*page_size)) 98 ((___area) + (___nr)*page_size + \ 132 if (madvise(rel_area, nr_pages * page_size, MADV_DONTNEED)) { in anon_release_pages() 142 if (posix_memalign(alloc_area, page_size, nr_pages * page_size)) { in anon_allocate_area() 159 nr_pages * page_size, in hugetlb_release_pages() 160 nr_pages * page_size)) { in hugetlb_release_pages() 173 *alloc_area = mmap(NULL, nr_pages * page_size, PROT_READ | PROT_WRITE, in hugetlb_allocate_area() 177 nr_pages * page_size); in hugetlb_allocate_area() 184 area_alias = mmap(NULL, nr_pages * page_size, PROT_READ | PROT_WRITE, in hugetlb_allocate_area() [all …]
|
D | mlock-random-test.c | 144 int page_size = 0; in test_mlock_within_limit() local 184 page_size = get_proc_page_size((unsigned long)p); in test_mlock_within_limit() 185 if (page_size == 0) { in test_mlock_within_limit() 190 if (locked_vm_size > PAGE_ALIGN(alloc_size, page_size) + page_size) { in test_mlock_within_limit()
|
D | compaction_test.c | 164 size_t page_size, i; in main() local 184 page_size = getpagesize(); in main() 213 for (i = 0; i < MAP_SIZE; i += page_size) in main()
|
/tools/testing/selftests/powerpc/primitives/ |
D | load_unaligned_zeropad.c | 38 static int page_size; variable 43 if (mprotect(mem_region + page_size, page_size, PROT_NONE)) { in protect_region() 53 if (mprotect(mem_region + page_size, page_size, PROT_READ|PROT_WRITE)) { in unprotect_region() 125 page_size = getpagesize(); in test_body() 126 mem_region = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE, in test_body() 131 for (i = 0; i < page_size; i++) in test_body() 134 memset(mem_region+page_size, 0, page_size); in test_body() 138 for (i = 0; i < page_size; i++) in test_body()
|
/tools/power/acpi/os_specific/service_layers/ |
D | osunixmap.c | 67 acpi_size page_size; in acpi_os_map_memory() local 78 page_size = acpi_os_get_page_size(); in acpi_os_map_memory() 79 offset = where % page_size; in acpi_os_map_memory() 112 acpi_size page_size; in acpi_os_unmap_memory() local 114 page_size = acpi_os_get_page_size(); in acpi_os_unmap_memory() 115 offset = ACPI_TO_INTEGER(where) % page_size; in acpi_os_unmap_memory()
|
/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 22 TEST_ASSERT(vm->page_size == 4096, "Unsupported page size: 0x%x", in virt_pgd_alloc() 23 vm->page_size); in virt_pgd_alloc() 30 memset(addr_gpa2hva(vm, paddr), 0xff, PAGES_PER_REGION * vm->page_size); in virt_pgd_alloc() 47 memset(addr_gpa2hva(vm, taddr), 0xff, PAGES_PER_REGION * vm->page_size); in virt_alloc_region() 76 TEST_ASSERT((gva % vm->page_size) == 0, in virt_pg_map() 79 gva, vm->page_size); in virt_pg_map() 84 TEST_ASSERT((gpa % vm->page_size) == 0, in virt_pg_map() 87 gva, vm->page_size); in virt_pg_map() 91 gva, vm->max_gfn, vm->page_size); in virt_pg_map() 135 TEST_ASSERT(vm->page_size == 4096, "Unsupported page size: 0x%x", in addr_gva2gpa() [all …]
|
/tools/testing/selftests/powerpc/copyloops/ |
D | exc_validate.c | 81 int page_size; in test_copy_exception() local 85 page_size = getpagesize(); in test_copy_exception() 86 p = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE, in test_copy_exception() 94 memset(p, 0, page_size); in test_copy_exception() 98 if (mprotect(p + page_size, page_size, PROT_NONE)) { in test_copy_exception() 103 q = p + page_size - MAX_LEN; in test_copy_exception()
|
/tools/testing/selftests/powerpc/mm/ |
D | large_vm_fork_separation.c | 27 unsigned long page_size; in test() local 30 page_size = sysconf(_SC_PAGESIZE); in test() 31 SKIP_IF(page_size != 65536); in test() 34 p = mmap((void *)(512ul << 40), page_size, PROT_READ | PROT_WRITE, in test()
|
/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 153 vm->page_size = 0x1000; in _vm_create() 160 vm->page_size = 0x10000; in _vm_create() 167 vm->page_size = 0x1000; in _vm_create() 174 vm->page_size = 0x10000; in _vm_create() 181 vm->page_size = 0x1000; in _vm_create() 188 vm->page_size = 0x10000; in _vm_create() 197 vm->page_size = 0x1000; in _vm_create() 529 amt = vm->page_size - (ptr1 % vm->page_size); in kvm_memcmp_hva_gva() 531 amt = vm->page_size - (ptr2 % vm->page_size); in kvm_memcmp_hva_gva() 582 size_t huge_page_size = KVM_UTIL_PGS_PER_HUGEPG * vm->page_size; in vm_userspace_mem_region_add() [all …]
|
/tools/testing/selftests/kvm/lib/aarch64/ |
D | processor.c | 21 return (v + vm->page_size) & ~(vm->page_size - 1); in page_align() 81 page_align(vm, ptrs_per_pgd(vm) * 8) / vm->page_size, in virt_pgd_alloc() 94 TEST_ASSERT((vaddr % vm->page_size) == 0, in _virt_pg_map() 96 " vaddr: 0x%lx vm->page_size: 0x%x", vaddr, vm->page_size); in _virt_pg_map() 100 TEST_ASSERT((paddr % vm->page_size) == 0, in _virt_pg_map() 102 " paddr: 0x%lx vm->page_size: 0x%x", paddr, vm->page_size); in _virt_pg_map() 106 paddr, vm->max_gfn, vm->page_size); in _virt_pg_map() 179 return pte_addr(vm, *ptep) + (gva & (vm->page_size - 1)); in addr_gva2gpa() 319 size_t stack_size = vm->page_size == 4096 ? in aarch64_vcpu_add_default() 320 DEFAULT_STACK_PGS * vm->page_size : in aarch64_vcpu_add_default() [all …]
|
/tools/perf/arch/x86/util/ |
D | intel-bts.c | 149 opts->auxtrace_mmap_pages = MiB(4) / page_size; in intel_bts_recording_options() 151 opts->auxtrace_mmap_pages = KiB(128) / page_size; in intel_bts_recording_options() 153 opts->mmap_pages = KiB(256) / page_size; in intel_bts_recording_options() 157 opts->mmap_pages = KiB(256) / page_size; in intel_bts_recording_options() 161 opts->auxtrace_mmap_pages * (size_t)page_size; in intel_bts_recording_options() 165 sz = round_up(sz, page_size) / page_size; in intel_bts_recording_options() 169 opts->auxtrace_mmap_pages * (size_t)page_size) { in intel_bts_recording_options() 172 opts->auxtrace_mmap_pages * (size_t)page_size); in intel_bts_recording_options() 186 opts->auxtrace_mmap_pages = MiB(4) / page_size; in intel_bts_recording_options() 188 opts->auxtrace_mmap_pages = KiB(128) / page_size; in intel_bts_recording_options() [all …]
|
D | intel-pt.c | 630 opts->auxtrace_mmap_pages = MiB(4) / page_size; in intel_pt_recording_options() 632 opts->auxtrace_mmap_pages = KiB(128) / page_size; in intel_pt_recording_options() 634 opts->mmap_pages = KiB(256) / page_size; in intel_pt_recording_options() 638 opts->mmap_pages = KiB(256) / page_size; in intel_pt_recording_options() 642 opts->auxtrace_mmap_pages * (size_t)page_size; in intel_pt_recording_options() 646 sz = round_up(sz, page_size) / page_size; in intel_pt_recording_options() 650 opts->auxtrace_mmap_pages * (size_t)page_size) { in intel_pt_recording_options() 653 opts->auxtrace_mmap_pages * (size_t)page_size); in intel_pt_recording_options() 672 opts->auxtrace_mmap_pages = MiB(4) / page_size; in intel_pt_recording_options() 674 opts->auxtrace_mmap_pages = KiB(128) / page_size; in intel_pt_recording_options() [all …]
|
/tools/testing/selftests/futex/functional/ |
D | futex_wait_uninitialized_heap.c | 69 long page_size; in main() local 89 page_size = sysconf(_SC_PAGESIZE); in main() 91 buf = mmap(NULL, page_size, PROT_READ|PROT_WRITE, in main()
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 26 uint64_t page_size:1; member 398 TEST_ASSERT((nested_paddr % vm->page_size) == 0, in nested_pg_map() 401 nested_paddr, vm->page_size); in nested_pg_map() 405 paddr, vm->max_gfn, vm->page_size); in nested_pg_map() 406 TEST_ASSERT((paddr % vm->page_size) == 0, in nested_pg_map() 409 paddr, vm->page_size); in nested_pg_map() 413 paddr, vm->max_gfn, vm->page_size); in nested_pg_map() 433 pdpe = addr_gpa2hva(vm, pml4e[index[3]].address * vm->page_size); in nested_pg_map() 445 pde = addr_gpa2hva(vm, pdpe[index[2]].address * vm->page_size); in nested_pg_map() 457 pte = addr_gpa2hva(vm, pde[index[1]].address * vm->page_size); in nested_pg_map() [all …]
|
D | processor.c | 27 uint64_t page_size:1; member 42 uint64_t page_size:1; member 57 uint64_t page_size:1; member 267 TEST_ASSERT((vaddr % vm->page_size) == 0, in virt_pg_map() 270 vaddr, vm->page_size); in virt_pg_map() 275 TEST_ASSERT((paddr % vm->page_size) == 0, in virt_pg_map() 278 paddr, vm->page_size); in virt_pg_map() 282 paddr, vm->max_gfn, vm->page_size); in virt_pg_map() 301 pdpe = addr_gpa2hva(vm, pml4e[index[3]].address * vm->page_size); in virt_pg_map() 312 pde = addr_gpa2hva(vm, pdpe[index[2]].address * vm->page_size); in virt_pg_map() [all …]
|
/tools/perf/arch/arm/util/ |
D | cs-etm.c | 307 opts->auxtrace_mmap_pages = MiB(4) / page_size; in cs_etm_recording_options() 310 KiB(128) / page_size; in cs_etm_recording_options() 312 opts->mmap_pages = KiB(256) / page_size; in cs_etm_recording_options() 316 opts->mmap_pages = KiB(256) / page_size; in cs_etm_recording_options() 325 opts->auxtrace_mmap_pages * (size_t)page_size; in cs_etm_recording_options() 336 sz = round_up(sz, page_size) / page_size; in cs_etm_recording_options() 342 opts->auxtrace_mmap_pages * (size_t)page_size) { in cs_etm_recording_options() 345 opts->auxtrace_mmap_pages * (size_t)page_size); in cs_etm_recording_options() 360 opts->auxtrace_mmap_pages = MiB(4) / page_size; in cs_etm_recording_options() 362 opts->auxtrace_mmap_pages = KiB(128) / page_size; in cs_etm_recording_options() [all …]
|
/tools/perf/arch/arm64/util/ |
D | arm-spe.c | 96 opts->auxtrace_mmap_pages = MiB(4) / page_size; in arm_spe_recording_options() 98 opts->auxtrace_mmap_pages = KiB(128) / page_size; in arm_spe_recording_options() 100 opts->mmap_pages = KiB(256) / page_size; in arm_spe_recording_options() 106 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in arm_spe_recording_options()
|
/tools/perf/tests/ |
D | mmap-thread-lookup.c | 38 map = mmap(NULL, page_size, in thread_init() 75 munmap(td->map, page_size); in thread_fn() 122 munmap(td0->map, page_size); in threads_destroy()
|
/tools/perf/lib/include/internal/ |
D | lib.h | 7 extern unsigned int page_size;
|
/tools/vm/ |
D | page-types.c | 180 static int page_size; variable 223 return (pages * page_size) >> 20; in pages2mb() 923 pg_start[nr_vmas] = vm_start / page_size; in parse_pid() 924 pg_end[nr_vmas] = vm_end / page_size; in parse_pid() 941 size, (size + page_size - 1) / page_size); in show_file() 984 nr_pages = (end - off + page_size - 1) / page_size; in walk_file() 987 len = nr_pages * page_size; in walk_file() 1011 (void)*(volatile int *)(ptr + i * page_size); in walk_file() 1019 if (pagemap_read(buf, (unsigned long)ptr / page_size, in walk_file() 1040 add_page(off / page_size + i, pfn, in walk_file() [all …]
|
/tools/perf/lib/ |
D | core.c | 35 page_size = sysconf(_SC_PAGE_SIZE); in libperf_init()
|
/tools/lib/traceevent/ |
D | event-parse-api.c | 234 return tep->page_size; in tep_get_page_size() 248 tep->page_size = _page_size; in tep_set_page_size()
|
/tools/perf/arch/s390/util/ |
D | machine.c | 48 p->end = roundup(p->end, page_size); in arch__symbols__fixup_end()
|