/linux-6.3-rc2/drivers/mtd/tests/ |
A D | pagetest.c | 34 static int pgsize; variable 85 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) { in verify_eraseblock() 99 memcpy(boundary, writebuf + mtd->erasesize - pgsize, pgsize); in verify_eraseblock() 100 prandom_bytes_state(&rnd_state, boundary + pgsize, pgsize); in verify_eraseblock() 121 pp2 = pp1 + pgsize; in crosstest() 122 pp3 = pp2 + pgsize; in crosstest() 123 pp4 = pp3 + pgsize; in crosstest() 134 addr = addrn - pgsize - pgsize; in crosstest() 142 addr = addrn - pgsize - pgsize - pgsize; in crosstest() 159 addr = addrn - pgsize; in crosstest() [all …]
|
A D | torturetest.c | 70 static int pgsize; variable 98 len = pgcnt * pgsize; in check_eraseblock() 152 len = pgcnt * pgsize; in write_pattern() 203 pgsize = 512; in tort_init() 205 pgsize = mtd->writesize; in tort_init() 237 memset(patt_5A5 + i * pgsize, 0x55, pgsize); in tort_init() 238 memset(patt_A5A + i * pgsize, 0xAA, pgsize); in tort_init() 240 memset(patt_5A5 + i * pgsize, 0xAA, pgsize); in tort_init() 241 memset(patt_A5A + i * pgsize, 0x55, pgsize); in tort_init() 379 check_len = pgcnt * pgsize; in report_corrupt() [all …]
|
A D | speedtest.c | 37 static int pgsize; variable 77 err = mtdtest_write(mtd, addr, pgsize, buf); in write_eraseblock_by_page() 80 addr += pgsize; in write_eraseblock_by_page() 81 buf += pgsize; in write_eraseblock_by_page() 89 size_t sz = pgsize * 2; in write_eraseblock_by_2pages() 124 addr += pgsize; in read_eraseblock_by_page() 125 buf += pgsize; in read_eraseblock_by_page() 133 size_t sz = pgsize * 2; in read_eraseblock_by_2pages() 203 pgsize = 512; in mtd_speedtest_init() 205 pgsize = mtd->writesize; in mtd_speedtest_init() [all …]
|
A D | readtest.c | 31 static int pgsize; variable 43 memset(buf, 0 , pgsize); in read_eraseblock_by_page() 44 ret = mtdtest_read(mtd, addr, pgsize, buf); in read_eraseblock_by_page() 72 addr += pgsize; in read_eraseblock_by_page() 73 buf += pgsize; in read_eraseblock_by_page() 138 pgsize = 512; in mtd_readtest_init() 140 pgsize = mtd->writesize; in mtd_readtest_init() 145 pgcnt = mtd->erasesize / pgsize; in mtd_readtest_init() 151 pgsize, ebcnt, pgcnt, mtd->oobsize); in mtd_readtest_init()
|
A D | stresstest.c | 38 static int pgsize; variable 95 len = ((len + pgsize - 1) / pgsize) * pgsize; in do_write() 154 pgsize = 512; in mtd_stresstest_init() 156 pgsize = mtd->writesize; in mtd_stresstest_init() 161 pgcnt = mtd->erasesize / pgsize; in mtd_stresstest_init() 167 pgsize, ebcnt, pgcnt, mtd->oobsize); in mtd_stresstest_init()
|
/linux-6.3-rc2/arch/arm64/mm/ |
A D | hugetlbpage.c | 111 *pgsize = PAGE_SIZE; in find_num_contig() 116 *pgsize = PMD_SIZE; in find_num_contig() 126 *pgsize = size; in num_contig_ptes() 139 *pgsize = PMD_SIZE; in num_contig_ptes() 154 size_t pgsize; in huge_ptep_get() local 254 size_t pgsize; in set_huge_pte_at() local 416 size_t pgsize; in huge_pte_clear() local 428 size_t pgsize; in huge_ptep_get_and_clear() local 473 size_t pgsize = 0; in huge_ptep_set_access_flags() local 510 size_t pgsize; in huge_ptep_set_wrprotect() local [all …]
|
/linux-6.3-rc2/tools/testing/selftests/powerpc/mm/ |
A D | pkey_exec_prot.c | 27 static unsigned long pgsize, numinsns; variable 62 if (mprotect(insns, pgsize, PROT_READ | PROT_WRITE)) { in segv_handler() 84 if (mprotect(insns, pgsize, PROT_EXEC)) { in segv_handler() 129 pgsize = getpagesize(); in test() 130 numinsns = pgsize / sizeof(unsigned int); in test() 179 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 196 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 216 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 233 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 270 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() [all …]
|
A D | exec_prot.c | 29 static unsigned long pgsize, numinsns; variable 73 if (mprotect(insns, pgsize, PROT_READ | PROT_WRITE | PROT_EXEC)) { in segv_handler() 98 FAIL_IF(mprotect(insns, pgsize, rights) != 0); in check_exec_fault() 136 pgsize = getpagesize(); in test() 137 numinsns = pgsize / sizeof(unsigned int); in test() 138 insns = (unsigned int *)mmap(NULL, pgsize, PROT_READ | PROT_WRITE, in test() 173 FAIL_IF(mprotect(insns, pgsize, PROT_EXEC) != 0); in test() 185 FAIL_IF(mprotect(insns, pgsize, PROT_EXEC) != 0); in test() 223 FAIL_IF(munmap((void *)insns, pgsize)); in test()
|
A D | pkey_siginfo.c | 38 size_t pgsize; in segv_handler() local 67 pgsize = getpagesize(); in segv_handler() 68 pgstart = (void *) ((unsigned long) fault_addr & ~(pgsize - 1)); in segv_handler() 83 mprotect(pgstart, pgsize, PROT_EXEC)) in segv_handler()
|
/linux-6.3-rc2/tools/testing/selftests/powerpc/tm/ |
A D | tm-vmxcopy.c | 39 unsigned long pgsize = getpagesize(); in test_vmxcopy() local 42 int size = pgsize*16; in test_vmxcopy() 44 char buf[pgsize]; in test_vmxcopy() 55 memset(buf, 0, pgsize); in test_vmxcopy() 56 for (i = 0; i < size; i += pgsize) in test_vmxcopy() 57 assert(write(fd, buf, pgsize) == pgsize); in test_vmxcopy()
|
/linux-6.3-rc2/drivers/iommu/amd/ |
A D | io_pgtable_v2.c | 243 phys_addr_t paddr, size_t pgsize, size_t pgcount, in iommu_v2_map_pages() argument 252 size_t size = pgcount << __ffs(pgsize); in iommu_v2_map_pages() 257 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize) || !pgcount) in iommu_v2_map_pages() 264 map_size = get_alloc_page_size(pgsize); in iommu_v2_map_pages() 295 size_t pgsize, size_t pgcount, in iommu_v2_unmap_pages() argument 302 size_t size = pgcount << __ffs(pgsize); in iommu_v2_unmap_pages() 305 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in iommu_v2_unmap_pages()
|
A D | io_pgtable.c | 364 phys_addr_t paddr, size_t pgsize, size_t pgcount, in iommu_v1_map_pages() argument 373 BUG_ON(!IS_ALIGNED(iova, pgsize)); in iommu_v1_map_pages() 374 BUG_ON(!IS_ALIGNED(paddr, pgsize)); in iommu_v1_map_pages() 381 count = PAGE_SIZE_PTE_COUNT(pgsize); in iommu_v1_map_pages() 395 __pte = PAGE_SIZE_PTE(__sme_set(paddr), pgsize); in iommu_v1_map_pages() 408 iova += pgsize; in iommu_v1_map_pages() 409 paddr += pgsize; in iommu_v1_map_pages() 412 *mapped += pgsize; in iommu_v1_map_pages() 440 size_t pgsize, size_t pgcount, in iommu_v1_unmap_pages() argument 447 size_t size = pgcount << __ffs(pgsize); in iommu_v1_unmap_pages() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/msm/ |
A D | msm_iommu.c | 40 size_t offset, pgsize, pgsize_next; in calc_pgsize() local 55 pgsize = BIT(pgsize_idx); in calc_pgsize() 57 return pgsize; in calc_pgsize() 86 return pgsize; in calc_pgsize() 96 size_t unmapped, pgsize, count; in msm_iommu_pagetable_unmap() local 98 pgsize = calc_pgsize(pagetable, iova, iova, size, &count); in msm_iommu_pagetable_unmap() 100 unmapped = ops->unmap_pages(ops, iova, pgsize, count, NULL); in msm_iommu_pagetable_unmap() 127 size_t pgsize, count, mapped = 0; in msm_iommu_pagetable_map() local 130 pgsize = calc_pgsize(pagetable, addr, phys, size, &count); in msm_iommu_pagetable_map() 132 ret = ops->map_pages(ops, addr, phys, pgsize, count, in msm_iommu_pagetable_map()
|
/linux-6.3-rc2/drivers/gpu/drm/etnaviv/ |
A D | etnaviv_mmu.c | 20 size_t pgsize = SZ_4K; in etnaviv_context_unmap() local 22 if (!IS_ALIGNED(iova | size, pgsize)) { in etnaviv_context_unmap() 24 iova, size, pgsize); in etnaviv_context_unmap() 30 pgsize); in etnaviv_context_unmap() 44 size_t pgsize = SZ_4K; in etnaviv_context_map() local 48 if (!IS_ALIGNED(iova | paddr | size, pgsize)) { in etnaviv_context_map() 50 iova, &paddr, size, pgsize); in etnaviv_context_map() 55 ret = context->global->ops->map(context, iova, paddr, pgsize, in etnaviv_context_map() 60 iova += pgsize; in etnaviv_context_map() 61 paddr += pgsize; in etnaviv_context_map() [all …]
|
/linux-6.3-rc2/drivers/iommu/ |
A D | io-pgtable-dart.c | 237 phys_addr_t paddr, size_t pgsize, size_t pgcount, in dart_map_pages() argument 247 if (WARN_ON(pgsize != cfg->pgsize_bitmap)) in dart_map_pages() 287 *mapped += num_entries * pgsize; in dart_map_pages() 299 size_t pgsize, size_t pgcount, in dart_unmap_pages() argument 307 if (WARN_ON(pgsize != cfg->pgsize_bitmap || !pgcount)) in dart_unmap_pages() 332 iova + i * pgsize, pgsize); in dart_unmap_pages() 338 return i * pgsize; in dart_unmap_pages()
|
A D | s390-iommu.c | 316 size_t pgsize, size_t pgcount, in s390_iommu_map_pages() argument 320 size_t size = pgcount << __ffs(pgsize); in s390_iommu_map_pages() 323 if (pgsize != SZ_4K) in s390_iommu_map_pages() 330 if (!IS_ALIGNED(iova | paddr, pgsize)) in s390_iommu_map_pages() 382 size_t pgsize, size_t pgcount, in s390_iommu_unmap_pages() argument 386 size_t size = pgcount << __ffs(pgsize); in s390_iommu_unmap_pages()
|
A D | io-pgtable-arm.c | 465 phys_addr_t paddr, size_t pgsize, size_t pgcount, in arm_lpae_map_pages() argument 475 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize)) in arm_lpae_map_pages() 488 ret = __arm_lpae_map(data, iova, paddr, pgsize, pgcount, prot, lvl, in arm_lpae_map_pages() 658 size_t pgsize, size_t pgcount, in arm_lpae_unmap_pages() argument 666 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in arm_lpae_unmap_pages() 674 return __arm_lpae_unmap(data, gather, iova, pgsize, pgcount, in arm_lpae_unmap_pages() 1259 static const unsigned long pgsize[] __initconst = { in arm_lpae_do_selftests() local 1281 for (i = 0; i < ARRAY_SIZE(pgsize); ++i) { in arm_lpae_do_selftests() 1283 cfg.pgsize_bitmap = pgsize[i]; in arm_lpae_do_selftests() 1286 pgsize[i], ias[j]); in arm_lpae_do_selftests()
|
A D | apple-dart.c | 217 u32 pgsize; member 528 phys_addr_t paddr, size_t pgsize, in apple_dart_map_pages() argument 538 return ops->map_pages(ops, iova, paddr, pgsize, pgcount, prot, gfp, in apple_dart_map_pages() 543 unsigned long iova, size_t pgsize, in apple_dart_unmap_pages() argument 550 return ops->unmap_pages(ops, iova, pgsize, pgcount, gather); in apple_dart_unmap_pages() 593 .pgsize_bitmap = dart->pgsize, in apple_dart_finalize_domain() 776 if (cfg_dart->pgsize != dart->pgsize) in apple_dart_of_xlate() 1088 dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]); in apple_dart_probe() 1115 dart->force_bypass = dart->pgsize > PAGE_SIZE; in apple_dart_probe() 1140 dart->pgsize, dart->num_streams, dart->supports_bypass, dart->force_bypass); in apple_dart_probe()
|
A D | io-pgtable-arm-v7s.c | 545 phys_addr_t paddr, size_t pgsize, size_t pgcount, in arm_v7s_map_pages() argument 560 ret = __arm_v7s_map(data, iova, paddr, pgsize, prot, 1, data->pgd, in arm_v7s_map_pages() 565 iova += pgsize; in arm_v7s_map_pages() 566 paddr += pgsize; in arm_v7s_map_pages() 567 *mapped += pgsize; in arm_v7s_map_pages() 739 size_t pgsize, size_t pgcount, in arm_v7s_unmap_pages() argument 749 ret = __arm_v7s_unmap(data, gather, iova, pgsize, 1, data->pgd); in arm_v7s_unmap_pages() 753 unmapped += pgsize; in arm_v7s_unmap_pages() 754 iova += pgsize; in arm_v7s_unmap_pages()
|
/linux-6.3-rc2/drivers/vfio/ |
A D | vfio_iommu_type1.c | 1152 size_t pgsize) in update_user_bitmap() argument 1276 size_t unmapped = 0, pgsize; in vfio_dma_do_unmap() local 1294 pgsize = (size_t)1 << pgshift; in vfio_dma_do_unmap() 1296 if (iova & (pgsize - 1)) in vfio_dma_do_unmap() 1310 (!iommu->dirty_page_tracking || (bitmap->pgsize != pgsize))) { in vfio_dma_do_unmap() 1314 WARN_ON((pgsize - 1) & PAGE_MASK); in vfio_dma_do_unmap() 1403 iova, pgsize); in vfio_dma_do_unmap() 1557 size_t pgsize; in vfio_dma_do_map() local 2877 pgshift = __ffs(bitmap.pgsize); in vfio_iommu_type1_unmap_dma() 2918 size_t pgsize; in vfio_iommu_type1_dirty_pages() local [all …]
|
/linux-6.3-rc2/drivers/infiniband/hw/bnxt_re/ |
A D | qplib_res.c | 97 rdma_umem_for_each_dma_block(sginfo->umem, &biter, sginfo->pgsize) { in bnxt_qplib_fill_user_dma_pages() 117 pages = ib_umem_num_dma_blocks(sginfo->umem, sginfo->pgsize); in __alloc_pbl() 132 pbl->pg_size = sginfo->pgsize; in __alloc_pbl() 196 pg_size = hwq_attr->sginfo->pgsize; in bnxt_qplib_alloc_init_hwq() 219 hwq_attr->sginfo->umem, hwq_attr->sginfo->pgsize); in bnxt_qplib_alloc_init_hwq() 252 sginfo.pgsize = npde * pg_size; in bnxt_qplib_alloc_init_hwq() 258 sginfo.pgsize = PAGE_SIZE; in bnxt_qplib_alloc_init_hwq() 317 sginfo.pgsize = PAGE_SIZE; in bnxt_qplib_alloc_init_hwq() 401 sginfo.pgsize = PAGE_SIZE; in bnxt_qplib_alloc_tqm_rings() 518 sginfo.pgsize = PAGE_SIZE; in bnxt_qplib_alloc_ctx()
|
/linux-6.3-rc2/drivers/gpu/drm/panfrost/ |
A D | panfrost_mmu.c | 304 size_t pgsize = get_pgsize(iova | paddr, len, &pgcount); in mmu_map_sg() local 306 ops->map_pages(ops, iova, paddr, pgsize, pgcount, prot, in mmu_map_sg() 309 mapped = max(mapped, pgsize); in mmu_map_sg() 365 size_t pgsize = get_pgsize(iova, len - unmapped_len, &pgcount); in panfrost_mmu_unmap() local 370 unmapped_page = ops->unmap_pages(ops, iova, pgsize, pgcount, NULL); in panfrost_mmu_unmap() 371 WARN_ON(unmapped_page != pgsize * pgcount); in panfrost_mmu_unmap() 373 iova += pgsize * pgcount; in panfrost_mmu_unmap() 374 unmapped_len += pgsize * pgcount; in panfrost_mmu_unmap()
|
/linux-6.3-rc2/drivers/iommu/iommufd/ |
A D | selftest.c | 135 size_t pgsize, size_t pgcount, int prot, in mock_domain_map_pages() argument 151 WARN_ON(pgsize % MOCK_IO_PAGE_SIZE); in mock_domain_map_pages() 155 for (cur = 0; cur != pgsize; cur += MOCK_IO_PAGE_SIZE) { in mock_domain_map_pages() 158 if (pgcount == 1 && cur + MOCK_IO_PAGE_SIZE == pgsize) in mock_domain_map_pages() 183 unsigned long iova, size_t pgsize, in mock_domain_unmap_pages() argument 194 WARN_ON(pgsize % MOCK_IO_PAGE_SIZE); in mock_domain_unmap_pages() 199 for (cur = 0; cur != pgsize; cur += MOCK_IO_PAGE_SIZE) { in mock_domain_unmap_pages() 215 if (pgcount == 1 && cur + MOCK_IO_PAGE_SIZE == pgsize) in mock_domain_unmap_pages()
|
/linux-6.3-rc2/arch/powerpc/kvm/ |
A D | book3s_64_mmu.c | 206 int pgsize; in kvmppc_mmu_book3s_64_xlate() local 242 pgsize = slbe->large ? MMU_PAGE_16M : MMU_PAGE_4K; in kvmppc_mmu_book3s_64_xlate() 271 pgsize = decode_pagesize(slbe, pte1); in kvmppc_mmu_book3s_64_xlate() 272 if (pgsize < 0) in kvmppc_mmu_book3s_64_xlate() 296 eaddr_mask = (1ull << mmu_pagesize(pgsize)) - 1; in kvmppc_mmu_book3s_64_xlate() 298 gpte->page_size = pgsize; in kvmppc_mmu_book3s_64_xlate()
|
/linux-6.3-rc2/include/linux/ |
A D | io-pgtable.h | 162 phys_addr_t paddr, size_t pgsize, size_t pgcount, 165 size_t pgsize, size_t pgcount,
|