/tools/testing/scatterlist/ |
D | main.c | 15 ((1 + array[i]) * PAGE_SIZE); in set_pages() 31 { -EINVAL, 1, pfn(0), PAGE_SIZE, PAGE_SIZE + 1, 1 }, in main() 32 { -EINVAL, 1, pfn(0), PAGE_SIZE, 0, 1 }, in main() 33 { -EINVAL, 1, pfn(0), PAGE_SIZE, sgmax + 1, 1 }, in main() 34 { 0, 1, pfn(0), PAGE_SIZE, sgmax, 1 }, in main() 36 { 0, 2, pfn(0, 1), 2 * PAGE_SIZE, sgmax, 1 }, in main() 37 { 0, 2, pfn(1, 0), 2 * PAGE_SIZE, sgmax, 2 }, in main() 38 { 0, 3, pfn(0, 1, 2), 3 * PAGE_SIZE, sgmax, 1 }, in main() 39 { 0, 3, pfn(0, 2, 1), 3 * PAGE_SIZE, sgmax, 3 }, in main() 40 { 0, 3, pfn(0, 1, 3), 3 * PAGE_SIZE, sgmax, 2 }, in main() [all …]
|
/tools/testing/selftests/vm/ |
D | va_128TBswitch.c | 15 #define PAGE_SIZE (64 << 10) macro 21 #define PAGE_SIZE (4 << 10) macro 48 .addr = ((void *)(ADDR_SWITCH_HINT - PAGE_SIZE)), 49 .size = PAGE_SIZE, 60 .addr = ((void *)(ADDR_SWITCH_HINT - PAGE_SIZE)), 61 .size = 2 * PAGE_SIZE, 72 .size = PAGE_SIZE, 79 .size = 2 * PAGE_SIZE, 85 .size = 2 * PAGE_SIZE, 92 .size = 2 * PAGE_SIZE, [all …]
|
D | gup_benchmark.c | 15 #define PAGE_SIZE sysconf(_SC_PAGESIZE) macro 104 for (; (unsigned long)p < gup.addr + size; p += PAGE_SIZE) in main()
|
D | transhuge-stress.c | 22 #define PAGE_SIZE (1 << PAGE_SHIFT) macro 133 if (madvise(p, HPAGE_SIZE - PAGE_SIZE, MADV_DONTNEED)) in main()
|
/tools/testing/scatterlist/linux/ |
D | mm.h | 29 #define PAGE_SIZE (4096) macro 31 #define PAGE_MASK (~(PAGE_SIZE-1)) 37 #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) 51 #define page_to_pfn(page) ((unsigned long)(page) / PAGE_SIZE) 52 #define pfn_to_page(pfn) (void *)((pfn) * PAGE_SIZE) 104 return (unsigned long)malloc(PAGE_SIZE); in __get_free_page()
|
/tools/testing/selftests/proc/ |
D | proc-self-map-files-002.c | 49 const int PAGE_SIZE = sysconf(_SC_PAGESIZE); in main() local 64 for (va = 0; va < va_max; va += PAGE_SIZE) { in main() 65 p = mmap((void *)va, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0); in main() 75 b = (unsigned long)p + PAGE_SIZE; in main()
|
D | thread-self.c | 49 const int PAGE_SIZE = sysconf(_SC_PAGESIZE); in main() local 56 stack = mmap(NULL, 2 * PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in main() 59 pid = clone(f, stack + PAGE_SIZE, CLONE_THREAD|CLONE_SIGHAND|CLONE_VM, (void *)1); in main()
|
D | proc-self-map-files-001.c | 49 const unsigned int PAGE_SIZE = sysconf(_SC_PAGESIZE); in main() local 58 p = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE, fd, 0); in main() 63 b = (unsigned long)p + PAGE_SIZE; in main()
|
D | proc-pid-vm.c | 107 #define PAGE_SIZE 4096 macro 306 VADDR, VADDR + PAGE_SIZE, in main() 386 VADDR, VADDR + PAGE_SIZE); in main()
|
/tools/virtio/linux/ |
D | kernel.h | 23 #define PAGE_SIZE getpagesize() macro 24 #define PAGE_MASK (~(PAGE_SIZE-1)) 25 #define PAGE_ALIGN(x) ((x + PAGE_SIZE - 1) & PAGE_MASK) 47 #define offset_in_page(p) (((unsigned long)p) % PAGE_SIZE) 100 posix_memalign(&p, PAGE_SIZE, PAGE_SIZE); in __get_free_page()
|
/tools/testing/selftests/x86/ |
D | test_mremap_vdso.c | 23 #define PAGE_SIZE 4096 macro 68 unsigned long vdso_size = PAGE_SIZE; in main() 82 vdso_size += PAGE_SIZE; in main()
|
D | sysret_rip.c | 137 if (ip <= (1UL << 47) - PAGE_SIZE) { in test_syscall_fallthrough_to() 178 test_syscall_fallthrough_to((1UL << 47) - 2*PAGE_SIZE); in main() 182 test_syscall_fallthrough_to((1UL<<i) - PAGE_SIZE); in main()
|
D | protection_keys.c | 178 __attribute__((__aligned__(PAGE_SIZE))) 761 ret = mprotect_pkey((void *)ptr, PAGE_SIZE, prot, pkey); in malloc_pkey_with_mprotect() 1076 iov.iov_len = PAGE_SIZE; in test_kernel_gup_of_access_disabled_region() 1120 err = sys_mprotect_pkey(ptr, PAGE_SIZE, PROT_READ, i); in test_pkey_syscalls_on_non_allocated_pkey() 1132 err = sys_mprotect_pkey(ptr, PAGE_SIZE, PROT_READ, bad_pkey); in test_pkey_syscalls_bad_args() 1249 int *plain_ptr = ALIGN_PTR_UP(plain_ptr_unaligned, PAGE_SIZE); in test_ptrace_of_child() 1317 p1 = ALIGN_PTR_UP(&lots_o_noops_around_write, PAGE_SIZE); in get_pointer_to_instructions() 1323 p1 += PAGE_SIZE; in get_pointer_to_instructions() 1329 madvise(p1, PAGE_SIZE, MADV_DONTNEED); in get_pointer_to_instructions() 1346 ret = mprotect_pkey(p1, PAGE_SIZE, PROT_EXEC, (u64)pkey); in test_executing_on_unreadable_memory() [all …]
|
D | pkey-helpers.h | 142 #define PAGE_SIZE 4096 macro
|
/tools/testing/selftests/ptrace/ |
D | peeksiginfo.c | 35 #ifndef PAGE_SIZE 36 #define PAGE_SIZE sysconf(_SC_PAGESIZE) macro 54 addr_rw = mmap(NULL, 2 * PAGE_SIZE, PROT_READ | PROT_WRITE, in check_error_paths() 61 addr_ro = mmap(addr_rw + PAGE_SIZE, PAGE_SIZE, PROT_READ, in check_error_paths() 101 munmap(addr_rw, 2 * PAGE_SIZE); in check_error_paths()
|
/tools/testing/nvdimm/ |
D | dax-dev.c | 15 addr = pgoff * PAGE_SIZE + res->start; in dax_pgoff_to_phys() 21 if (dev_dax->region->align > PAGE_SIZE) in dax_pgoff_to_phys()
|
/tools/testing/selftests/cgroup/ |
D | cgroup_util.c | 128 char buf[PAGE_SIZE]; in cg_read_strstr() 148 char buf[PAGE_SIZE]; in cg_read_key_long() 176 char buf[10 * PAGE_SIZE]; in cg_find_unified_root() 210 char buf[10 * PAGE_SIZE] = {0}; in cg_wait_for_proc_count() 235 char buf[PAGE_SIZE]; in cg_killall() 342 char buf[PAGE_SIZE]; in alloc_pagecache() 369 for (ptr = buf; ptr < buf + size; ptr += PAGE_SIZE) in alloc_anon() 378 char buf[PAGE_SIZE]; in is_swap_enabled()
|
D | cgroup_util.h | 4 #define PAGE_SIZE 4096 macro
|
D | test_memcontrol.c | 31 char buf[PAGE_SIZE]; in test_memcg_subtree_control() 97 for (ptr = buf; ptr < buf + size; ptr += PAGE_SIZE) in alloc_anon_50M_check() 691 for (ptr = buf; ptr < buf + size; ptr += PAGE_SIZE) in alloc_anon_50M_check_swap()
|
/tools/testing/selftests/powerpc/benchmarks/ |
D | mmap_bench.c | 17 #define PAGE_SIZE (1UL << 16) macro 18 #define CHUNK_COUNT (MEMSIZE/PAGE_SIZE)
|
/tools/power/acpi/os_specific/service_layers/ |
D | osunixmap.c | 43 #ifdef PAGE_SIZE in acpi_os_get_page_size() 44 return PAGE_SIZE; in acpi_os_get_page_size()
|
/tools/virtio/virtio-trace/ |
D | trace-agent.c | 17 #define PAGE_SIZE (sysconf(_SC_PAGE_SIZE)) macro 19 #define PIPE_MIN_SIZE (PAGE_SIZE*PIPE_DEF_BUFS) 96 round = value & (PAGE_SIZE - 1); in parse_size()
|
/tools/testing/selftests/kvm/x86_64/ |
D | smm_test.c | 23 #define PAGE_SIZE 4096 macro 27 #define SMRAM_PAGES (SMRAM_SIZE / PAGE_SIZE)
|
D | vmx_tsc_adjust_test.c | 35 #define PAGE_SIZE 4096 macro
|
/tools/testing/selftests/sysctl/ |
D | sysctl.sh | 87 if [ -z $PAGE_SIZE ]; then 88 PAGE_SIZE=$(getconf PAGESIZE) 91 MAX_DIGITS=$(($PAGE_SIZE/8))
|