Home
last modified time | relevance | path

Searched refs:mmap_size (Results 1 – 15 of 15) sorted by relevance

/linux-6.6.21/tools/testing/selftests/mm/
Dmkdirty.c64 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 …]
Dcow.c740 size_t size, mmap_size, mremap_size; in do_run_with_thp() local
744 mmap_size = 2 * thpsize; in do_run_with_thp()
745 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in do_run_with_thp()
873 munmap(mmap_mem, mmap_size); in do_run_with_thp()
1411 size_t mmap_size; in run_with_huge_zeropage() local
1422 mmap_size = 2 * thpsize; in run_with_huge_zeropage()
1423 mmap_mem = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, in run_with_huge_zeropage()
1429 mmap_smem = mmap(NULL, mmap_size, PROT_READ, in run_with_huge_zeropage()
1462 munmap(mmap_mem, mmap_size); in run_with_huge_zeropage()
1464 munmap(mmap_smem, mmap_size); in run_with_huge_zeropage()
/linux-6.6.21/tools/testing/selftests/powerpc/pmu/sampling_tests/
Dmisc.c173 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.6.21/drivers/spi/
Dspi-ti-qspi.c46 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()
Datmel-quadspi.c153 resource_size_t mmap_size; member
418 if (op->addr.val + op->data.nbytes > aq->mmap_size) in atmel_qspi_exec_op()
619 aq->mmap_size = resource_size(res); in atmel_qspi_probe()
/linux-6.6.21/fs/
Daio.c123 unsigned long mmap_size; member
550 ctx->mmap_size = nr_pages * PAGE_SIZE; in aio_setup_ring()
551 pr_debug("attempting mmap of %lu bytes\n", ctx->mmap_size); in aio_setup_ring()
554 ctx->mmap_size = 0; in aio_setup_ring()
559 ctx->mmap_base = do_mmap(ctx->aio_ring_file, 0, ctx->mmap_size, in aio_setup_ring()
564 ctx->mmap_size = 0; in aio_setup_ring()
833 if (ctx->mmap_size) in ioctx_alloc()
834 vm_munmap(ctx->mmap_base, ctx->mmap_size); in ioctx_alloc()
879 if (ctx->mmap_size) in kill_ioctx()
880 vm_munmap(ctx->mmap_base, ctx->mmap_size); in kill_ioctx()
[all …]
/linux-6.6.21/tools/perf/util/
Dsession.c2139 prefetch_event(char *buf, u64 head, size_t mmap_size, in prefetch_event() argument
2149 if (head + sizeof(event->header) > mmap_size) in prefetch_event()
2157 if (head + event_size <= mmap_size) in prefetch_event()
2165 if (event_size <= mmap_size - head % page_size) { in prefetch_event()
2172 " fuzzed or compressed perf.data?\n", __func__, head, event_size, mmap_size); in prefetch_event()
2178 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) in fetch_mmaped_event() argument
2180 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL)); in fetch_mmaped_event()
2184 fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) in fetch_decomp_event() argument
2186 return prefetch_event(buf, head, mmap_size, needs_swap, NULL); in fetch_decomp_event()
2251 size_t mmap_size; member
[all …]
Dauxtrace.h258 size_t mmap_size; member
Dauxtrace.c1163 buffer->mmap_size = size; in auxtrace_buffer__get_data_rw()
1174 munmap(buffer->mmap_addr, buffer->mmap_size); in auxtrace_buffer__put_data()
1176 buffer->mmap_size = 0; in auxtrace_buffer__put_data()
/linux-6.6.21/drivers/hsi/clients/
Dcmt_speech.c45 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.6.21/tools/testing/selftests/kvm/lib/
Dkvm_util.c692 ret = munmap(region->mmap_start, region->mmap_size); in __vm_mem_region_delete()
696 ret = munmap(region->mmap_alias, region->mmap_size); in __vm_mem_region_delete()
983 region->mmap_size = npages * vm->page_size; in vm_userspace_mem_region_add()
1005 region->mmap_size += alignment; in vm_userspace_mem_region_add()
1009 region->fd = kvm_memfd_alloc(region->mmap_size, in vm_userspace_mem_region_add()
1012 region->mmap_start = mmap(NULL, region->mmap_size, in vm_userspace_mem_region_add()
1061 region->mmap_alias = mmap(NULL, region->mmap_size, in vm_userspace_mem_region_add()
/linux-6.6.21/tools/testing/selftests/bpf/benchs/
Dbench_ringbufs.c467 size_t mmap_size; member
481 size_t mmap_mask = pb->mmap_size - 1; in perfbuf_custom_consumer()
/linux-6.6.21/tools/bpf/bpftool/
Dgen.c704 size_t mmap_size = 0; in gen_trace() local
713 mmap_data = bpf_map__initial_value(map, &mmap_size); in gen_trace()
714 print_hex(mmap_data, mmap_size); in gen_trace()
721 ", bpf_map_mmap_sz(map), mmap_size, ident); in gen_trace()
/linux-6.6.21/tools/testing/selftests/kvm/include/
Dkvm_util_base.h56 size_t mmap_size; member
/linux-6.6.21/tools/lib/bpf/
Dlibbpf.c12245 perf_event_read_simple(void *mmap_mem, size_t mmap_size, size_t page_size, in perf_event_read_simple() argument
12258 ehdr = base + (data_tail & (mmap_size - 1)); in perf_event_read_simple()
12261 if (((void *)ehdr) + ehdr_size > base + mmap_size) { in perf_event_read_simple()
12263 size_t len_first = base + mmap_size - copy_start; in perf_event_read_simple()
12324 size_t mmap_size; member
12338 munmap(cpu_buf->base, pb->mmap_size + pb->page_size)) in perf_buffer__free_cpu_buf()
12397 cpu_buf->base = mmap(NULL, pb->mmap_size + pb->page_size, in perf_buffer__open_cpu_buf()
12533 pb->mmap_size = pb->page_size * page_cnt; in __perf_buffer__new()
12681 ret = perf_event_read_simple(cpu_buf->base, pb->mmap_size, in perf_buffer__process_records()
12754 *buf_size = pb->mmap_size; in perf_buffer__buffer()