Home
last modified time | relevance | path

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

/openbmc/linux/tools/testing/selftests/mm/
H A 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
226 munmap(mmap_mem, mmap_size); in test_page_migration_thp()
232 size_t mmap_size; in test_pte_mapped_thp() local
[all …]
H A 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()
/openbmc/linux/tools/testing/selftests/powerpc/pmu/sampling_tests/
H A 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()
/openbmc/linux/drivers/spi/
H A 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()
H A 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()
621 aq->mmap_size = resource_size(res); in atmel_qspi_probe()
/openbmc/qemu/subprojects/libvhost-user/
H A Dlibvhost-user.c1155 log_mmap_size = vmsg->payload.log.mmap_size; in vu_set_log_base_exec()
1917 uint64_t mmap_size; in vu_get_inflight_fd() local
1922 vmsg->payload.inflight.mmap_size = 0; in vu_get_inflight_fd()
1935 addr = memfd_alloc("vhost-inflight", mmap_size, in vu_get_inflight_fd()
1944 vmsg->payload.inflight.mmap_size = 0; in vu_get_inflight_fd()
1948 memset(addr, 0, mmap_size); in vu_get_inflight_fd()
1951 dev->inflight_info.size = vmsg->payload.inflight.mmap_size = mmap_size; in vu_get_inflight_fd()
1957 vmsg->payload.inflight.mmap_size); in vu_get_inflight_fd()
1968 uint64_t mmap_size, mmap_offset; in vu_set_inflight_fd() local
1980 mmap_size = vmsg->payload.inflight.mmap_size; in vu_set_inflight_fd()
[all …]
H A Dlibvhost-user.h154 uint64_t mmap_size; member
177 uint64_t mmap_size; member
/openbmc/linux/fs/
H A 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()
837 if (ctx->mmap_size) in ioctx_alloc()
838 vm_munmap(ctx->mmap_base, ctx->mmap_size); in ioctx_alloc()
883 if (ctx->mmap_size) in kill_ioctx()
884 vm_munmap(ctx->mmap_base, ctx->mmap_size); in kill_ioctx()
[all …]
/openbmc/linux/tools/perf/util/
H A Dsession.c2147 prefetch_event(char *buf, u64 head, size_t mmap_size, in prefetch_event() argument
2157 if (head + sizeof(event->header) > mmap_size) in prefetch_event()
2165 if (head + event_size <= mmap_size) in prefetch_event()
2173 if (event_size <= mmap_size - head % page_size) { in prefetch_event()
2194 return prefetch_event(buf, head, mmap_size, needs_swap, NULL); in fetch_decomp_event()
2259 size_t mmap_size; member
2280 rd->mmap_size = MMAP_SIZE; in reader__init()
2281 if (rd->mmap_size > data_size) { in reader__init()
2282 rd->mmap_size = data_size; in reader__init()
2321 munmap(mmaps[rd->mmap_idx], rd->mmap_size); in reader__mmap()
[all …]
H A Dauxtrace.h258 size_t mmap_size; member
H A 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()
/openbmc/linux/drivers/hsi/clients/
H A 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()
/openbmc/linux/tools/testing/selftests/kvm/lib/
H A 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()
/openbmc/linux/tools/testing/selftests/bpf/benchs/
H A Dbench_ringbufs.c467 size_t mmap_size; member
481 size_t mmap_mask = pb->mmap_size - 1; in perfbuf_custom_consumer()
/openbmc/qemu/accel/kvm/
H A Dkvm-all.c481 long mmap_size; in do_kvm_destroy_vcpu() local
491 mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0); in do_kvm_destroy_vcpu()
492 if (mmap_size < 0) { in do_kvm_destroy_vcpu()
493 ret = mmap_size; in do_kvm_destroy_vcpu()
498 ret = munmap(cpu->kvm_run, mmap_size); in do_kvm_destroy_vcpu()
526 long mmap_size; in kvm_init_vcpu() local
539 mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0); in kvm_init_vcpu()
540 if (mmap_size < 0) { in kvm_init_vcpu()
541 ret = mmap_size; in kvm_init_vcpu()
542 error_setg_errno(errp, -mmap_size, in kvm_init_vcpu()
[all …]
/openbmc/qemu/hw/virtio/
H A Dvhost-user.c140 uint64_t mmap_size; member
185 uint64_t mmap_size; member
444 .payload.log.mmap_size = log->size * sizeof(*(log->log)), in vhost_user_set_log_base()
2687 if (!msg.payload.inflight.mmap_size) { in vhost_user_get_inflight_fd()
2697 addr = mmap(0, msg.payload.inflight.mmap_size, PROT_READ | PROT_WRITE, in vhost_user_get_inflight_fd()
2708 inflight->size = msg.payload.inflight.mmap_size; in vhost_user_get_inflight_fd()
2721 .payload.inflight.mmap_size = inflight->size, in vhost_user_set_inflight_fd()
/openbmc/linux/tools/bpf/bpftool/
H A 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()
/openbmc/linux/tools/testing/selftests/kvm/include/
H A Dkvm_util_base.h56 size_t mmap_size; member
/openbmc/qemu/tests/qtest/
H A Dvhost-user-test.c108 uint64_t mmap_size; member
/openbmc/linux/tools/lib/bpf/
H A Dlibbpf.c12249 perf_event_read_simple(void *mmap_mem, size_t mmap_size, size_t page_size,
12262 ehdr = base + (data_tail & (mmap_size - 1));
12265 if (((void *)ehdr) + ehdr_size > base + mmap_size) {
12267 size_t len_first = base + mmap_size - copy_start;
12328 size_t mmap_size; member
12342 munmap(cpu_buf->base, pb->mmap_size + pb->page_size)) in perf_buffer__free_cpu_buf()
12401 cpu_buf->base = mmap(NULL, pb->mmap_size + pb->page_size, in perf_buffer__open_cpu_buf()
12537 pb->mmap_size = pb->page_size * page_cnt; in __perf_buffer__new()
12685 ret = perf_event_read_simple(cpu_buf->base, pb->mmap_size, in perf_buffer__process_records()
12758 *buf_size = pb->mmap_size; in perf_buffer__buffer()