/linux/drivers/base/regmap/ |
A D | regcache.c | 220 map->cache_ops->exit(map); in regcache_exit() 348 map->lock(map->lock_arg); in regcache_sync() 374 ret = map->cache_ops->sync(map, 0, map->max_register); in regcache_sync() 386 map->unlock(map->lock_arg); in regcache_sync() 417 map->lock(map->lock_arg); in regcache_sync_region() 442 map->unlock(map->lock_arg); in regcache_sync_region() 471 map->lock(map->lock_arg); in regcache_drop_region() 477 map->unlock(map->lock_arg); in regcache_drop_region() 497 map->lock(map->lock_arg); in regcache_cache_only() 520 map->lock(map->lock_arg); in regcache_mark_dirty() [all …]
|
A D | regmap.c | 118 map->lock(map->lock_arg); in regmap_cached() 120 map->unlock(map->lock_arg); in regmap_cached() 786 map->lock_arg = map; in __regmap_init() 811 map->lock_arg = map; in __regmap_init() 1186 new->map = map; in __regmap_init() 1776 async->map = map; in _regmap_raw_write_impl() 1945 return (map->bus) ? map : map->bus_context; in _regmap_map_get_context() 1995 map->lock(map->lock_arg); in regmap_write() 2022 map->lock(map->lock_arg); in regmap_write_async() 2100 map->lock(map->lock_arg); in regmap_raw_write() [all …]
|
A D | regmap-debugfs.c | 47 if (map->dev && map->dev->driver) in regmap_name_read_file() 187 map->debugfs_val_len = 2 * map->format.val_bytes; in regmap_calc_tot_len() 188 map->debugfs_tot_len = map->debugfs_reg_len + in regmap_calc_tot_len() 348 struct regmap *map = range->map; in regmap_range_read_file() local 477 map->lock(map->lock_arg); in regmap_cache_only_write_file() 488 map->unlock(map->lock_arg); in regmap_cache_only_write_file() 524 map->lock(map->lock_arg); in regmap_cache_bypass_write_file() 534 map->unlock(map->lock_arg); in regmap_cache_bypass_write_file() 571 node->map = map; in regmap_debugfs_init() 652 map->cache_ops->debugfs_init(map); in regmap_debugfs_init() [all …]
|
/linux/tools/perf/util/ |
A D | map.h | 44 struct kmap *map__kmap(struct map *map); 45 struct maps *map__kmaps(struct map *map); 49 return ip - map->start + map->pgoff; in map__map_ip() 54 return ip + map->start - map->pgoff; in map__unmap_ip() 64 return map->end - map->start; in map__size() 103 void map__init(struct map *map, 113 void map__delete(struct map *map); 114 struct map *map__clone(struct map *map); 116 static inline struct map *map__get(struct map *map) in map__get() argument 123 void map__put(struct map *map); [all …]
|
A D | map.c | 135 struct map *map = malloc(sizeof(*map)); in map__new() local 216 struct map *map = calloc(1, (sizeof(*map) + in map__new2() local 386 struct map *map; in map__clone() local 404 map->start, map->end, map->pgoff, map->dso->name); in map__fprintf() 412 if (map && map->dso) { in map__fprintf_dsoname() 439 if (map && map->dso) { in map__fprintf_srcline() 494 return map->unmap_ip(map, rip) - map->reloc; in map__rip_2objdump() 515 return map->unmap_ip(map, ip + map->pgoff); in map__objdump_2mem() 844 struct map *map; in maps__clone() local 924 static struct map *__map__next(struct map *map) in __map__next() argument [all …]
|
A D | hashmap.c | 57 if (!map) in hashmap__new() 60 return map; in hashmap__new() 73 map->cap = map->cap_bits = map->sz = 0; in hashmap__clear() 78 if (!map) in hashmap__free() 82 free(map); in hashmap__free() 98 return (map->cap == 0) || ((map->sz + 1) * 4 / 3 > map->cap); in hashmap_needs_to_grow() 143 if (map->equal_fn(cur->key, key, map->ctx)) { in hashmap_find_entry() 167 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert() 191 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert() 211 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__find() [all …]
|
A D | mmap.c | 92 munmap(map->aio.data[idx], mmap__mmap_len(map)); in perf_mmap__aio_free() 128 map->aio.data[idx] = malloc(mmap__mmap_len(map)); in perf_mmap__aio_alloc() 163 map->aio.data = calloc(map->aio.nr_cblocks, sizeof(void *)); in perf_mmap__aio_mmap() 175 ret = perf_mmap__aio_bind(map, i, map->core.cpu, mp->affinity); in perf_mmap__aio_mmap() 207 if (map->aio.data) in perf_mmap__aio_munmap() 235 munmap(map->data, mmap__mmap_len(map)); in mmap__munmap() 236 map->data = NULL; in mmap__munmap() 261 map->affinity_mask.bits = bitmap_zalloc(map->affinity_mask.nbits); in perf_mmap__setup_affinity_mask() 268 set_bit(map->core.cpu, map->affinity_mask.bits); in perf_mmap__setup_affinity_mask() 295 if (map->comp_level && !perf_mmap__aio_enabled(map)) { in mmap__mmap() [all …]
|
/linux/include/linux/mtd/ |
A D | map.h | 34 # define map_bankwidth(map) ((map)->bankwidth) argument 50 # define map_bankwidth(map) ((map)->bankwidth) argument 76 # define map_words(map) map_calc_words(map) argument 81 # define map_words(map) map_calc_words(map) argument 97 # define map_words(map) map_calc_words(map) argument 117 # define map_words(map) map_calc_words(map) argument 253 #define ENABLE_VPP(map) do { if (map->set_vpp) map->set_vpp(map, 1); } while (0) argument 254 #define DISABLE_VPP(map) do { if (map->set_vpp) map->set_vpp(map, 0); } while (0) argument 257 do { if (map->inval_cache) map->inval_cache(map, from, size); } while (0) 444 #define map_read(map, ofs) (map)->read(map, ofs) argument [all …]
|
/linux/net/sctp/ |
A D | tsnmap.c | 45 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init() 51 map->max_tsn_seen = map->cumulative_tsn_ack_point; in sctp_tsnmap_init() 54 return map; in sctp_tsnmap_init() 59 map->len = 0; in sctp_tsnmap_free() 87 if (gap < map->len && test_bit(gap, map->tsn_map)) in sctp_tsnmap_check() 105 if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1)) in sctp_tsnmap_mark() 211 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_skip() 216 bitmap_shift_right(map->tsn_map, map->tsn_map, gap, map->len); in sctp_tsnmap_skip() 242 bitmap_shift_right(map->tsn_map, map->tsn_map, zero_bit, map->len); in sctp_tsnmap_update() 307 if (!TSN_lt(tsn, map->base_tsn + map->len)) in sctp_tsnmap_renege() [all …]
|
/linux/drivers/mtd/maps/ |
A D | pci.c | 41 val.x[0]= readb(map->base + map->translate(map, ofs)); in mtd_pci_read8() 49 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32() 56 memcpy_fromio(to, map->base + map->translate(map, from), len); in mtd_pci_copyfrom() 62 writeb(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write8() 68 writel(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write32() 74 memcpy_toio(map->base + map->translate(map, to), from, len); in mtd_pci_copyto() 92 map->map.bankwidth = 1; in intel_iq80310_init() 187 map->map.bankwidth = 4; in intel_dc21285_init() 190 map->map.size = len; in intel_dc21285_init() 296 map->exit(dev, map); in mtd_pci_probe() [all …]
|
A D | amd76xrom.c | 197 map->map.name = map->map_name; in amd76xrom_init_one() 198 map->map.phys = map_top; in amd76xrom_init_one() 208 for(map->map.bankwidth = 32; map->map.bankwidth; in amd76xrom_init_one() 209 map->map.bankwidth >>= 1) in amd76xrom_init_one() 222 map->mtd = do_map_probe(*probe_type, &map->map); in amd76xrom_init_one() 231 if (map->mtd->size > map->map.size) { in amd76xrom_init_one() 234 (unsigned long long)map->mtd->size, map->map.size); in amd76xrom_init_one() 235 map->mtd->size = map->map.size; in amd76xrom_init_one() 244 map->rsrc.start = map->map.phys; in amd76xrom_init_one() 245 map->rsrc.end = map->map.phys + map->mtd->size - 1; in amd76xrom_init_one() [all …]
|
A D | ck804xrom.c | 227 map->map.name = map->map_name; in ck804xrom_init_one() 228 map->map.phys = map_top; in ck804xrom_init_one() 238 for(map->map.bankwidth = 32; map->map.bankwidth; in ck804xrom_init_one() 239 map->map.bankwidth >>= 1) in ck804xrom_init_one() 252 map->mtd = do_map_probe(*probe_type, &map->map); in ck804xrom_init_one() 261 if (map->mtd->size > map->map.size) { in ck804xrom_init_one() 264 (unsigned long long)map->mtd->size, map->map.size); in ck804xrom_init_one() 265 map->mtd->size = map->map.size; in ck804xrom_init_one() 274 map->rsrc.start = map->map.phys; in ck804xrom_init_one() 275 map->rsrc.end = map->map.phys + map->mtd->size - 1; in ck804xrom_init_one() [all …]
|
A D | ichxrom.c | 221 map->map.name = map->map_name; in ichxrom_init_one() 222 map->map.phys = map_top; in ichxrom_init_one() 235 for(map->map.bankwidth = 32; map->map.bankwidth; in ichxrom_init_one() 236 map->map.bankwidth >>= 1) in ichxrom_init_one() 249 map->mtd = do_map_probe(*probe_type, &map->map); in ichxrom_init_one() 258 if (map->mtd->size > map->map.size) { in ichxrom_init_one() 261 (unsigned long long)map->mtd->size, map->map.size); in ichxrom_init_one() 262 map->mtd->size = map->map.size; in ichxrom_init_one() 271 map->rsrc.start = map->map.phys; in ichxrom_init_one() 272 map->rsrc.end = map->map.phys + map->mtd->size - 1; in ichxrom_init_one() [all …]
|
A D | esb2rom.c | 287 map->map.name = map->map_name; in esb2rom_init_one() 288 map->map.phys = map_top; in esb2rom_init_one() 301 for(map->map.bankwidth = 32; map->map.bankwidth; in esb2rom_init_one() 302 map->map.bankwidth >>= 1) { in esb2rom_init_one() 314 map->mtd = do_map_probe(*probe_type, &map->map); in esb2rom_init_one() 323 if (map->mtd->size > map->map.size) { in esb2rom_init_one() 326 (unsigned long long)map->mtd->size, map->map.size); in esb2rom_init_one() 327 map->mtd->size = map->map.size; in esb2rom_init_one() 336 map->rsrc.start = map->map.phys; in esb2rom_init_one() 337 map->rsrc.end = map->map.phys + map->mtd->size - 1; in esb2rom_init_one() [all …]
|
/linux/tools/lib/bpf/ |
A D | hashmap.c | 57 if (!map) in hashmap__new() 60 return map; in hashmap__new() 73 map->cap = map->cap_bits = map->sz = 0; in hashmap__clear() 78 if (!map) in hashmap__free() 82 free(map); in hashmap__free() 98 return (map->cap == 0) || ((map->sz + 1) * 4 / 3 > map->cap); in hashmap_needs_to_grow() 143 if (map->equal_fn(cur->key, key, map->ctx)) { in hashmap_find_entry() 167 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert() 191 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__insert() 211 h = hash_bits(map->hash_fn(key, map->ctx), map->cap_bits); in hashmap__find() [all …]
|
/linux/drivers/mtd/lpddr/ |
A D | qinfo_probe.c | 81 dsr = CMDVAL(map_read(map, map->pfow_base + PFOW_DSR)); in lpddr_info_query() 87 val = CMDVAL(map_read(map, map->pfow_base + PFOW_COMMAND_DATA)); in lpddr_info_query() 96 pfow_val[0] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_P); in lpddr_pfow_present() 97 pfow_val[1] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_F); in lpddr_pfow_present() 98 pfow_val[2] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_O); in lpddr_pfow_present() 99 pfow_val[3] = map_read(map, map->pfow_base + PFOW_QUERY_STRING_W); in lpddr_pfow_present() 116 map->name, map->pfow_base); in lpddr_pfow_present() 130 lpddr->DevId = CMDVAL(map_read(map, map->pfow_base + PFOW_DEVICE_ID)); in lpddr_chip_setup() 152 if ((map->pfow_base + 0x1000) >= map->size) { in lpddr_probe_chip() 155 (unsigned long)map->pfow_base, map->size - 1); in lpddr_probe_chip() [all …]
|
A D | lpddr2_nvm.c | 185 map_write(map, cmd, ow_reg_add(map, CMD_CODE_OFS)); in lpddr2_nvm_do_op() 186 map_write(map, data_l, ow_reg_add(map, CMD_DATA_OFS)); in lpddr2_nvm_do_op() 187 map_write(map, add_l, ow_reg_add(map, CMD_ADD_L_OFS)); in lpddr2_nvm_do_op() 188 map_write(map, add_h, ow_reg_add(map, CMD_ADD_H_OFS)); in lpddr2_nvm_do_op() 189 map_write(map, mpr_l, ow_reg_add(map, MPR_L_OFS)); in lpddr2_nvm_do_op() 190 map_write(map, mpr_h, ow_reg_add(map, MPR_H_OFS)); in lpddr2_nvm_do_op() 196 map_write(map, mpr_l, ow_reg_add(map, MPR_L_OFS) + 2); in lpddr2_nvm_do_op() 197 map_write(map, mpr_h, ow_reg_add(map, MPR_H_OFS) + 2); in lpddr2_nvm_do_op() 218 sr = map_read(map, ow_reg_add(map, STATUS_REG_OFS)); in lpddr2_nvm_do_op() 221 sr = map_read(map, ow_reg_add(map, in lpddr2_nvm_do_op() [all …]
|
/linux/tools/lib/perf/ |
A D | mmap.c | 21 map->fd = -1; in perf_mmap__init() 39 map->base = mmap(NULL, perf_mmap__mmap_len(map), mp->prot, in perf_mmap__mmap() 53 if (map && map->base != NULL) { in perf_mmap__munmap() 54 munmap(map->base, perf_mmap__mmap_len(map)); in perf_mmap__munmap() 59 if (map && map->unmap_cb) in perf_mmap__munmap() 60 map->unmap_cb(map); in perf_mmap__munmap() 70 BUG_ON(map->base && refcount_read(&map->refcnt) == 0); in perf_mmap__put() 199 map->prev = perf_mmap__read_head(map); in perf_mmap__read_done() 269 map->end = perf_mmap__read_head(map); in perf_mmap__read_event() 271 event = perf_mmap__read(map, &map->start, map->end); in perf_mmap__read_event() [all …]
|
A D | threadmap.c | 12 size_t size = (nr - start) * sizeof(map->map[0]); in perf_thread_map__reset() 14 memset(&map->map[start], 0, size); in perf_thread_map__reset() 20 size_t size = sizeof(*map) + sizeof(map->map[0]) * nr; in perf_thread_map__realloc() 21 int start = map ? map->nr : 0; in perf_thread_map__realloc() 23 map = realloc(map, size); in perf_thread_map__realloc() 27 if (map) in perf_thread_map__realloc() 37 map->map[thread].pid = pid; in perf_thread_map__set_pid() 42 return map->map[thread].comm; in perf_thread_map__comm() 72 if (map) in perf_thread_map__get() 79 if (map && refcount_dec_and_test(&map->refcnt)) in perf_thread_map__put() [all …]
|
/linux/kernel/bpf/ |
A D | arraymap.c | 521 struct bpf_map *map = info->map; in bpf_array_map_seq_start() local 530 array = container_of(map, struct bpf_array, map); in bpf_array_map_seq_start() 540 struct bpf_map *map = info->map; in bpf_array_map_seq_next() local 549 array = container_of(map, struct bpf_array, map); in bpf_array_map_seq_next() 560 struct bpf_map *map = info->map; in __bpf_array_map_seq_show() local 573 ctx.map = info->map; in __bpf_array_map_seq_show() 610 struct bpf_map *map = aux->map; in bpf_iter_init_array_map() local 623 seq_info->map = map; in bpf_iter_init_array_map() 661 array = container_of(map, struct bpf_array, map); in bpf_for_each_array_elem() 1005 if (poke->tail_call.map != map || in prog_array_map_poke_run() [all …]
|
A D | local_storage.c | 30 return container_of(map, struct bpf_cgroup_storage_map, map); in map_to_storage() 41 if (attach_type_isolated(&map->map)) { in bpf_cgroup_storage_key_cmp() 271 if (attach_type_isolated(&map->map)) { in cgroup_storage_get_next_key() 318 if (!map) in cgroup_storage_map_alloc() 322 bpf_map_init_from_attr(&map->map, attr); in cgroup_storage_map_alloc() 328 return &map->map; in cgroup_storage_map_alloc() 433 btf_type_seq_show(map->btf, map->btf_value_type_id, in cgroup_storage_seq_show_elem() 503 if (!map) in bpf_cgroup_storage_alloc() 560 map = &storage->map->map; in bpf_cgroup_storage_free() 580 map = storage->map; in bpf_cgroup_storage_link() [all …]
|
/linux/drivers/xen/ |
A D | gntdev.c | 86 map->index, map->count, in gntdev_print_maps() 112 gnttab_free_pages(map->count, map->pages); in gntdev_free_map() 222 add->index = map->index + map->count; in gntdev_add_map() 247 if (!map) in gntdev_put_map() 259 unmap_grant_pages(map, 0, map->count); in gntdev_put_map() 329 pr_debug("map %d+%d\n", map->index, map->count); in gntdev_map_grant_pages() 330 err = gnttab_map_refs(map->map_ops, map->kmap_ops, map->pages, in gntdev_map_grant_pages() 494 map->index, map->count, in gntdev_invalidate() 495 map->vma->vm_start, map->vma->vm_end, in gntdev_invalidate() 619 if (map) in gntdev_ioctl_unmap_grant_ref() [all …]
|
/linux/kernel/dma/ |
A D | map_benchmark.c | 85 dma_addr = dma_map_single(map->dev, buf, size, map->dir); in map_benchmark_thread() 88 dev_name(map->dev)); in map_benchmark_thread() 99 dma_unmap_single(map->dev, dma_addr, size, map->dir); in map_benchmark_thread() 136 get_device(map->dev); in do_map_benchmark() 198 put_device(map->dev); in do_map_benchmark() 211 if (copy_from_user(&map->bparam, argp, sizeof(map->bparam))) in map_benchmark_ioctl() 239 if (map->bparam.granule < 1 || map->bparam.granule > 1024) { in map_benchmark_ioctl() 283 if (copy_to_user(argp, &map->bparam, sizeof(map->bparam))) in map_benchmark_ioctl() 307 map = devm_kzalloc(dev, sizeof(*map), GFP_KERNEL); in __map_benchmark_probe() 308 if (!map) in __map_benchmark_probe() [all …]
|
/linux/kernel/trace/ |
A D | tracing_map.c | 282 map->key_idx[map->n_keys++] = idx; in tracing_map_add_key_field() 412 elt->map = map; in tracing_map_elt_alloc() 440 if (map->ops && map->ops->elt_alloc) { in tracing_map_elt_alloc() 460 if (map->ops && map->ops->elt_init) in get_free_elt() 530 entry = TRACING_MAP_ENTRY(map->map, idx); in __tracing_map_insert() 678 tracing_map_array_free(map->map); in tracing_map_destroy() 701 tracing_map_array_clear(map->map); in tracing_map_clear() 775 map = kzalloc(sizeof(*map), GFP_KERNEL); in tracing_map_create() 788 map->map = tracing_map_array_alloc(map->map_size, in tracing_map_create() 790 if (!map->map) in tracing_map_create() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | hashmap.c | 48 struct hashmap *map; in test_hashmap_generic() local 64 err = hashmap__add(map, k, v); in test_hashmap_generic() 87 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic() 135 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic() 195 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic() 242 hashmap__clear(map); in test_hashmap_generic() 251 hashmap__free(map); in test_hashmap_generic() 263 struct hashmap *map; in test_hashmap_multimap() local 328 hashmap__free(map); in test_hashmap_multimap() 335 struct hashmap *map; in test_hashmap_empty() local [all …]
|