/linux-6.12.1/tools/testing/selftests/mm/ |
D | mkdirty.c | 64 const size_t mmap_size = 2 * thpsize; in mmap_thp_range() local 67 mmap_mem = mmap(NULL, mmap_size, prot, MAP_PRIVATE|MAP_ANON, in mmap_thp_range() 77 munmap(mmap_mem, mmap_size); in mmap_thp_range() 82 *_mmap_size = mmap_size; in mmap_thp_range() 125 size_t mmap_size; in test_ptrace_write_thp() local 131 mem = mmap_thp_range(PROT_READ, &mmap_mem, &mmap_size); in test_ptrace_write_thp() 155 munmap(mmap_mem, mmap_size); in test_ptrace_write_thp() 193 size_t mmap_size; in test_page_migration_thp() local 197 mem = mmap_thp_range(PROT_READ|PROT_WRITE, &mmap_mem, &mmap_size); in test_page_migration_thp() 226 munmap(mmap_mem, mmap_size); in test_page_migration_thp() [all …]
|
D | hugetlb_madv_vs_map.c | 32 size_t mmap_size; variable 47 madvise(huge_ptr, mmap_size, MADV_DONTNEED); in madv() 62 ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in map_extra() 96 mmap_size = default_huge_page_size(); in main() 99 huge_ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in main() 122 munmap(huge_ptr, mmap_size); in main()
|
D | cow.c | 802 size_t size, mmap_size, mremap_size; in do_run_with_thp() local 806 mmap_size = 2 * thpsize; in do_run_with_thp() 807 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in do_run_with_thp() 937 munmap(mmap_mem, mmap_size); in do_run_with_thp() 1504 size_t mmap_size; in run_with_huge_zeropage() local 1515 mmap_size = 2 * pmdsize; in run_with_huge_zeropage() 1516 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in run_with_huge_zeropage() 1522 mmap_smem = mmap(NULL, mmap_size, PROT_READ, in run_with_huge_zeropage() 1555 munmap(mmap_mem, mmap_size); in run_with_huge_zeropage() 1557 munmap(mmap_smem, mmap_size); in run_with_huge_zeropage()
|
/linux-6.12.1/tools/testing/selftests/powerpc/pmu/sampling_tests/ |
D | misc.c | 173 size_t mmap_size; in event_sample_buf_mmap() local 182 mmap_size = page_size * (1 + mmap_pages); in event_sample_buf_mmap() 183 buff = mmap(NULL, mmap_size, in event_sample_buf_mmap()
|
/linux-6.12.1/drivers/spi/ |
D | spi-ti-qspi.c | 46 size_t mmap_size; member 583 if (op->addr.val < qspi->mmap_size) { in ti_qspi_adjust_op_size() 585 if (op->addr.val + op->data.nbytes > qspi->mmap_size) { in ti_qspi_adjust_op_size() 586 max_len = qspi->mmap_size - op->addr.val; in ti_qspi_adjust_op_size() 620 if (from + op->data.nbytes > qspi->mmap_size) in ti_qspi_exec_mem_op() 810 qspi->mmap_size = resource_size(res_mmap); in ti_qspi_probe()
|
D | atmel-quadspi.c | 153 resource_size_t mmap_size; member 418 if (op->addr.val + op->data.nbytes > aq->mmap_size) in atmel_qspi_exec_op() 618 aq->mmap_size = resource_size(res); in atmel_qspi_probe()
|
/linux-6.12.1/tools/perf/util/ |
D | session.c | 1895 prefetch_event(char *buf, u64 head, size_t mmap_size, in prefetch_event() argument 1905 if (head + sizeof(event->header) > mmap_size) in prefetch_event() 1913 if (head + event_size <= mmap_size) in prefetch_event() 1921 if (event_size <= mmap_size - head % page_size) { in prefetch_event() 1928 " fuzzed or compressed perf.data?\n", __func__, head, event_size, mmap_size); in prefetch_event() 1934 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) in fetch_mmaped_event() argument 1936 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL)); in fetch_mmaped_event() 1940 fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) in fetch_decomp_event() argument 1942 return prefetch_event(buf, head, mmap_size, needs_swap, NULL); in fetch_decomp_event() 2007 size_t mmap_size; member [all …]
|
D | auxtrace.h | 260 size_t mmap_size; member
|
D | auxtrace.c | 1168 buffer->mmap_size = size; in auxtrace_buffer__get_data_rw() 1179 munmap(buffer->mmap_addr, buffer->mmap_size); in auxtrace_buffer__put_data() 1181 buffer->mmap_size = 0; in auxtrace_buffer__put_data()
|
/linux-6.12.1/fs/ |
D | aio.c | 123 unsigned long mmap_size; member 543 ctx->mmap_size = nr_pages * PAGE_SIZE; in aio_setup_ring() 544 pr_debug("attempting mmap of %lu bytes\n", ctx->mmap_size); in aio_setup_ring() 547 ctx->mmap_size = 0; in aio_setup_ring() 552 ctx->mmap_base = do_mmap(ctx->aio_ring_file, 0, ctx->mmap_size, in aio_setup_ring() 557 ctx->mmap_size = 0; in aio_setup_ring() 830 if (ctx->mmap_size) in ioctx_alloc() 831 vm_munmap(ctx->mmap_base, ctx->mmap_size); in ioctx_alloc() 876 if (ctx->mmap_size) in kill_ioctx() 877 vm_munmap(ctx->mmap_base, ctx->mmap_size); in kill_ioctx() [all …]
|
/linux-6.12.1/drivers/hsi/clients/ |
D | cmt_speech.c | 45 unsigned long mmap_size; member 92 unsigned long mmap_size; member 821 } else if ((buf_size_aligned + ctrl_size_aligned) >= hi->mmap_size) { in check_buf_params() 985 unsigned long mmap_base, unsigned long mmap_size) in cs_hsi_start() argument 1001 hsi_if->mmap_size = mmap_size; in cs_hsi_start() 1303 cs_char_data.mmap_size = CS_MMAP_SIZE; in cs_char_open()
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 728 ret = munmap(region->mmap_start, region->mmap_size); in __vm_mem_region_delete() 732 ret = munmap(region->mmap_alias, region->mmap_size); in __vm_mem_region_delete() 967 region->mmap_size = mem_size; in vm_mem_add() 989 region->mmap_size += alignment; in vm_mem_add() 993 region->fd = kvm_memfd_alloc(region->mmap_size, in vm_mem_add() 996 region->mmap_start = mmap(NULL, region->mmap_size, in vm_mem_add() 1072 region->mmap_alias = mmap(NULL, region->mmap_size, in vm_mem_add()
|
/linux-6.12.1/tools/testing/selftests/bpf/benchs/ |
D | bench_ringbufs.c | 467 size_t mmap_size; member 481 size_t mmap_mask = pb->mmap_size - 1; in perfbuf_custom_consumer()
|
/linux-6.12.1/tools/bpf/bpftool/ |
D | gen.c | 734 size_t mmap_size = 0; in gen_trace() local 744 mmap_data = bpf_map__initial_value(map, &mmap_size); in gen_trace() 745 print_hex(mmap_data, mmap_size); in gen_trace()
|
/linux-6.12.1/tools/testing/selftests/kvm/include/ |
D | kvm_util.h | 43 size_t mmap_size; member
|
/linux-6.12.1/tools/lib/bpf/ |
D | libbpf.c | 13020 perf_event_read_simple(void *mmap_mem, size_t mmap_size, size_t page_size, in perf_event_read_simple() argument 13033 ehdr = base + (data_tail & (mmap_size - 1)); in perf_event_read_simple() 13036 if (((void *)ehdr) + ehdr_size > base + mmap_size) { in perf_event_read_simple() 13038 size_t len_first = base + mmap_size - copy_start; in perf_event_read_simple() 13099 size_t mmap_size; member 13113 munmap(cpu_buf->base, pb->mmap_size + pb->page_size)) in perf_buffer__free_cpu_buf() 13172 cpu_buf->base = mmap(NULL, pb->mmap_size + pb->page_size, in perf_buffer__open_cpu_buf() 13308 pb->mmap_size = pb->page_size * page_cnt; in __perf_buffer__new() 13456 ret = perf_event_read_simple(cpu_buf->base, pb->mmap_size, in perf_buffer__process_records() 13529 *buf_size = pb->mmap_size; in perf_buffer__buffer()
|
/linux-6.12.1/tools/power/x86/turbostat/ |
D | turbostat.c | 8698 size_t mmap_size; in pmt_mmio_open() local 8762 mmap_size = (size + 0x1000UL) & (~0x1000UL); in pmt_mmio_open() 8763 mmio = mmap(0, mmap_size, PROT_READ, MAP_SHARED, fd_pmt, 0); in pmt_mmio_open()
|