/openbmc/qemu/tests/tcg/multiarch/ |
H A D | test-mmap.c | 45 static unsigned int pagesize; variable 62 len = pagesize + (pagesize * i); in check_aligned_anonymous_unfixed_mmaps() 96 memcpy(dummybuf, p1, pagesize); in check_aligned_anonymous_unfixed_mmaps() 97 memcpy(dummybuf, p2, pagesize); in check_aligned_anonymous_unfixed_mmaps() 98 memcpy(dummybuf, p3, pagesize); in check_aligned_anonymous_unfixed_mmaps() 99 memcpy(dummybuf, p4, pagesize); in check_aligned_anonymous_unfixed_mmaps() 100 memcpy(dummybuf, p5, pagesize); in check_aligned_anonymous_unfixed_mmaps() 129 memcpy (dummybuf, p1, pagesize); in check_large_anonymous_unfixed_mmap() 145 p1 = mmap(NULL, pagesize, PROT_READ, in check_aligned_anonymous_unfixed_colliding_mmaps() 150 memcpy(dummybuf, p1, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps() [all …]
|
H A D | vma-pthread.c | 37 int pagesize; member 54 p = &ctx->ptr[j * ctx->pagesize]; in thread_read() 89 memcpy(&ctx->ptr[j * ctx->pagesize], nop_func, sizeof(nop_func)); in thread_write() 92 ts = (struct timespec *)(&ctx->ptr[(j + 1) * ctx->pagesize] - in thread_write() 111 ((void(*)(void))&ctx->ptr[j * ctx->pagesize])(); in thread_execute() 147 ret = mprotect(&ctx->ptr[start_idx * ctx->pagesize], in thread_mutate() 148 (end_idx - start_idx + 1) * ctx->pagesize, prot); in thread_mutate() 170 ctx.pagesize = getpagesize(); in main() 171 ctx.ptr = mmap(NULL, PAGE_COUNT * ctx.pagesize, in main() 176 memcpy(&ctx.ptr[i * ctx.pagesize], nop_func, sizeof(nop_func)); in main() [all …]
|
H A D | prot-none.c | 18 long pagesize = sysconf(_SC_PAGESIZE); in main() local 22 p = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, in main() 25 q = p + pagesize - 1; in main() 28 err = mprotect(p, pagesize * 2, PROT_NONE); in main() 33 err = mprotect(p, pagesize * 2, PROT_READ); in main()
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | soft-dirty.c | 15 static void test_simple(int pagemap_fd, int pagesize) in test_simple() argument 20 map = aligned_alloc(pagesize, pagesize); in test_simple() 48 static void test_vma_reuse(int pagemap_fd, int pagesize) in test_vma_reuse() argument 52 map = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse() 61 munmap(map, pagesize); in test_vma_reuse() 63 map2 = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse() 74 munmap(map2, pagesize); in test_vma_reuse() 77 static void test_hugepage(int pagemap_fd, int pagesize) in test_hugepage() argument 127 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument 135 map = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, in test_mprotect() [all …]
|
H A D | mkdirty.c | 28 static size_t pagesize; variable 94 mem = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0); in test_ptrace_write() 119 munmap(mem, pagesize); in test_ptrace_write() 148 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in test_ptrace_write_thp() 164 mem = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, in test_page_migration() 172 memset(mem, 1, pagesize); in test_page_migration() 173 if (mprotect(mem, pagesize, PROT_READ)) { in test_page_migration() 179 if (syscall(__NR_mbind, mem, pagesize, MPOL_LOCAL, NULL, 0x7fful, in test_page_migration() 187 munmap(mem, pagesize); in test_page_migration() 205 memset(mem, 1, pagesize); in test_page_migration_thp() [all …]
|
H A D | madv_populate.c | 28 static size_t pagesize; variable 35 addr = mmap(0, pagesize, PROT_READ | PROT_WRITE, in sense_support() 40 ret = madvise(addr, pagesize, MADV_POPULATE_READ); in sense_support() 44 ret = madvise(addr, pagesize, MADV_POPULATE_WRITE); in sense_support() 48 munmap(addr, pagesize); in sense_support() 104 ret = munmap(addr + pagesize, pagesize); in test_holes() 117 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_READ); in test_holes() 120 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_WRITE); in test_holes() 125 ret = madvise(addr + pagesize, pagesize, MADV_POPULATE_READ); in test_holes() 128 ret = madvise(addr + pagesize, pagesize, MADV_POPULATE_WRITE); in test_holes() [all …]
|
H A D | split_huge_page_test.c | 21 uint64_t pagesize; variable 178 pte_mapped = mremap(one_page, pagesize, pagesize, MREMAP_MAYMOVE); in split_pte_mapped_thp() 182 pte_mapped2 = mremap(one_page + pmd_pagesize * i + pagesize * i, in split_pte_mapped_thp() 183 pagesize, pagesize, in split_pte_mapped_thp() 185 pte_mapped + pagesize * i); in split_pte_mapped_thp() 194 for (i = 0; i < pagesize * 4; i++) in split_pte_mapped_thp() 195 if (i % pagesize == 0 && in split_pte_mapped_thp() 206 (uint64_t)pte_mapped + pagesize * 4); in split_pte_mapped_thp() 210 for (i = 0; i < pagesize * 4; i++) { in split_pte_mapped_thp() 215 if (i % pagesize == 0 && in split_pte_mapped_thp() [all …]
|
H A D | cow.c | 33 static size_t pagesize; variable 68 for (; size; addr += pagesize, size -= pagesize) in range_is_swapped() 684 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in do_run_with_base_page() 691 ret = madvise(mem, pagesize, MADV_NOHUGEPAGE); in do_run_with_base_page() 699 memset(mem, 0, pagesize); in do_run_with_base_page() 702 madvise(mem, pagesize, MADV_PAGEOUT); in do_run_with_base_page() 709 fn(mem, pagesize); in do_run_with_base_page() 711 munmap(mem, pagesize); in do_run_with_base_page() 766 if (!pagemap_is_populated(pagemap_fd, mem + pagesize)) { in do_run_with_thp() 783 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_run_with_thp() [all …]
|
H A D | gup_longterm.c | 33 static size_t pagesize; variable 104 if (size == pagesize) in do_test() 114 if (size == pagesize || shared) in do_test() 248 fn(fd, pagesize); in run_with_memfd() 271 fn(fd, pagesize); in run_with_tmpfile() 293 fn(fd, pagesize); in run_with_local_tmpfile() 442 pagesize = getpagesize(); in main()
|
H A D | hugepage-vmemmap.c | 39 static size_t pagesize; variable 59 lseek(fd, (unsigned long)addr / pagesize * sizeof(pagemap), SEEK_SET); in virt_to_pfn() 89 for (i = 1; i < maplength / pagesize; i++) { in check_page_flags() 109 pagesize = psize(); in main()
|
H A D | ksm_functional_tests.c | 37 static size_t pagesize; variable 48 for (offs_a = 0; offs_a < size; offs_a += pagesize) { in range_maps_duplicates() 54 for (offs_b = offs_a + pagesize; offs_b < size; in range_maps_duplicates() 55 offs_b += pagesize) { in range_maps_duplicates() 271 pages_expected = size / pagesize; in test_unmerge_zero_pages() 291 for (offs = size / 2; offs < size; offs += pagesize) in test_unmerge_zero_pages() 517 for (i = 0; i < size / 2; i += pagesize) { in test_prot_none() 549 pagesize = getpagesize(); in main()
|
/openbmc/qemu/tests/tcg/multiarch/linux/ |
H A D | linux-madvise.c | 8 int pagesize = getpagesize(); in test_anonymous() local 12 page = mmap(NULL, pagesize, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in test_anonymous() 16 ret = mprotect(page, pagesize, PROT_READ | PROT_WRITE); in test_anonymous() 21 ret = madvise(page, pagesize, MADV_DONTNEED); in test_anonymous() 25 ret = munmap(page, pagesize); in test_anonymous() 32 int pagesize = getpagesize(); in test_file() local 45 ret = ftruncate(fd, pagesize); in test_file() 47 page = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE, fd, 0); in test_file() 51 ret = mprotect(page, pagesize, PROT_READ | PROT_WRITE); in test_file() 56 ret = madvise(page, pagesize, MADV_DONTNEED); in test_file() [all …]
|
/openbmc/linux/drivers/misc/sgi-gru/ |
H A D | gruhandles.c | 141 int asid, int pagesize, int global, int n, in tgh_invalidate() argument 146 tgh->pagesize = pagesize; in tgh_invalidate() 159 int pagesize) in tfh_write_only() argument 166 tfh->pagesize = pagesize; in tfh_write_only() 175 int pagesize) in tfh_write_restart() argument 182 tfh->pagesize = pagesize; in tfh_write_restart()
|
/openbmc/u-boot/arch/arm/mach-at91/arm926ejs/ |
H A D | eflash.c | 59 static u32 pagesize; variable 84 pagesize = readl(&eefc->frr); /* word 2 */ in flash_init() 88 id, size, pagesize, nplanes, planesize); in flash_init() 154 u32 pagenum = (info->start[sector]-ATMEL_BASE_FLASH)/pagesize; in flash_real_protect() 228 if (addr % pagesize) { in write_buff() 235 pagenum = (addr-ATMEL_BASE_FLASH)/pagesize; in write_buff() 239 i = pagesize / 4; in write_buff() 247 if (cnt > pagesize) in write_buff() 248 cnt -= pagesize; in write_buff()
|
/openbmc/u-boot/arch/powerpc/cpu/mpc85xx/ |
H A D | mp.c | 179 u32 determine_mp_bootpg(unsigned int *pagesize) in determine_mp_bootpg() argument 193 if (pagesize) in determine_mp_bootpg() 194 *pagesize = 4096; in determine_mp_bootpg() 216 if (pagesize) in determine_mp_bootpg() 217 *pagesize = 8192; in determine_mp_bootpg() 249 static void plat_mp_up(unsigned long bootpg, unsigned int pagesize) in plat_mp_up() argument 272 if (pagesize == 8192) in plat_mp_up() 328 static void plat_mp_up(unsigned long bootpg, unsigned int pagesize) in plat_mp_up() argument 420 u32 bootpg, bootpg_map, pagesize; in setup_mp() local 422 bootpg = determine_mp_bootpg(&pagesize); in setup_mp() [all …]
|
/openbmc/u-boot/drivers/mtd/onenand/ |
H A D | onenand_spl.c | 82 enum onenand_spl_pagesize pagesize) in onenand_spl_read_page() argument 110 for (offset = 0; offset < pagesize; offset += 4) in onenand_spl_read_page() 173 enum onenand_spl_pagesize pagesize; in onenand_spl_load_image() local 176 pagesize = onenand_spl_get_geometry(); in onenand_spl_load_image() 182 if (pagesize == 2048) { in onenand_spl_load_image() 193 ret = onenand_spl_read_page(block, rpage, addr, pagesize); in onenand_spl_load_image() 197 addr += pagesize / 4; in onenand_spl_load_image()
|
/openbmc/linux/drivers/usb/storage/ |
H A D | alauda.c | 87 unsigned int pagesize; /* page size in bytes */ member 433 MEDIA_INFO(us).pagesize = 1 << media_info->pageshift; in alauda_init_media() 748 data, (MEDIA_INFO(us).pagesize + 64) * pages, NULL); in alauda_read_block_raw() 761 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_read_block() local 769 int dest_offset = i * pagesize; in alauda_read_block() 770 int src_offset = i * (pagesize + 64); in alauda_read_block() 771 memmove(data + dest_offset, data + src_offset, pagesize); in alauda_read_block() 799 (MEDIA_INFO(us).pagesize + 64) * MEDIA_INFO(us).blocksize, in alauda_write_block() 820 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_write_lba() local 853 memset(blockbuffer, 0, blocksize * (pagesize + 64)); in alauda_write_lba() [all …]
|
/openbmc/openbmc/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/system/core/ |
H A D | fix-build-on-non-x86.patch | 12 + size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); 13 + if (cmsg_space >= pagesize) { 22 + size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); 23 + if (cmsg_space >= pagesize) {
|
/openbmc/openbmc/meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/ |
H A D | fix-build-on-non-x86.patch | 12 + size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); 13 + if (cmsg_space >= pagesize) { 22 + size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); 23 + if (cmsg_space >= pagesize) {
|
/openbmc/linux/tools/testing/selftests/powerpc/tm/ |
H A D | tm-signal-pagefault.c | 52 static size_t pagesize; variable 78 uf_mem_offset = (uf_mem_offset + pagesize - 1) & ~(pagesize - 1); in get_uf_mem() 122 uffdio_copy.dst = msg.arg.pagefault.address & ~(pagesize-1); in fault_handler_thread() 127 uffdio_copy.len = pagesize; in fault_handler_thread() 145 pagesize = sysconf(_SC_PAGE_SIZE); in setup_uf_mem()
|
/openbmc/u-boot/tools/ |
H A D | mtk_image.c | 402 tparams->header_size = 2 * le16_to_cpu(hdr_nand->pagesize); in mtk_image_vrec_header() 475 bh = (struct brom_layout_header *)(ptr + le16_to_cpu(nh->pagesize)); in mtk_image_verify_nand_header() 498 (uint64_t)le16_to_cpu(nh->pagesize) * 8; in mtk_image_verify_nand_header() 503 if (le16_to_cpu(nh->pagesize) >= 1024) in mtk_image_verify_nand_header() 505 le16_to_cpu(nh->pagesize) >> 10); in mtk_image_verify_nand_header() 508 le16_to_cpu(nh->pagesize)); in mtk_image_verify_nand_header() 513 gfh = (struct gfh_header *)(ptr + 2 * le16_to_cpu(nh->pagesize)); in mtk_image_verify_nand_header() 694 payload_pages = (filesize + le16_to_cpu(hdr_nand->pagesize) - 1) / in mtk_image_set_nand_header() 695 le16_to_cpu(hdr_nand->pagesize); in mtk_image_set_nand_header() 697 (ptr + le16_to_cpu(hdr_nand->pagesize)); in mtk_image_set_nand_header() [all …]
|
/openbmc/openbmc/poky/meta/recipes-devtools/patchelf/patchelf/ |
H A D | 0002-align-startOffset-with-p_align-instead-of-pagesize-f.patch | 4 Subject: [PATCH] align startOffset with p_align instead of pagesize for 8 should satisfy (p_vaddr mod pagesize) == (p_offset mod pagesize). However, 36 + (p_vaddr mod pagesize) == (p_offset mod pagesize), so glibc is probably
|
/openbmc/u-boot/include/linux/mtd/ |
H A D | nand.h | 28 unsigned int pagesize; member 40 .pagesize = (ps), \ 244 return nand->memorg.pagesize; in nanddev_page_size() 279 return nand->memorg.pagesize * nand->memorg.pages_per_eraseblock; in nanddev_eraseblock_size() 305 nand->memorg.pagesize; in nanddev_target_size() 433 pageoffs = do_div(tmp, nand->memorg.pagesize); in nanddev_offs_to_pos() 493 return (loff_t)npages * nand->memorg.pagesize; in nanddev_pos_to_offs() 612 nand->memorg.pagesize - iter->req.dataoffs, in nanddev_io_iter_init() 637 iter->req.datalen = min_t(unsigned int, nand->memorg.pagesize, in nanddev_io_iter_next_page()
|
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/ |
H A D | 0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch | 51 " [ --pagesize <pagesize> ]\n" 62 unsigned pagesize = 2048; 66 fprintf(stderr,"error: unsupported page size %d\n", pagesize); 101 if(write_padding(fd, pagesize, hdr.second_size)) goto fail; 106 + if(write_padding(fd, pagesize, hdr.dt_size)) goto fail;
|
/openbmc/qemu/migration/ |
H A D | postcopy-ram.c | 344 size_t pagesize = qemu_ram_pagesize(rb); in test_ramblock_postcopiable() local 347 if (length % pagesize) { in test_ramblock_postcopiable() 351 "page size of 0x%zx", block_name, length, pagesize); in test_ramblock_postcopiable() 375 long pagesize = qemu_real_host_page_size(); in postcopy_ram_supported_by_host() local 384 if (qemu_target_page_size() > pagesize) { in postcopy_ram_supported_by_host() 438 testarea = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | in postcopy_ram_supported_by_host() 444 g_assert(QEMU_PTR_IS_ALIGNED(testarea, pagesize)); in postcopy_ram_supported_by_host() 447 reg_struct.range.len = pagesize; in postcopy_ram_supported_by_host() 456 range_struct.len = pagesize; in postcopy_ram_supported_by_host() 475 munmap(testarea, pagesize); in postcopy_ram_supported_by_host() [all …]
|