| /linux/tools/testing/scatterlist/ |
| H A D | main.c | 25 ((1 + array[i]) * PAGE_SIZE); in set_pages() 56 { -EINVAL, 1, pfn(0), NULL, PAGE_SIZE, 0, 1 }, in main() 57 { 0, 1, pfn(0), NULL, PAGE_SIZE, PAGE_SIZE + 1, 1 }, in main() 58 { 0, 1, pfn(0), NULL, PAGE_SIZE, sgmax, 1 }, in main() 60 { 0, 2, pfn(0, 1), NULL, 2 * PAGE_SIZE, sgmax, 1 }, in main() 61 { 0, 2, pfn(1, 0), NULL, 2 * PAGE_SIZE, sgmax, 2 }, in main() 62 { 0, 3, pfn(0, 1, 2), NULL, 3 * PAGE_SIZE, sgmax, 1 }, in main() 63 { 0, 3, pfn(0, 1, 2), NULL, 3 * PAGE_SIZE, sgmax, 1 }, in main() 64 { 0, 3, pfn(0, 1, 2), pfn(3, 4, 5), 3 * PAGE_SIZE, sgmax, 1 }, in main() 65 { 0, 3, pfn(0, 1, 2), pfn(4, 5, 6), 3 * PAGE_SIZE, sgmax, 2 }, in main() [all …]
|
| /linux/drivers/target/iscsi/ |
| H A D | iscsi_target_stat.c | 53 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_inst_show() 60 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_DRAFT20_VERSION); in iscsi_stat_instance_min_ver_show() 66 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_DRAFT20_VERSION); in iscsi_stat_instance_max_ver_show() 72 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_portals_show() 79 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_INST_NUM_NODES); in iscsi_stat_instance_nodes_show() 85 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_sessions_show() 102 return snprintf(page, PAGE_SIZE, "%u\n", sess_err_count); in iscsi_stat_instance_fail_sess_show() 111 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_fail_type_show() 121 return snprintf(page, PAGE_SIZE, "%s\n", in iscsi_stat_instance_fail_rem_name_show() 129 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_DISCONTINUITY_TIME); in iscsi_stat_instance_disc_time_show() [all …]
|
| /linux/tools/testing/vsock/ |
| H A D | vsock_test_zerocopy.c | 27 #ifndef PAGE_SIZE 28 #define PAGE_SIZE 4096 macro 62 { NULL, PAGE_SIZE }, 63 { NULL, PAGE_SIZE }, 74 { NULL, PAGE_SIZE }, 75 { NULL, PAGE_SIZE * 2 }, 76 { NULL, PAGE_SIZE * 3 } 88 { NULL, PAGE_SIZE * 16 }, 89 { NULL, PAGE_SIZE * 16 }, 90 { NULL, PAGE_SIZE * 16 } [all …]
|
| /linux/arch/csky/kernel/ |
| H A D | vmlinux.lds.S | 27 . = ALIGN(PAGE_SIZE); 45 . = ALIGN(PAGE_SIZE); 47 INIT_TEXT_SECTION(PAGE_SIZE) 48 INIT_DATA_SECTION(PAGE_SIZE) 50 . = ALIGN(PAGE_SIZE); 54 RO_DATA(PAGE_SIZE) 55 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 60 . = ALIGN(PAGE_SIZE); 80 #define ITCM_SIZE CONFIG_ITCM_NR_PAGES * PAGE_SIZE 101 . = ALIGN(PAGE_SIZE); [all …]
|
| /linux/arch/parisc/kernel/ |
| H A D | vmlinux.lds.S | 64 . = ALIGN(PAGE_SIZE); 65 INIT_DATA_SECTION(PAGE_SIZE) 85 .text ALIGN(PAGE_SIZE) : { 104 . = ALIGN(PAGE_SIZE); 130 RO_DATA(PAGE_SIZE) 149 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE) 158 . = ALIGN(PAGE_SIZE); 162 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
|
| /linux/drivers/target/ |
| H A D | target_core_stat.c | 52 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); in target_stat_inst_show() 57 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->dev_index); in target_stat_indx_show() 62 return snprintf(page, PAGE_SIZE, "Target\n"); in target_stat_role_show() 67 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->export_count); in target_stat_ports_show() 102 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); in target_stat_tgt_inst_show() 107 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_tgt_dev(item)->dev_index); in target_stat_tgt_indx_show() 113 return snprintf(page, PAGE_SIZE, "%u\n", LU_COUNT); in target_stat_tgt_num_lus_show() 120 return snprintf(page, PAGE_SIZE, "activated\n"); in target_stat_tgt_status_show() 122 return snprintf(page, PAGE_SIZE, "deactivated\n"); in target_stat_tgt_status_show() 135 return snprintf(page, PAGE_SIZE, "%u\n", non_accessible_lus); in target_stat_tgt_non_access_lus_show() [all …]
|
| /linux/arch/m68k/kernel/ |
| H A D | sys_m68k.c | 107 unsigned long tmp = PAGE_SIZE - (addr & ~PAGE_MASK); in cache_flush_040() 113 tmp = PAGE_SIZE; in cache_flush_040() 125 i = (PAGE_SIZE - (paddr & ~PAGE_MASK)) >> 4; in cache_flush_040() 159 addr += PAGE_SIZE; in cache_flush_040() 160 i = PAGE_SIZE / 16; in cache_flush_040() 170 addr += PAGE_SIZE; in cache_flush_040() 180 len += (addr & ~PAGE_MASK) + (PAGE_SIZE - 1); in cache_flush_040() 181 for (len >>= PAGE_SHIFT; len--; addr += PAGE_SIZE) in cache_flush_040() 268 unsigned long tmp = PAGE_SIZE - (addr & ~PAGE_MASK); in cache_flush_060() 274 tmp = PAGE_SIZE; in cache_flush_060() [all …]
|
| /linux/include/linux/ |
| H A D | highmem.h | 241 addr += PAGE_SIZE; in clear_user_pages() 242 vaddr += PAGE_SIZE; in clear_user_pages() 293 vaddr += PAGE_SIZE; in clear_user_highpages() 404 kmsan_unpoison_memory(page_address(to), PAGE_SIZE); in copy_user_highpage() 442 ret = copy_mc_to_kernel(vto, vfrom, PAGE_SIZE); in copy_mc_user_highpage() 444 kmsan_unpoison_memory(page_address(to), PAGE_SIZE); in copy_mc_user_highpage() 461 ret = copy_mc_to_kernel(vto, vfrom, PAGE_SIZE); in copy_mc_highpage() 494 VM_BUG_ON(dst_off + len > PAGE_SIZE || src_off + len > PAGE_SIZE); in memcpy_page() 512 chunk > PAGE_SIZE - offset_in_page(dst_off)) in memcpy_folio() 513 chunk = PAGE_SIZE - offset_in_page(dst_off); in memcpy_folio() [all …]
|
| /linux/drivers/misc/lkdtm/ |
| H A D | usercopy.c | 81 user_addr = vm_mmap(NULL, 0, PAGE_SIZE, in do_usercopy_stack() 127 vm_munmap(user_addr, PAGE_SIZE); in do_usercopy_stack() 149 user_addr = vm_mmap(NULL, 0, PAGE_SIZE, in do_usercopy_slab_size() 192 vm_munmap(user_addr, PAGE_SIZE); in do_usercopy_slab_size() 225 user_alloc = vm_mmap(NULL, 0, PAGE_SIZE, in do_usercopy_slab_whitelist() 269 vm_munmap(user_alloc, PAGE_SIZE); in do_usercopy_slab_whitelist() 315 user_addr = vm_mmap(NULL, 0, PAGE_SIZE, in lkdtm_USERCOPY_KERNEL() 334 unconst + PAGE_SIZE)) { in lkdtm_USERCOPY_KERNEL() 342 vm_munmap(user_addr, PAGE_SIZE); in lkdtm_USERCOPY_KERNEL() 355 uaddr = vm_mmap(NULL, 0, PAGE_SIZE, PROT_READ | PROT_WRITE, in do_usercopy_page_span() [all …]
|
| /linux/arch/x86/mm/ |
| H A D | cpu_entry_area.c | 39 max_cea = (CPU_ENTRY_AREA_MAP_SIZE - PAGE_SIZE) / CPU_ENTRY_AREA_SIZE; in init_cea_offsets() 73 BUILD_BUG_ON(sizeof(struct cpu_entry_area) % PAGE_SIZE != 0); in get_cpu_entry_area() 101 for ( ; pages; pages--, cea_vaddr+= PAGE_SIZE, ptr += PAGE_SIZE) in cea_map_percpu_pages() 115 npages = sizeof(struct debug_store) / PAGE_SIZE; in percpu_setup_debug_store() 116 BUILD_BUG_ON(sizeof(struct debug_store) % PAGE_SIZE != 0); in percpu_setup_debug_store() 125 npages = sizeof(struct debug_store_buffers) / PAGE_SIZE; in percpu_setup_debug_store() 126 for (; npages; npages--, cea += PAGE_SIZE) in percpu_setup_debug_store() 134 npages = sizeof(estacks->name## _stack) / PAGE_SIZE; \ 145 BUILD_BUG_ON(sizeof(exception_stacks) % PAGE_SIZE != 0); in percpu_setup_exception_stacks() 224 BUILD_BUG_ON(sizeof(struct tss_struct) % PAGE_SIZE != 0); in setup_cpu_entry_area() [all …]
|
| /linux/arch/sh/kernel/ |
| H A D | vmlinux.lds.S | 45 RO_DATA(PAGE_SIZE) 46 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 51 . = ALIGN(PAGE_SIZE); /* Init code and data */ 53 INIT_TEXT_SECTION(PAGE_SIZE) 72 . = ALIGN(PAGE_SIZE); 76 . = ALIGN(PAGE_SIZE); 79 . = ALIGN(PAGE_SIZE); 81 . = ALIGN(PAGE_SIZE);
|
| /linux/tools/testing/selftests/iommu/ |
| H A D | iommufd.c | 40 PAGE_SIZE = sysconf(_SC_PAGE_SIZE); in setup_sizes() 43 BUFFER_SIZE = PAGE_SIZE * 16; in setup_sizes() 301 test_ioctl_ioas_map(buffer, PAGE_SIZE, &iova); in TEST_F() 303 test_ioctl_ioas_unmap(iova, PAGE_SIZE); in TEST_F() 306 test_ioctl_ioas_map_file(mfd, 0, PAGE_SIZE, &iova); in TEST_F() 312 int nlock = PAGE_SIZE / 1024; in TEST_F() 559 /* Negative test: entry_len is bounded by PAGE_SIZE */ in TEST_F() 563 PAGE_SIZE + 1, &num_inv); in TEST_F() 747 test_ioctl_ioas_map_fixed(buffer, PAGE_SIZE, self->base_iova); in TEST_F() 761 test_ioctl_ioas_map_fixed(buffer, PAGE_SIZE, in TEST_F() [all...] |
| /linux/arch/m68k/mm/ |
| H A D | sun3kmap.c | 55 phys += PAGE_SIZE; in do_pmeg_mapin() 56 virt += PAGE_SIZE; in do_pmeg_mapin() 72 offset = phys & (PAGE_SIZE-1); in sun3_ioremap() 73 phys &= ~(PAGE_SIZE-1); in sun3_ioremap() 85 pages = size / PAGE_SIZE; in sun3_ioremap() 92 seg_pages = (SUN3_PMEG_SIZE - (virt & SUN3_PMEG_MASK)) / PAGE_SIZE; in sun3_ioremap() 99 phys += seg_pages * PAGE_SIZE; in sun3_ioremap() 100 virt += seg_pages * PAGE_SIZE; in sun3_ioremap()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | verifier_arena_large.c | 17 __uint(max_entries, ARENA_SIZE / PAGE_SIZE); 38 page2 = bpf_arena_alloc_pages(&arena, (void __arena *)(ARENA_SIZE - 2 * PAGE_SIZE), in big_alloc1() 45 no_page = bpf_arena_alloc_pages(&arena, (void __arena *)ARENA_SIZE - PAGE_SIZE, in big_alloc1() 71 if (*(page1 + PAGE_SIZE) != 0) 73 if (*(page1 - PAGE_SIZE) != 0) in access_reserved() 75 if (*(page2 + PAGE_SIZE) != 0) in access_reserved() 77 if (*(page2 - PAGE_SIZE) != 0) in access_reserved() 95 page = base = arena_base(&arena) + 16384 * PAGE_SIZE; in access_reserved() 106 page = (volatile char __arena *)(base + i * PAGE_SIZE); in access_reserved() 201 pg_idx = (unsigned long) (pg - base) / PAGE_SIZE; in alloc_pages() [all...] |
| /linux/arch/openrisc/kernel/ |
| H A D | vmlinux.lds.S | 47 . = ALIGN(PAGE_SIZE); 71 RO_DATA(PAGE_SIZE) 77 RW_DATA(32, PAGE_SIZE, PAGE_SIZE) 84 . = ALIGN(PAGE_SIZE); 88 INIT_TEXT_SECTION(PAGE_SIZE)
|
| /linux/arch/arc/kernel/ |
| H A D | vmlinux.lds.S | 33 . = ALIGN(PAGE_SIZE); 59 . = ALIGN(PAGE_SIZE); 80 . = ALIGN(PAGE_SIZE); 99 RO_DATA(PAGE_SIZE) 105 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 112 . = ALIGN(PAGE_SIZE); 122 . = ALIGN(PAGE_SIZE);
|
| /linux/arch/hexagon/mm/ |
| H A D | uaccess.c | 26 while (count > PAGE_SIZE) { in __clear_user_hexagon() 27 uncleared = raw_copy_to_user(dest, &empty_zero_page, PAGE_SIZE); in __clear_user_hexagon() 29 return count - (PAGE_SIZE - uncleared); in __clear_user_hexagon() 30 count -= PAGE_SIZE; in __clear_user_hexagon() 31 dest += PAGE_SIZE; in __clear_user_hexagon()
|
| /linux/arch/x86/include/asm/ |
| H A D | cpu_entry_area.h | 42 ESTACKS_MEMBERS(PAGE_SIZE, EXCEPTION_STKSZ) 71 (sizeof(struct cea_exception_stacks) / PAGE_SIZE) 77 unsigned long stack[(PAGE_SIZE - sizeof(struct x86_hw_tss)) / sizeof(unsigned long)]; 79 } __aligned(PAGE_SIZE); 91 char gdt[PAGE_SIZE]; 99 char guard_entry_stack[PAGE_SIZE]; 104 char guard_doublefault_stack[PAGE_SIZE];
|
| /linux/arch/loongarch/mm/ |
| H A D | init.c | 87 pte = (pte_t *) memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); in fixrange_init() 90 __func__, PAGE_SIZE, PAGE_SIZE); in fixrange_init() 168 pud = memblock_alloc_or_panic(PAGE_SIZE, PAGE_SIZE); in populate_kernel_pte() 177 pmd = memblock_alloc_or_panic(PAGE_SIZE, PAGE_SIZE); in populate_kernel_pte() 188 pte = memblock_alloc_or_panic(PAGE_SIZE, PAGE_SIZE); in populate_kernel_pte() 214 flush_tlb_kernel_range(addr, addr + PAGE_SIZE); in __set_fixmap()
|
| /linux/drivers/scsi/qla4xxx/ |
| H A D | ql4_attr.c | 159 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n", in qla4xxx_fw_version_show() 163 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d.%02d\n", in qla4xxx_fw_version_show() 173 return snprintf(buf, PAGE_SIZE, "%s\n", ha->serial_number); in qla4xxx_serial_num_show() 181 return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->fw_info.iscsi_major, in qla4xxx_iscsi_version_show() 190 return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d.%02d\n", in qla4xxx_optrom_version_show() 200 return snprintf(buf, PAGE_SIZE, "0x%08X\n", ha->board_id); in qla4xxx_board_id_show() 210 return snprintf(buf, PAGE_SIZE, "0x%08X%8X\n", ha->firmware_state, in qla4xxx_fw_state_show() 223 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_cnt); in qla4xxx_phy_port_cnt_show() 235 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_num); in qla4xxx_phy_port_num_show() 247 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->iscsi_pci_func_cnt); in qla4xxx_iscsi_func_cnt_show() [all …]
|
| /linux/drivers/w1/slaves/ |
| H A D | w1_ds2423.c | 45 c = PAGE_SIZE; in w1_slave_show() 65 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show() 74 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show() 97 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show() 100 c -= snprintf(out_buf + PAGE_SIZE - c, in w1_slave_show() 106 c -= snprintf(out_buf + PAGE_SIZE - c, c, "Connection error"); in w1_slave_show() 109 return PAGE_SIZE - c; in w1_slave_show()
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_mes_ctx.h | 61 uint8_t ring[PAGE_SIZE * 4]; 75 } __aligned(PAGE_SIZE) gfx[AMDGPU_MES_CTX_MAX_GFX_RINGS]; 78 uint8_t ring[PAGE_SIZE * 4]; 89 } __aligned(PAGE_SIZE) compute[AMDGPU_MES_CTX_MAX_COMPUTE_RINGS]; 92 uint8_t ring[PAGE_SIZE * 4]; 104 } __aligned(PAGE_SIZE) sdma[AMDGPU_MES_CTX_MAX_SDMA_RINGS];
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | bpf_arena_alloc.h | 29 if (size >= PAGE_SIZE - 8) in bpf_alloc() 38 *cur_offset = PAGE_SIZE - 8; in bpf_alloc() 39 obj_cnt = page + PAGE_SIZE - 8; in bpf_alloc() 43 obj_cnt = page + PAGE_SIZE - 8; in bpf_alloc() 59 addr = (void __arena *)(((long)addr) & ~(PAGE_SIZE - 1)); in bpf_free() 60 obj_cnt = addr + PAGE_SIZE - 8; in bpf_free()
|
| /linux/mm/kfence/ |
| H A D | core.c | 254 return !KFENCE_WARN_ON(!kfence_protect_page(ALIGN_DOWN(addr, PAGE_SIZE), true)); in kfence_protect() 259 return !KFENCE_WARN_ON(!kfence_protect_page(ALIGN_DOWN(addr, PAGE_SIZE), false)); in kfence_unprotect() 265 unsigned long offset = (meta - kfence_metadata + 1) * PAGE_SIZE * 2; in metadata_to_pageaddr() 279 if (KFENCE_WARN_ON(ALIGN_DOWN(meta->addr, PAGE_SIZE) != pageaddr)) in metadata_to_pageaddr() 363 const unsigned long pageaddr = ALIGN_DOWN(meta->addr, PAGE_SIZE); in set_canary() 374 for (; addr - pageaddr < PAGE_SIZE; addr += sizeof(u64)) in set_canary() 381 const unsigned long pageaddr = ALIGN_DOWN(meta->addr, PAGE_SIZE); in check_canary() 414 for (; addr - pageaddr < PAGE_SIZE; addr += sizeof(u64)) { in check_canary() 417 for (; addr - pageaddr < PAGE_SIZE; addr++) { in check_canary() 482 meta->addr += PAGE_SIZE - size; in kfence_guarded_alloc() [all …]
|
| /linux/tools/include/linux/ |
| H A D | mm.h | 10 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 11 #define PAGE_MASK (~(PAGE_SIZE - 1)) 15 #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) 16 #define PAGE_ALIGN_DOWN(addr) ALIGN_DOWN(addr, PAGE_SIZE) 22 #define pfn_to_page(pfn) ((void *)((pfn) * PAGE_SIZE)) 9 #define PAGE_SIZE global() macro
|