| /linux/tools/testing/selftests/arm64/mte/ |
| H A D | check_hugetlb_options.c | 150 unsigned long map_size; in check_hugetlb_memory_mapping() local 152 map_size = default_huge_page_size(); in check_hugetlb_memory_mapping() 155 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_hugetlb_memory_mapping() 156 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_hugetlb_memory_mapping() 159 mte_initialize_current_context(mode, (uintptr_t)map_ptr, map_size); in check_hugetlb_memory_mapping() 161 ptr = mte_insert_tags((void *)map_ptr, map_size); in check_hugetlb_memory_mapping() 164 munmap((void *)map_ptr, map_size); in check_hugetlb_memory_mapping() 167 result = check_mte_memory(ptr, map_size, mode, tag_check); in check_hugetlb_memory_mapping() 168 mte_clear_tags((void *)ptr, map_size); in check_hugetlb_memory_mapping() 169 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_hugetlb_memory_mapping() [all …]
|
| H A D | check_child_memory.c | 109 int run, fd, map_size, result = KSFT_PASS; in check_child_file_mapping() local 118 map_size = sizes[run] + OVERFLOW + UNDERFLOW; in check_child_file_mapping() 119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping() 120 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_child_file_mapping() 130 munmap((void *)map_ptr, map_size); in check_child_file_mapping() 136 munmap((void *)map_ptr, map_size); in check_child_file_mapping()
|
| H A D | check_mmap_options.c | 117 int run, result, map_size; in check_anonymous_memory_mapping() local 125 map_size = sizes[run] + OVERFLOW + UNDERFLOW; in check_anonymous_memory_mapping() 126 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 127 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping() 136 munmap((void *)map_ptr, map_size); in check_anonymous_memory_mapping() 141 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping() 152 int run, fd, map_size; in check_file_memory_mapping() local 165 map_size = sizes[run] + UNDERFLOW + OVERFLOW; in check_file_memory_mapping() 166 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping() 167 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping() [all …]
|
| H A D | mte_common_util.c | 254 int map_size = size + range_before + range_after; in mte_allocate_file_memory_tag_range() local 262 for (index = INIT_BUFFER_SIZE; index < map_size; index += INIT_BUFFER_SIZE) in mte_allocate_file_memory_tag_range() 268 if (write(fd, buffer, map_size - index) != map_size - index) { in mte_allocate_file_memory_tag_range()
|
| /linux/tools/testing/selftests/mm/ |
| H A D | ksm_tests.c | 173 static void *allocate_memory(void *ptr, int prot, int mapping, char data, size_t map_size) in allocate_memory() argument 175 void *map_ptr = mmap(ptr, map_size, PROT_WRITE, mapping, -1, 0); in allocate_memory() 181 memset(map_ptr, data, map_size); in allocate_memory() 182 if (mprotect(map_ptr, map_size, prot)) { in allocate_memory() 184 munmap(map_ptr, map_size); in allocate_memory() 524 int timeout, size_t map_size) in ksm_merge_hugepages_time() argument 536 map_size *= MB; in ksm_merge_hugepages_time() 537 size_t len = map_size; in ksm_merge_hugepages_time() 571 if (ksm_merge_pages(merge_type, map_ptr, map_size, start_time, timeout)) in ksm_merge_hugepages_time() 581 printf("Total size: %lu MiB\n", map_size / MB); in ksm_merge_hugepages_time() [all …]
|
| H A D | pagemap_ioctl.c | 783 void *gethugepage(int map_size) in gethugepage() argument 788 map = memalign(hpage_size, map_size); in gethugepage() 792 ret = madvise(map, map_size, MADV_HUGEPAGE); in gethugepage() 796 memset(map, 0, map_size); in gethugepage() 806 unsigned long long map_size = hpage_size * num_pages; in hpage_unit_tests() local 807 unsigned long long vec_size = map_size/page_size; in hpage_unit_tests() 815 map = gethugepage(map_size); in hpage_unit_tests() 817 wp_init(map, map_size); in hpage_unit_tests() 818 wp_addr_range(map, map_size); in hpage_unit_tests() 821 ret = pagemap_ioctl(map, map_size, vec, vec_size, in hpage_unit_tests() [all …]
|
| H A D | process_madv.c | 155 size_t map_size = 2 * huge_page_size; in TEST_F() local 159 map = mmap(NULL, map_size, PROT_READ | PROT_WRITE, in TEST_F() 164 for (size_t i = 0; i < map_size; i += pagesize) in TEST_F()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_lru_map.c | 142 static unsigned int __tgt_size(unsigned int map_size) in __tgt_size() argument 144 return (map_size / nr_cpus) / 2; in __tgt_size() 257 unsigned int map_size; in test_lru_sanity1() local 272 map_size = __map_size(tgt_free) + batch_size; in test_lru_sanity1() 273 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity1() 276 expected_map_fd = create_map(BPF_MAP_TYPE_HASH, 0, map_size); in test_lru_sanity1() 326 unsigned int map_size; in test_lru_sanity2() local 341 map_size = __map_size(tgt_free) + batch_size; in test_lru_sanity2() 342 lru_map_fd = create_map(map_type, map_flags, map_size); in test_lru_sanity2() 345 expected_map_fd = create_map(BPF_MAP_TYPE_HASH, 0, map_size); in test_lru_sanity2() [all …]
|
| /linux/arch/um/kernel/ |
| H A D | physmem.c | 66 unsigned long map_size = len - reserve; in setup_physmem() local 78 map_size, 1, 1, 1); in setup_physmem() 81 "failed - errno = %d\n", map_size, in setup_physmem() 97 max_low_pfn = min_low_pfn + (map_size >> PAGE_SHIFT); in setup_physmem()
|
| /linux/tools/perf/util/ |
| H A D | bpf_counter_cgroup.c | 49 int map_size, total_cpus = cpu__max_cpu().cpu; in setup_rodata() local 60 map_size = total_cpus * evlist_size / nr_cgroups; in setup_rodata() 61 bpf_map__set_max_entries(sk->maps.events, map_size); in setup_rodata() 64 map_size = evlist_size / nr_cgroups; in setup_rodata() 65 bpf_map__set_max_entries(sk->maps.prev_readings, map_size); in setup_rodata() 67 map_size = evlist_size; in setup_rodata() 68 bpf_map__set_max_entries(sk->maps.cgrp_readings, map_size); in setup_rodata()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | bloom_filter_map.c | 159 __u32 map_size, val; in setup_progs() local 168 map_size = bpf_map__max_entries(skel->maps.map_random_data); in setup_progs() 169 rand_vals = malloc(sizeof(*rand_vals) * map_size); in setup_progs() 178 for (i = 0; i < map_size; i++) { in setup_progs() 194 *out_nr_rand_vals = map_size; in setup_progs()
|
| /linux/drivers/gpu/drm/omapdrm/ |
| H A D | tcm-sita.c | 161 ret = r2l_b2t_1d(num_slots, &pos, tcm->bitmap, tcm->map_size); in sita_reserve_1d() 182 tcm->map_size, tcm->width); in sita_reserve_2d() 223 size_t map_size = BITS_TO_LONGS(width*height) * sizeof(unsigned long); in sita_init() local 228 tcm = kzalloc(sizeof(*tcm) + map_size, GFP_KERNEL); in sita_init() 244 tcm->map_size = width*height; in sita_init()
|
| /linux/drivers/char/tpm/ |
| H A D | tpm_infineon.c | 40 unsigned long map_size; /* MMIO region size */ member 444 tpm_dev.map_size = pnp_mem_len(dev, 0); in tpm_inf_pnp_probe() 450 if (request_mem_region(tpm_dev.map_base, tpm_dev.map_size, in tpm_inf_pnp_probe() 456 tpm_dev.mem_base = ioremap(tpm_dev.map_base, tpm_dev.map_size); in tpm_inf_pnp_probe() 458 release_mem_region(tpm_dev.map_base, tpm_dev.map_size); in tpm_inf_pnp_probe() 574 release_mem_region(tpm_dev.map_base, tpm_dev.map_size); in tpm_inf_pnp_probe() 593 release_mem_region(tpm_dev.map_base, tpm_dev.map_size); in tpm_inf_pnp_remove()
|
| /linux/fs/exfat/ |
| H A D | balloc.c | 78 long long map_size; in exfat_allocate_bitmap() local 84 map_size = le64_to_cpu(ep->dentry.bitmap.size); in exfat_allocate_bitmap() 87 if (need_map_size != map_size) { in exfat_allocate_bitmap() 89 need_map_size, map_size); in exfat_allocate_bitmap() 94 if (need_map_size > map_size) in exfat_allocate_bitmap() 122 EXFAT_B_TO_CLU_ROUND_UP(map_size, sbi)) == false) in exfat_allocate_bitmap()
|
| /linux/drivers/pci/endpoint/ |
| H A D | pci-epc-core.c | 475 size_t map_size = pci_size; in pci_epc_mem_map() local 496 &map_size, &map_offset); in pci_epc_mem_map() 499 map->map_size = map_size; in pci_epc_mem_map() 500 if (map->map_pci_addr + map->map_size < pci_addr + pci_size) in pci_epc_mem_map() 501 map->pci_size = map->map_pci_addr + map->map_size - pci_addr; in pci_epc_mem_map() 506 map->map_size); in pci_epc_mem_map() 514 map->map_pci_addr, map->map_size); in pci_epc_mem_map() 517 map->map_size); in pci_epc_mem_map() 546 map->map_size); in pci_epc_mem_unmap()
|
| /linux/sound/usb/ |
| H A D | fcp.c | 605 static int validate_meter_map(const s16 *map, int map_size, int meter_slots) in validate_meter_map() argument 609 for (i = 0; i < map_size; i++) in validate_meter_map() 633 if (map.map_size != elem->channels || in fcp_ioctl_set_meter_map() 639 if (map.map_size < 1 || map.map_size > 255 || in fcp_ioctl_set_meter_map() 644 tmp_map = memdup_array_user(arg->map, map.map_size, sizeof(s16)); in fcp_ioctl_set_meter_map() 648 err = validate_meter_map(tmp_map, map.map_size, map.meter_slots); in fcp_ioctl_set_meter_map() 658 new_map = kmalloc_array(map.map_size, sizeof(s16), GFP_KERNEL); in fcp_ioctl_set_meter_map() 669 err = fcp_add_new_ctl(mixer, &fcp_meter_ctl, 0, map.map_size, in fcp_ioctl_set_meter_map() 683 memcpy(private->meter_level_map, tmp_map, map.map_size * sizeof(s16)); in fcp_ioctl_set_meter_map()
|
| /linux/drivers/firmware/efi/libstub/ |
| H A D | relocate.c | 46 for (i = 0; i < map->map_size / map->desc_size; i++) { in efi_low_alloc_above() 84 if (i == map->map_size / map->desc_size) in efi_low_alloc_above()
|
| H A D | randomalloc.c | 85 for (map_offset = 0; map_offset < map->map_size; map_offset += map->desc_size) { in efi_random_alloc() 116 for (map_offset = 0; map_offset < map->map_size; map_offset += map->desc_size) { in efi_random_alloc()
|
| H A D | fdt.c | 163 fdt_val32 = cpu_to_fdt32(map->map_size); in update_fdt_memmap() 202 efi_get_virtmap(map->map, map->map_size, map->desc_size, in exit_boot_func() 320 for (l = 0; l < priv.boot_memmap->map_size; in allocate_new_fdt_and_exit_boot()
|
| H A D | loongarch.c | 35 efi_get_virtmap(map->map, map->map_size, map->desc_size, in exit_boot_func()
|
| /linux/drivers/pcmcia/ |
| H A D | cistpl.c | 93 mem->res = pcmcia_find_mem_region(0, s->map_size, in set_cis_map() 94 s->map_size, 0, s); in set_cis_map() 103 s->cis_virt = ioremap(mem->res->start, s->map_size); in set_cis_map() 118 s->cis_virt = ioremap(mem->static_start, s->map_size); in set_cis_map() 183 card_offset = addr & ~(s->map_size-1); in pcmcia_read_cis_mem() 191 end = sys + s->map_size; in pcmcia_read_cis_mem() 192 sys = sys + (addr & (s->map_size-1)); in pcmcia_read_cis_mem() 198 card_offset += s->map_size; in pcmcia_read_cis_mem() 257 card_offset = addr & ~(s->map_size-1); in pcmcia_write_cis_mem() 265 end = sys + s->map_size; in pcmcia_write_cis_mem() [all …]
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | guest_memfd_test.c | 174 static void test_fault_sigbus(int fd, size_t accessible_size, size_t map_size) in test_fault_sigbus() argument 180 mem = kvm_mmap(map_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd); in test_fault_sigbus() 182 TEST_EXPECT_SIGBUS(memset(mem, val, map_size)); in test_fault_sigbus() 188 kvm_munmap(mem, map_size); in test_fault_sigbus()
|
| /linux/kernel/trace/ |
| H A D | tracing_map.c | 529 idx &= (map->map_size - 1); in __tracing_map_insert() 554 if (dup_try > map->map_size) { in __tracing_map_insert() 788 map->map_size = (1 << (map_bits + 1)); in tracing_map_create() 793 map->map = tracing_map_array_alloc(map->map_size, in tracing_map_create() 1083 for (i = 0, n_entries = 0; i < map->map_size; i++) { in tracing_map_sort_entries()
|
| /linux/drivers/gpu/drm/msm/disp/ |
| H A D | mdp_format.c | 605 ssize_t map_size; in mdp_get_format() local 611 map_size = ARRAY_SIZE(mdp_formats); in mdp_get_format() 615 map_size = ARRAY_SIZE(mdp_formats_ubwc); in mdp_get_format() 622 for (i = 0; i < map_size; i++) { in mdp_get_format()
|
| /linux/drivers/video/fbdev/ |
| H A D | sa1100fb.h | 46 u_int map_size; member
|