/linux/tools/testing/selftests/mm/ |
H A D | va_high_addr_switch.c | 43 unsigned long pagesize = getpagesize(); in testcases_init() local 51 /* Post LPA2, the lower userspace VA on a 16K pagesize is 47 bits. */ in testcases_init() 52 if (pagesize != (16UL << 10)) { in testcases_init() 64 .addr = ((void *)(addr_switch_hint - pagesize)), in testcases_init() 65 .size = pagesize, in testcases_init() 67 .msg = "mmap(addr_switch_hint - pagesize, pagesize)", in testcases_init() 77 .addr = ((void *)(addr_switch_hint - pagesize)), in testcases_init() 78 .size = 2 * pagesize, in testcases_init() 80 .msg = "mmap(addr_switch_hint - pagesize, (2 * pagesize))", in testcases_init() 89 .size = pagesize, in testcases_init() [all …]
|
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 84 ksft_exit_fail_msg("Reading PMD pagesize faile in test_hugepage() 127 test_mprotect(int pagemap_fd,int pagesize,bool anon) test_mprotect() argument 180 test_mprotect_anon(int pagemap_fd,int pagesize) test_mprotect_anon() argument 185 test_mprotect_file(int pagemap_fd,int pagesize) test_mprotect_file() argument 193 int pagesize; main() local [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 | 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 | hugetlb_dio.c | 96 size_t pagesize = 0; in main() local 114 pagesize = psize(); in main() 116 /* start and end is aligned to pagesize */ in main() 117 run_dio_using_hugetlb(0, (pagesize * 3)); in main() 120 run_dio_using_hugetlb(0, (pagesize * 3) - (pagesize / 2)); in main() 123 run_dio_using_hugetlb(pagesize / 2, (pagesize * 3)); in main() 126 run_dio_using_hugetlb(pagesize / 2, (pagesize * 3) + (pagesize / 2)); in main()
|
H A D | split_huge_page_test.c | 23 uint64_t pagesize; variable 227 /* remap the first pagesize of first THP */ in split_pte_mapped_thp() 228 pte_mapped = mremap(one_page, pagesize, pagesize, MREMAP_MAYMOVE); in split_pte_mapped_thp() 230 /* remap the Nth pagesize of Nth THP */ in split_pte_mapped_thp() 232 pte_mapped2 = mremap(one_page + pmd_pagesize * i + pagesize * i, in split_pte_mapped_thp() 233 pagesize, pagesize, in split_pte_mapped_thp() 235 pte_mapped + pagesize * i); in split_pte_mapped_thp() 242 for (i = 0; i < pagesize * 4; i++) in split_pte_mapped_thp() 243 if (i % pagesize == 0 && in split_pte_mapped_thp() 252 (uint64_t)pte_mapped + pagesize * 4, 0); in split_pte_mapped_thp() [all …]
|
H A D | cow.c | 34 static size_t pagesize; variable 46 return __builtin_ctzll(size / pagesize); in sz2ord() 67 kb = (pagesize >> 10) << i; in detect_thp_sizes() 102 for (; size; addr += pagesize, size -= pagesize) in range_is_swapped() 746 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in do_run_with_base_page() 753 ret = madvise(mem, pagesize, MADV_NOHUGEPAGE); 761 memset(mem, 0, pagesize); 764 madvise(mem, pagesize, MADV_PAGEOUT); 771 fn(mem, pagesize, fals [all...] |
H A D | hugepage-vmemmap.c | 25 static size_t pagesize; variable 45 lseek(fd, (unsigned long)addr / pagesize * sizeof(pagemap), SEEK_SET); in virt_to_pfn() 75 for (i = 1; i < maplength / pagesize; i++) { in check_page_flags() 95 pagesize = psize(); in main()
|
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() 256 fn(fd, pagesize); in run_with_tmpfile() 279 fn(fd, pagesize); in run_with_local_tmpfile() 302 fn(fd, pagesize); in run_with_memfd_hugetlb() 451 pagesize = getpagesize(); in main()
|
H A D | hugetlb-read-hwpoison.c | 179 const unsigned long pagesize = getpagesize(); in test_hugetlb_read_hwpoison() local 202 hwp_addr = filemap + len / 2 + pagesize; in test_hugetlb_read_hwpoison() 203 if (madvise(hwp_addr, pagesize, MADV_HWPOISON) < 0) { in test_hugetlb_read_hwpoison() 214 len / 2 + pagesize)) in test_hugetlb_read_hwpoison() 222 len / 2 + MAX(2 * pagesize, wr_chunk_size), in test_hugetlb_read_hwpoison() 223 len / 2 - MAX(2 * pagesize, wr_chunk_size))) in test_hugetlb_read_hwpoison()
|
/linux/drivers/misc/sgi-gru/ |
H A D | gruhandles.c | 135 int asid, int pagesize, int global, int n, in tgh_invalidate() argument 140 tgh->pagesize = pagesize; in tgh_invalidate() 153 int pagesize) in tfh_write_only() argument 160 tfh->pagesize = pagesize; in tfh_write_only() 169 int pagesize) in tfh_write_restart() argument 176 tfh->pagesize = pagesize; in tfh_write_restart()
|
H A D | gruhandles.h | 204 unsigned int pagesize:5; member 291 unsigned int pagesize:5; member 343 /* GRU paddr shift for pfn. (NOTE: shift is NOT by actual pagesize) */ 482 * Convert a processor pagesize into the strange encoded pagesize used by the 483 * GRU. Processor pagesize is encoded as log of bytes per page. (or PAGE_SHIFT) 484 * pagesize log pagesize grupagesize 508 unsigned long vaddrmask, int asid, int pagesize, int global, int n, 511 int gaa, unsigned long vaddr, int asid, int dirty, int pagesize); 513 int gaa, unsigned long vaddr, int asid, int dirty, int pagesize);
|
/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() 729 * redundancy data. Returns (pagesize+64)*pages bytes in data. 748 data, (MEDIA_INFO(us).pagesize + 64) * pages, NULL); in alauda_read_block_raw() 753 * data. Returns pagesize*pages bytes in data. Note that data must be big enough 754 * to hold (pagesize+64)*pages bytes of data, but you can ignore those 'extra' 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() [all …]
|
/linux/drivers/net/ethernet/ibm/ehea/ |
H A D | ehea_qmr.c | 29 queue->current_q_offset += queue->pagesize; in hw_qpageit_get_inc() 31 queue->current_q_offset -= queue->pagesize; in hw_qpageit_get_inc() 41 const u32 pagesize, const u32 qe_size) in hw_queue_ctor() argument 43 int pages_per_kpage = PAGE_SIZE / pagesize; in hw_queue_ctor() 46 if ((pagesize > PAGE_SIZE) || (!pages_per_kpage)) { in hw_queue_ctor() 47 pr_err("pagesize conflict! kernel pagesize=%d, ehea pagesize=%d\n", in hw_queue_ctor() 48 (int)PAGE_SIZE, (int)pagesize); in hw_queue_ctor() 52 queue->queue_length = nr_of_pages * pagesize; in hw_queue_ctor() 70 kpage += pagesize; in hw_queue_ctor() 77 queue->pagesize = pagesize; in hw_queue_ctor() [all …]
|
/linux/drivers/mtd/nand/raw/ |
H A D | nand_samsung.c | 25 /* Get pagesize */ in samsung_nand_decode_id() 26 memorg->pagesize = 2048 << (extid & 0x03); in samsung_nand_decode_id() 27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id() 69 memorg->pagesize; in samsung_nand_decode_id()
|
/linux/Documentation/devicetree/bindings/eeprom/ |
H A D | at25.yaml | 49 pagesize: 99 Size of the eeprom page. Deprecated, use "pagesize" property instead. 118 - pagesize 139 pagesize = <64>;
|
/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()
|
/linux/arch/arm/boot/dts/aspeed/ |
H A D | aspeed-bmc-inventec-transformers.dts | 134 pagesize = <128>; 177 pagesize = <128>; 183 pagesize = <128>; 229 pagesize = <128>; 241 pagesize = <128>; 253 pagesize = <128>;
|
/linux/arch/arm64/mm/ |
H A D | hugetlbpage.c | 71 size_t pagesize = huge_page_size(h); in arch_hugetlb_migration_supported() local 73 if (!__hugetlb_valid_size(pagesize)) { in arch_hugetlb_migration_supported() 75 __func__, pagesize); in arch_hugetlb_migration_supported() 362 size_t pagesize = 1UL << shift; in arch_make_huge_pte() local 365 if (pagesize == CONT_PTE_SIZE) { in arch_make_huge_pte() 367 } else if (pagesize == CONT_PMD_SIZE) { in arch_make_huge_pte() 369 } else if (pagesize != PUD_SIZE && pagesize != PMD_SIZE) { in arch_make_huge_pte() 371 __func__, pagesize); in arch_make_huge_pte()
|
/linux/arch/loongarch/lib/ |
H A D | dump_tlb.c | 22 pr_info("PageSize : 0x%0x\n", read_csr_pagesize()); in dump_tlb_regs() 34 unsigned int pagesize, c0, c1, i; in dump_tlb() local 47 pagesize = read_csr_pagesize(); in dump_tlb() 67 pr_info("Index: %4d pgsize=0x%x ", i, (1 << pagesize)); in dump_tlb()
|
/linux/drivers/iommu/amd/ |
H A D | amd_iommu_types.h | 349 * Pagesize is expected to be a power-of-two 351 #define PAGE_SIZE_LEVEL(pagesize) \ argument 352 ((__ffs(pagesize) - 12) / 9) 355 * Pagesize is expected to be a power-of-two 357 #define PAGE_SIZE_PTE_COUNT(pagesize) \ argument 358 (1ULL << ((__ffs(pagesize) - 12) % 9)) 362 * Pagesize is expected to be a power-of-two 364 #define PAGE_SIZE_ALIGN(address, pagesize) \ argument 365 ((address) & ~((pagesize) - 1)) 367 * Creates an IOMMU PTE for an address and a given pagesize [all …]
|
/linux/drivers/gpu/drm/nouveau/include/nvrm/535.113.01/common/sdk/nvidia/inc/ctrl/ |
H A D | ctrl90f1.h | 50 NV_DECLARE_ALIGNED(NvU64 pageSize, 8); 54 * This must be aligned to pageSize. 60 * This (+1) must be aligned to pageSize.
|
/linux/drivers/mtd/devices/ |
H A D | mtd_dataflash.c | 622 int pagesize, int pageoffset, char revision) in add_dataflash_otp() argument 636 priv->page_size = pagesize; in add_dataflash_otp() 646 device->size = nr_pages * pagesize; in add_dataflash_otp() 647 device->erasesize = pagesize; in add_dataflash_otp() 648 device->writesize = pagesize; in add_dataflash_otp() 662 dev_info(&spi->dev, "%s (%lld KBytes) pagesize %d bytes%s\n", in add_dataflash_otp() 664 pagesize, otp_tag); in add_dataflash_otp() 679 int nr_pages, int pagesize, int pageoffset) in add_dataflash() argument 681 return add_dataflash_otp(spi, name, nr_pages, pagesize, in add_dataflash() 695 u16 pagesize; member [all …]
|
/linux/arch/mips/dec/prom/ |
H A D | memory.c | 73 mem_size += (8 * bm->pagesize); in rex_setup_memory_region() 75 mem_start += (8 * bm->pagesize); in rex_setup_memory_region() 78 mem_start += mem_size + (8 * bm->pagesize); in rex_setup_memory_region()
|
/linux/Documentation/userspace-api/media/dvb/ |
H A D | dmx-mmap.rst | 33 multiple of the pagesize and mmap will fail when the specified 57 ``start`` must be a multiple of the pagesize. Use of this option is 106 they are too large, or not aligned on a ``PAGESIZE`` boundary.)
|