Home
last modified time | relevance | path

Searched full:map (Results 1 – 25 of 5138) sorted by relevance

12345678910>>...206

/linux/tools/perf/util/
H A Dmap.h25 DECLARE_RC_STRUCT(map) {
42 struct kmap *__map__kmap(struct map *map);
43 struct kmap *map__kmap(struct map *map);
44 struct maps *map__kmaps(struct map *map);
46 static inline struct dso *map__dso(const struct map *map)
48 return RC_CHK_ACCESS(map) in map__dso()
26 DECLARE_RC_STRUCT(map) DECLARE_RC_STRUCT() argument
47 map__dso(const struct map * map) map__dso() argument
52 map__start(const struct map * map) map__start() argument
57 map__end(const struct map * map) map__end() argument
62 map__pgoff(const struct map * map) map__pgoff() argument
67 map__reloc(const struct map * map) map__reloc() argument
72 map__flags(const struct map * map) map__flags() argument
77 map__prot(const struct map * map) map__prot() argument
82 map__priv(const struct map * map) map__priv() argument
87 map__hit(const struct map * map) map__hit() argument
92 map__refcnt(struct map * map) map__refcnt() argument
97 map__erange_warned(struct map * map) map__erange_warned() argument
102 map__size(const struct map * map) map__size() argument
108 map__dso_map_ip(const struct map * map,u64 ip) map__dso_map_ip() argument
114 map__dso_unmap_ip(const struct map * map,u64 rip) map__dso_unmap_ip() argument
119 map__map_ip(const struct map * map,u64 ip_or_rip) map__map_ip() argument
127 map__unmap_ip(const struct map * map,u64 ip_or_rip) map__unmap_ip() argument
154 map__for_each_symbol(map,pos,n) global() argument
165 __map__for_each_symbol_by_name(map,sym_name,pos,idx) global() argument
172 map__for_each_symbol_by_name(map,sym_name,pos,idx) global() argument
184 map__get(struct map * map) map__get() argument
196 __map__zput(struct map ** map) __map__zput() argument
202 map__zput(map) global() argument
227 __map__is_kmodule(const struct map * map) __map__is_kmodule() argument
265 map__set_start(struct map * map,u64 start) map__set_start() argument
270 map__set_end(struct map * map,u64 end) map__set_end() argument
275 map__set_pgoff(struct map * map,u64 pgoff) map__set_pgoff() argument
280 map__add_pgoff(struct map * map,u64 inc) map__add_pgoff() argument
285 map__set_reloc(struct map * map,u64 reloc) map__set_reloc() argument
290 map__set_priv(struct map * map) map__set_priv() argument
295 map__set_hit(struct map * map) map__set_hit() argument
300 map__set_erange_warned(struct map * map) map__set_erange_warned() argument
305 map__set_dso(struct map * map,struct dso * dso) map__set_dso() argument
310 map__set_mapping_type(struct map * map,enum mapping_type type) map__set_mapping_type() argument
315 map__mapping_type(struct map * map) map__mapping_type() argument
[all...]
H A Dmap.c12 #include "map.h"
105 static void map__init(struct map *map, u64 start, u64 end, u64 pgoff, in map__init() argument
108 map__set_start(map, start); in map__init()
109 map__set_end(map, end); in map__init()
110 map__set_pgoff(map, pgoff); in map__init()
111 assert(map__reloc(map) == 0); in map__init()
112 map__set_dso(map, dso__get(dso)); in map__init()
113 refcount_set(map__refcnt(map), 1); in map__init()
114 RC_CHK_ACCESS(map)->prot = prot; in map__init()
115 RC_CHK_ACCESS(map)->flags = flags; in map__init()
[all …]
H A Dhashmap.c4 * Generic non-thread safe hash map implementation.
38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() argument
41 map->hash_fn = hash_fn; in hashmap__init()
42 map->equal_fn = equal_fn; in hashmap__init()
43 map->ctx = ctx; in hashmap__init()
45 map->buckets = NULL; in hashmap__init()
46 map->cap = 0; in hashmap__init()
47 map->cap_bits = 0; in hashmap__init()
48 map->sz = 0; in hashmap__init()
55 struct hashmap *map = malloc(sizeof(struct hashmap)); in hashmap__new() local
[all …]
H A Dmmap.c40 size_t mmap__mmap_len(struct mmap *map) in mmap__mmap_len() argument
42 return perf_mmap__mmap_len(&map->core); in mmap__mmap_len()
72 static int perf_mmap__aio_enabled(struct mmap *map) in perf_mmap__aio_enabled() argument
74 return map->aio.nr_cblocks > 0; in perf_mmap__aio_enabled()
78 static int perf_mmap__aio_alloc(struct mmap *map, int idx) in perf_mmap__aio_alloc() argument
80 map->aio.data[idx] = mmap(NULL, mmap__mmap_len(map), PROT_READ|PROT_WRITE, in perf_mmap__aio_alloc()
82 if (map->aio.data[idx] == MAP_FAILED) { in perf_mmap__aio_alloc()
83 map->aio.data[idx] = NULL; in perf_mmap__aio_alloc()
90 static void perf_mmap__aio_free(struct mmap *map, in argument
98 perf_mmap__aio_bind(struct mmap * map,int idx,struct perf_cpu cpu,int affinity) perf_mmap__aio_bind() argument
127 perf_mmap__aio_alloc(struct mmap * map,int idx) perf_mmap__aio_alloc() argument
136 perf_mmap__aio_free(struct mmap * map,int idx) perf_mmap__aio_free() argument
148 perf_mmap__aio_mmap(struct mmap * map,struct mmap_params * mp) perf_mmap__aio_mmap() argument
202 perf_mmap__aio_munmap(struct mmap * map) perf_mmap__aio_munmap() argument
230 mmap__munmap(struct mmap * map) mmap__munmap() argument
262 perf_mmap__setup_affinity_mask(struct mmap * map,struct mmap_params * mp) perf_mmap__setup_affinity_mask() argument
277 mmap__mmap(struct mmap * map,struct mmap_params * mp,int fd,struct perf_cpu cpu) mmap__mmap() argument
321 perf_mmap__push(struct mmap * md,void * to,int push (struct mmap * map,void * to,void * buf,size_t size)) perf_mmap__push() argument
[all...]
H A Dmaps.c7 #include "map.h"
33 struct map **maps_by_address; in DECLARE_RC_STRUCT()
38 struct map **maps_by_name; in DECLARE_RC_STRUCT()
68 /** @ends_broken: does the map contain a map where end values are unset/unsorted? */ in DECLARE_RC_STRUCT()
77 struct map *map = RC_CHK_ACCESS(maps)->maps_by_address[i]; in check_invariants()
79 /* Check map is well-formed. */ in check_invariants()
80 assert(map__end(map) == 0 || map__start(map) < in check_invariants()
76 struct map *map = RC_CHK_ACCESS(maps)->maps_by_address[i]; check_invariants() local
108 struct map *map = RC_CHK_ACCESS(maps)->maps_by_name[i]; check_invariants() local
410 maps__by_address_index(const struct maps * maps,const struct map * map) maps__by_address_index() argument
431 maps__by_name_index(const struct maps * maps,const struct map * map) maps__by_name_index() argument
452 map__set_kmap_maps(struct map * map,struct maps * maps) map__set_kmap_maps() argument
530 maps__insert(struct maps * maps,struct map * map) maps__insert() argument
541 __maps__remove(struct maps * maps,struct map * map) __maps__remove() argument
567 maps__remove(struct maps * maps,struct map * map) maps__remove() argument
594 maps__for_each_map(struct maps * maps,int (* cb)(struct map * map,void * data),void * data) maps__for_each_map() argument
613 struct map *map = maps_by_address[i]; maps__for_each_map() local
628 maps__remove_maps(struct maps * maps,bool (* cb)(struct map * map,void * data),void * data) maps__remove_maps() argument
655 struct map *map = maps__find(maps, addr); maps__find_symbol() local
676 maps__find_symbol_by_name_cb(struct map * map,void * data) maps__find_symbol_by_name_cb() argument
728 maps__fprintf_cb(struct map * map,void * data) maps__fprintf_cb() argument
757 first_ending_after(struct maps * maps,const struct map * map) first_ending_after() argument
1119 const struct map *map = *(const struct map * const *)entry; map__addr_cmp() local
1228 maps__find_next_entry(struct maps * maps,struct map * map) maps__find_next_entry() argument
[all...]
/linux/drivers/base/regmap/
H A Dregcache.c45 static int regcache_count_cacheable_registers(struct regmap *map) in regcache_count_cacheable_registers() argument
51 for (unsigned int i = 0; i < map->num_reg_defaults_raw; i++) in regcache_count_cacheable_registers()
52 if (regmap_readable(map, i * map->reg_stride) && in regcache_count_cacheable_registers()
53 !regmap_volatile(map, i * map->reg_stride)) in regcache_count_cacheable_registers()
59 static int regcache_hw_init(struct regmap *map) in regcache_hw_init() argument
65 if (!map->reg_defaults_raw) { in regcache_hw_init()
66 bool cache_bypass = map->cache_bypass; in regcache_hw_init()
67 dev_dbg(map->dev, "No cache defaults, reading back from HW\n"); in regcache_hw_init()
70 map->cache_bypass = true; in regcache_hw_init()
71 tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL); in regcache_hw_init()
[all …]
H A Dregmap.c3 // Register map access API
36 static inline bool regmap_should_log(struct regmap *map) in regmap_should_log() argument
38 return (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0); in regmap_should_log()
41 static inline bool regmap_should_log(struct regmap *map) { return false; } in regmap_should_log() argument
45 static int _regmap_update_bits(struct regmap *map, unsigned int reg,
74 bool regmap_check_range_table(struct regmap *map, unsigned int reg, in regmap_check_range_table() argument
90 bool regmap_writeable(struct regmap *map, unsigned int reg) in regmap_writeable() argument
92 if (map->max_register_is_set && reg > map->max_register) in regmap_writeable()
95 if (map->writeable_reg) in regmap_writeable()
96 return map->writeable_reg(map->dev, reg); in regmap_writeable()
[all …]
/linux/net/sctp/
H A Dtsnmap.c29 static void sctp_tsnmap_update(struct sctp_tsnmap *map);
30 static void sctp_tsnmap_find_gap_ack(unsigned long *map, __u16 off,
32 static int sctp_tsnmap_grow(struct sctp_tsnmap *map, u16 size);
35 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
38 if (!map->tsn_map) { in sctp_tsnmap_init()
39 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
40 if (map->tsn_map == NULL) in sctp_tsnmap_init()
43 map->len = len; in sctp_tsnmap_init()
45 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
49 map->base_tsn = initial_tsn; in sctp_tsnmap_init()
[all …]
/linux/tools/lib/bpf/
H A Dhashmap.c4 * Generic non-thread safe hash map implementation.
38 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, in hashmap__init() argument
41 map->hash_fn = hash_fn; in hashmap__init()
42 map->equal_fn = equal_fn; in hashmap__init()
43 map->ctx = ctx; in hashmap__init()
45 map->buckets = NULL; in hashmap__init()
46 map->cap = 0; in hashmap__init()
47 map->cap_bits = 0; in hashmap__init()
48 map->sz = 0; in hashmap__init()
55 struct hashmap *map = malloc(sizeof(struct hashmap)); in hashmap__new() local
[all …]
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-map.rst4 bpftool-map
17 **bpftool** [*OPTIONS*] **map** *COMMAND*
25 MAP COMMANDS
28 | **bpftool** **map** { **show** | **list** } [*MAP*]
29 | **bpftool** **map create** *FILE* **type** *TYPE* **key** *KEY_SIZE* **value** *VALUE_SIZE* \
30 | **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] \
32 | **bpftool** **map dump** *MAP*
33 | **bpftool** **map updat
[all...]
/linux/net/core/
H A Dtso.c93 static int tso_dma_iova_try(struct device *dev, struct tso_dma_map *map, in tso_dma_iova_try() argument
101 if (!dma_iova_try_alloc(dev, &map->iova_state, phys, total_len)) in tso_dma_iova_try()
104 skb = map->skb; in tso_dma_iova_try()
108 if (dma_iova_link(dev, &map->iova_state, in tso_dma_iova_try()
112 map->linear_len = linear_len; in tso_dma_iova_try()
120 if (dma_iova_link(dev, &map->iova_state, in tso_dma_iova_try()
123 map->nr_frags = i; in tso_dma_iova_try()
126 map->frags[i].len = frag_len; in tso_dma_iova_try()
128 map->nr_frags = i + 1; in tso_dma_iova_try()
131 if (dma_iova_sync(dev, &map->iova_state, 0, total_len)) in tso_dma_iova_try()
[all …]
/linux/kernel/bpf/
H A Darraymap.c27 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
38 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
39 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu()
74 /* avoid overflow on round_up(map->value_size) */ in array_map_alloc_check()
77 /* percpu map value size is bound by PCPU_MIN_UNIT_SIZE */ in array_map_alloc_check()
131 /* allocate all map elements and zero-initialize them */ in array_map_alloc()
147 array->map.bypass_spec_v1 = bypass_spec_v1; in array_map_alloc()
149 /* copy mandatory map attributes */ in array_map_alloc()
150 bpf_map_init_from_attr(&array->map, attr); in array_map_alloc()
158 return &array->map; in array_map_alloc()
[all …]
H A Dlocal_storage.c22 struct bpf_map map; member
29 static struct bpf_cgroup_storage_map *map_to_storage(struct bpf_map *map) in map_to_storage() argument
31 return container_of(map, struct bpf_cgroup_storage_map, map); in map_to_storage()
34 static bool attach_type_isolated(const struct bpf_map *map) in attach_type_isolated() argument
36 return map->key_size == sizeof(struct bpf_cgroup_storage_key); in attach_type_isolated()
39 static int bpf_cgroup_storage_key_cmp(const struct bpf_cgroup_storage_map *map, in bpf_cgroup_storage_key_cmp() argument
42 if (attach_type_isolated(&map->map)) { in bpf_cgroup_storage_key_cmp()
67 cgroup_storage_lookup(struct bpf_cgroup_storage_map *map, in cgroup_storage_lookup() argument
70 struct rb_root *root = &map->root; in cgroup_storage_lookup()
74 spin_lock_bh(&map->lock); in cgroup_storage_lookup()
[all …]
H A Dhashtab.c54 * protection across the map operation.
75 * it is only safe to use raw spinlock for preallocated hash map on a RT kernel,
77 * after hash map was fully converted to use bpf_mem_alloc, there will be
78 * non-synchronous memory allocation for non-preallocated hash map, so it is
87 struct bpf_map map; member
137 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_is_prealloc()
172 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_is_lru()
173 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH; in htab_is_lru()
178 return htab->map.map_type == BPF_MAP_TYPE_PERCPU_HASH || in htab_is_percpu()
179 htab->map in htab_is_percpu()
202 fd_htab_map_get_ptr(const struct bpf_map * map,struct htab_elem * l) fd_htab_map_get_ptr() argument
504 bpf_ma_set_dtor(struct bpf_map * map,struct bpf_mem_alloc * ma,void (* dtor)(void *,void *)) bpf_ma_set_dtor() argument
528 htab_map_check_btf(struct bpf_map * map,const struct btf * btf,const struct btf_type * key_type,const struct btf_type * value_type) htab_map_check_btf() argument
738 __htab_map_lookup_elem(struct bpf_map * map,void * key) __htab_map_lookup_elem() argument
758 htab_map_lookup_elem(struct bpf_map * map,void * key) htab_map_lookup_elem() argument
779 htab_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_map_gen_lookup() argument
794 __htab_lru_map_lookup_elem(struct bpf_map * map,void * key,const bool mark) __htab_lru_map_lookup_elem() argument
808 htab_lru_map_lookup_elem(struct bpf_map * map,void * key) htab_lru_map_lookup_elem() argument
813 htab_lru_map_lookup_elem_sys(struct bpf_map * map,void * key) htab_lru_map_lookup_elem_sys() argument
818 htab_lru_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_lru_map_gen_lookup() argument
898 htab_map_get_next_key(struct bpf_map * map,void * key,void * next_key) htab_map_get_next_key() argument
967 struct bpf_map *map = &htab->map; htab_put_fd_value() local
1180 htab_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_map_update_elem() argument
1287 htab_lru_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_lru_map_update_elem() argument
1362 htab_map_update_elem_in_place(struct bpf_map * map,void * key,void * value,u64 map_flags,bool percpu,bool onallcpus) htab_map_update_elem_in_place() argument
1425 __htab_lru_percpu_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags,bool onallcpus) __htab_lru_percpu_map_update_elem() argument
1494 htab_percpu_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_percpu_map_update_elem() argument
1500 htab_lru_percpu_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_lru_percpu_map_update_elem() argument
1508 htab_map_delete_elem(struct bpf_map * map,void * key) htab_map_delete_elem() argument
1543 htab_lru_map_delete_elem(struct bpf_map * map,void * key) htab_lru_map_delete_elem() argument
1618 htab_map_free_internal_structs(struct bpf_map * map) htab_map_free_internal_structs() argument
1633 htab_map_free(struct bpf_map * map) htab_map_free() argument
1663 htab_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) htab_map_seq_show_elem() argument
1684 __htab_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,bool is_lru_map,bool is_percpu,u64 flags) __htab_map_lookup_and_delete_elem() argument
1748 htab_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) htab_map_lookup_and_delete_elem() argument
1755 htab_percpu_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) htab_percpu_map_lookup_and_delete_elem() argument
1763 htab_lru_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) htab_lru_map_lookup_and_delete_elem() argument
1770 htab_lru_percpu_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) htab_lru_percpu_map_lookup_and_delete_elem() argument
1785 __htab_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr,bool do_delete,bool is_lru_map,bool is_percpu) __htab_map_lookup_and_delete_batch() argument
2038 htab_percpu_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_percpu_map_lookup_batch() argument
2046 htab_percpu_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_percpu_map_lookup_and_delete_batch() argument
2055 htab_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_map_lookup_batch() argument
2063 htab_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_map_lookup_and_delete_batch() argument
2072 htab_lru_percpu_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_lru_percpu_map_lookup_batch() argument
2081 htab_lru_percpu_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_lru_percpu_map_lookup_and_delete_batch() argument
2090 htab_lru_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_lru_map_lookup_batch() argument
2098 htab_lru_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_lru_map_lookup_and_delete_batch() argument
2107 struct bpf_map *map; global() member
2197 struct bpf_map *map = info->map; __bpf_hash_map_seq_show() local
2248 struct bpf_map *map = aux->map; bpf_iter_init_hash_map() local
2290 bpf_for_each_hash_elem(struct bpf_map * map,bpf_callback_t callback_fn,void * callback_ctx,u64 flags) bpf_for_each_hash_elem() argument
2343 htab_map_mem_usage(const struct bpf_map * map) htab_map_mem_usage() argument
2428 htab_percpu_map_lookup_elem(struct bpf_map * map,void * key) htab_percpu_map_lookup_elem() argument
2439 htab_percpu_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_percpu_map_gen_lookup() argument
2458 htab_percpu_map_lookup_percpu_elem(struct bpf_map * map,void * key,u32 cpu) htab_percpu_map_lookup_percpu_elem() argument
2472 htab_lru_percpu_map_lookup_elem(struct bpf_map * map,void * key) htab_lru_percpu_map_lookup_elem() argument
2484 htab_lru_percpu_map_lookup_percpu_elem(struct bpf_map * map,void * key,u32 cpu) htab_lru_percpu_map_lookup_percpu_elem() argument
2500 bpf_percpu_hash_copy(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_hash_copy() argument
2538 bpf_percpu_hash_update(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_hash_update() argument
2556 htab_percpu_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) htab_percpu_map_seq_show_elem() argument
2635 fd_htab_map_free(struct bpf_map * map) fd_htab_map_free() argument
2657 bpf_fd_htab_map_lookup_elem(struct bpf_map * map,void * key,u32 * value) bpf_fd_htab_map_lookup_elem() argument
2677 bpf_fd_htab_map_update_elem(struct bpf_map * map,struct file * map_file,void * key,void * value,u64 map_flags) bpf_fd_htab_map_update_elem() argument
2702 struct bpf_map *map, *inner_map_meta; htab_of_map_alloc() local
2719 htab_of_map_lookup_elem(struct bpf_map * map,void * key) htab_of_map_lookup_elem() argument
2729 htab_of_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_of_map_gen_lookup() argument
2747 htab_of_map_free(struct bpf_map * map) htab_of_map_free() argument
2777 struct bpf_map map; global() member
2913 rhtab_map_free(struct bpf_map * map) rhtab_map_free() argument
2922 rhtab_lookup_elem(struct bpf_map * map,void * key) rhtab_lookup_elem() argument
2935 rhtab_map_lookup_elem(struct bpf_map * map,void * key) rhtab_map_lookup_elem() argument
2943 rhtab_read_elem_value(struct bpf_map * map,void * dst,struct rhtab_elem * elem,u64 flags) rhtab_read_elem_value() argument
2987 rhtab_map_delete_elem(struct bpf_map * map,void * key) rhtab_map_delete_elem() argument
3001 rhtab_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) rhtab_map_lookup_and_delete_elem() argument
3020 rhtab_map_update_existing(struct bpf_map * map,struct rhtab_elem * elem,void * value,u64 map_flags) rhtab_map_update_existing() argument
3046 rhtab_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) rhtab_map_update_elem() argument
3105 rhtab_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) rhtab_map_gen_lookup() argument
3120 rhtab_map_check_btf(struct bpf_map * map,const struct btf * btf,const struct btf_type * key_type,const struct btf_type * value_type) rhtab_map_check_btf() argument
3132 rhtab_map_free_internal_structs(struct bpf_map * map) rhtab_map_free_internal_structs() argument
3173 rhtab_map_get_next_key(struct bpf_map * map,void * key,void * next_key) rhtab_map_get_next_key() argument
3194 rhtab_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) rhtab_map_seq_show_elem() argument
3211 bpf_each_rhash_elem(struct bpf_map * map,bpf_callback_t callback_fn,void * callback_ctx,u64 flags) bpf_each_rhash_elem() argument
3249 rhtab_map_mem_usage(const struct bpf_map * map) rhtab_map_mem_usage() argument
3259 __rhtab_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr,bool do_delete) __rhtab_map_lookup_and_delete_batch() argument
3395 rhtab_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) rhtab_map_lookup_batch() argument
3401 rhtab_map_lookup_and_delete_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) rhtab_map_lookup_and_delete_batch() argument
3408 struct bpf_map *map; global() member
3497 struct bpf_map *map = aux->map; bpf_iter_init_rhash_map() local
[all...]
/linux/drivers/mtd/lpddr/
H A Dqinfo_probe.c16 #include <linux/mtd/map.h>
20 static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr);
21 struct mtd_info *lpddr_probe(struct map_info *map);
22 static struct lpddr_private *lpddr_probe_chip(struct map_info *map);
23 static int lpddr_pfow_present(struct map_info *map,
44 static long lpddr_get_qinforec_pos(struct map_info *map, char *id_str) in lpddr_get_qinforec_pos() argument
48 int bankwidth = map_bankwidth(map) * 8; in lpddr_get_qinforec_pos()
58 printk(KERN_ERR"%s qinfo id string is wrong!\n", map->name); in lpddr_get_qinforec_pos()
63 static uint16_t lpddr_info_query(struct map_info *map, char *id_str) in lpddr_info_query() argument
66 int bits_per_chip = map_bankwidth(map) * 8; in lpddr_info_query()
[all …]
/linux/drivers/xen/
H A Dgntdev.c76 static void unmap_grant_pages(struct gntdev_grant_map *map,
92 struct gntdev_grant_map *map; in gntdev_print_maps() local
95 list_for_each_entry(map, &priv->maps, next) in gntdev_print_maps()
97 map->index, map->count, in gntdev_print_maps()
98 map->index == text_index && text ? text : ""); in gntdev_print_maps()
102 static void gntdev_free_map(struct gntdev_grant_map *map) in gntdev_free_map() argument
104 if (map == NULL) in gntdev_free_map()
108 if (map->dma_vaddr) { in gntdev_free_map()
111 args.dev = map->dma_dev; in gntdev_free_map()
112 args.coherent = !!(map->dma_flags & GNTDEV_DMA_FLAG_COHERENT); in gntdev_free_map()
[all …]
H A Dpvcalls-front.c102 struct sock_mapping *map; in pvcalls_enter_sock() local
108 map = (struct sock_mapping *)sock->sk->sk_send_head; in pvcalls_enter_sock()
109 if (map == NULL) in pvcalls_enter_sock()
113 atomic_inc(&map->refcount); in pvcalls_enter_sock()
114 return map; in pvcalls_enter_sock()
119 struct sock_mapping *map; in pvcalls_exit_sock() local
121 map = (struct sock_mapping *)sock->sk->sk_send_head; in pvcalls_exit_sock()
122 atomic_dec(&map->refcount); in pvcalls_exit_sock()
149 static bool pvcalls_front_write_todo(struct sock_mapping *map) in pvcalls_front_write_todo() argument
151 struct pvcalls_data_intf *intf = map->active.ring; in pvcalls_front_write_todo()
[all …]
H A Dpvcalls-back.c90 struct sock_mapping *map);
94 struct sock_mapping *map = (struct sock_mapping *)opaque; in pvcalls_conn_back_read() local
99 struct pvcalls_data_intf *intf = map->ring; in pvcalls_conn_back_read()
100 struct pvcalls_data *data = &map->data; in pvcalls_conn_back_read()
104 array_size = XEN_FLEX_RING_SIZE(map->ring_order); in pvcalls_conn_back_read()
117 spin_lock_irqsave(&map->sock->sk->sk_receive_queue.lock, flags); in pvcalls_conn_back_read()
118 if (skb_queue_empty(&map->sock->sk->sk_receive_queue)) { in pvcalls_conn_back_read()
119 atomic_set(&map->read, 0); in pvcalls_conn_back_read()
120 spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, in pvcalls_conn_back_read()
124 spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, flags); in pvcalls_conn_back_read()
[all …]
/linux/tools/testing/selftests/mm/
H A Dmlock2-tests.c167 static int unlock_lock_check(char *map, bool mlock_supported) in unlock_lock_check()
169 if (!is_vmflag_set((unsigned long)map, LOCKED)) in unlock_lock_check()
182 char *map; in test_mlock_lock()
185 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_lock()
187 if (map == MAP_FAILED) in test_mlock_lock()
190 if (mlock2_(map, 2 * page_size, 0)) { in test_mlock_lock()
191 munmap(map, 2 * page_size); in test_mlock_lock()
195 ksft_test_result(lock_check((unsigned long)map), "%s: Locked\n", __func__); in test_mlock_lock()
198 if (munlock(map, 2 * page_size)) { in test_mlock_lock()
199 munmap(map, in test_mlock_lock()
166 unlock_lock_check(char * map) unlock_lock_check() argument
178 char *map; test_mlock_lock() local
203 onfault_check(char * map) onfault_check() argument
214 unlock_onfault_check(char * map) unlock_onfault_check() argument
229 char *map; test_mlock_onfault() local
256 char *map; test_lock_onfault_of_present() local
279 char *map; test_munlockall0() local
305 char *map; test_munlockall1() local
345 void *map; test_vma_management() local
431 void *map; main() local
[all...]
/linux/drivers/ras/amd/atl/
H A Dmap.c5 * map.c : Functions to read and decode DRAM address maps
17 ctx->map.intlv_mode = FIELD_GET(DF2_INTLV_NUM_CHAN, ctx->map.base); in df2_get_intlv_mode()
19 if (ctx->map.intlv_mode == 8) in df2_get_intlv_mode()
20 ctx->map.intlv_mode = DF2_2CHAN_HASH; in df2_get_intlv_mode()
22 if (ctx->map.intlv_mode != NONE && in df2_get_intlv_mode()
23 ctx->map.intlv_mode != NOHASH_2CHAN && in df2_get_intlv_mode()
24 ctx->map.intlv_mode != DF2_2CHAN_HASH) in df2_get_intlv_mode()
32 ctx->map.intlv_mode = FIELD_GET(DF3_INTLV_NUM_CHAN, ctx->map.base); in df3_get_intlv_mode()
38 ctx->map.intlv_mode = FIELD_GET(DF3p5_INTLV_NUM_CHAN, ctx->map.base); in df3p5_get_intlv_mode()
40 if (ctx->map.intlv_mode == DF3_6CHAN) in df3p5_get_intlv_mode()
[all …]
/linux/tools/lib/perf/
H A Dthreadmap.c10 static void perf_thread_map__reset(struct perf_thread_map *map, int start, int nr) in perf_thread_map__reset() argument
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()
15 map->err_thread = -1; in perf_thread_map__reset()
18 struct perf_thread_map *perf_thread_map__realloc(struct perf_thread_map *map, int nr) in perf_thread_map__realloc() argument
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()
28 perf_thread_map__reset(map, start, nr); in perf_thread_map__realloc()
[all …]
H A Dmmap.c19 void perf_mmap__init(struct perf_mmap *map, struct perf_mmap *prev, in perf_mmap__init() argument
23 map->fd = -1; in perf_mmap__init()
24 map->overwrite = overwrite; in perf_mmap__init()
25 map->unmap_cb = unmap_cb; in perf_mmap__init()
26 refcount_set(&map->refcnt, 0); in perf_mmap__init()
28 prev->next = map; in perf_mmap__init()
31 size_t perf_mmap__mmap_len(struct perf_mmap *map) in perf_mmap__mmap_len() argument
33 return map->mask + 1 + page_size; in perf_mmap__mmap_len()
36 int perf_mmap__mmap(struct perf_mmap *map, struct perf_mmap_param *mp, in perf_mmap__mmap() argument
39 map->prev = 0; in perf_mmap__mmap()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dhashmap.c49 struct hashmap *map; in test_hashmap_generic() local
51 map = hashmap__new(hash_fn, equal_fn, NULL); in test_hashmap_generic()
52 if (!ASSERT_OK_PTR(map, "hashmap__new")) in test_hashmap_generic()
59 err = hashmap__update(map, k, v, &oldk, &oldv); in test_hashmap_generic()
65 err = hashmap__add(map, k, v); in test_hashmap_generic()
67 err = hashmap__set(map, k, v, &oldk, &oldv); in test_hashmap_generic()
76 if (CHECK(!hashmap__find(map, k, &oldv), "elem_find", in test_hashmap_generic()
83 if (CHECK(hashmap__size(map) != ELEM_CNT, "hashmap__size", in test_hashmap_generic()
84 "invalid map size: %zu\n", hashmap__size(map))) in test_hashmap_generic()
86 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dmap_ptr_kern.c38 static inline int check_bpf_map_fields(struct bpf_map *map, __u32 key_size, in check_bpf_map_fields() argument
41 VERIFY(map->map_type == g_map_type); in check_bpf_map_fields()
42 VERIFY(map->key_size == key_size); in check_bpf_map_fields()
43 VERIFY(map->value_size == value_size); in check_bpf_map_fields()
44 VERIFY(map->max_entries == max_entries); in check_bpf_map_fields()
45 VERIFY(map->id > 0); in check_bpf_map_fields()
92 struct bpf_map map; member
106 __s64 bpf_map_sum_elem_count(struct bpf_map *map) __ksym;
111 struct bpf_map *map = (struct bpf_map *)&m_hash; in check_hash() local
114 VERIFY(check_default_noinline(&hash->map, ma in check_hash()
136 struct bpf_map map; global() member
150 struct bpf_map *map = (struct bpf_map *)&m_array; check_array() local
182 struct bpf_map *map = (struct bpf_map *)&m_prog_array; check_prog_array() local
199 struct bpf_map *map = (struct bpf_map *)&m_perf_event_array; check_perf_event_array() local
216 struct bpf_map *map = (struct bpf_map *)&m_percpu_hash; check_percpu_hash() local
233 struct bpf_map *map = (struct bpf_map *)&m_percpu_array; check_percpu_array() local
241 struct bpf_map map; global() member
255 struct bpf_map *map = (struct bpf_map *)&m_stack_trace; check_stack_trace() local
273 struct bpf_map *map = (struct bpf_map *)&m_cgroup_array; check_cgroup_array() local
290 struct bpf_map *map = (struct bpf_map *)&m_lru_hash; check_lru_hash() local
307 struct bpf_map *map = (struct bpf_map *)&m_lru_percpu_hash; check_lru_percpu_hash() local
315 struct bpf_map map; global() member
334 struct bpf_map *map = (struct bpf_map *)&m_lpm_trie; check_lpm_trie() local
369 struct bpf_map *map = (struct bpf_map *)&m_array_of_maps; check_array_of_maps() local
396 struct bpf_map *map = (struct bpf_map *)&m_hash_of_maps; check_hash_of_maps() local
409 struct bpf_map map; global() member
422 struct bpf_map *map = (struct bpf_map *)&m_devmap; check_devmap() local
430 struct bpf_map map; global() member
443 struct bpf_map *map = (struct bpf_map *)&m_sockmap; check_sockmap() local
451 struct bpf_map map; global() member
464 struct bpf_map *map = (struct bpf_map *)&m_cpumap; check_cpumap() local
472 struct bpf_map map; global() member
485 struct bpf_map *map = (struct bpf_map *)&m_xskmap; check_xskmap() local
493 struct bpf_map map; global() member
506 struct bpf_map *map = (struct bpf_map *)&m_sockhash; check_sockhash() local
514 struct bpf_map map; global() member
527 struct bpf_map *map = (struct bpf_map *)&m_cgroup_storage; check_cgroup_storage() local
536 struct bpf_map map; global() member
550 struct bpf_map *map = (struct bpf_map *)&m_reuseport_sockarray; check_reuseport_sockarray() local
567 struct bpf_map *map = (struct bpf_map *)&m_percpu_cgroup_storage; check_percpu_cgroup_storage() local
576 struct bpf_map map; global() member
588 struct bpf_map *map = (struct bpf_map *)&m_queue; check_queue() local
604 struct bpf_map *map = (struct bpf_map *)&m_stack; check_stack() local
612 struct bpf_map map; global() member
626 struct bpf_map *map = (struct bpf_map *)&m_sk_storage; check_sk_storage() local
643 struct bpf_map *map = (struct bpf_map *)&m_devmap_hash; check_devmap_hash() local
651 struct bpf_map map; global() member
661 struct bpf_map *map = (struct bpf_map *)&m_ringbuf; check_ringbuf() local
[all...]
/linux/kernel/dma/
H A Dmap_benchmark.c37 void *(*prepare)(struct map_benchmark_data *map);
52 static void *dma_single_map_benchmark_prepare(struct map_benchmark_data *map) in dma_single_map_benchmark_prepare() argument
58 params->npages = map->bparam.granule; in dma_single_map_benchmark_prepare()
59 params->dma_dir = map->bparam.dma_dir; in dma_single_map_benchmark_prepare()
60 params->dev = map->dev; in dma_single_map_benchmark_prepare()
128 static void *dma_sg_map_benchmark_prepare(struct map_benchmark_data *map) in dma_sg_map_benchmark_prepare() argument
140 npages = map->bparam.granule; in dma_sg_map_benchmark_prepare()
147 params->dma_dir = map->bparam.dma_dir; in dma_sg_map_benchmark_prepare()
148 params->dev = map->dev; in dma_sg_map_benchmark_prepare()
237 struct map_benchmark_data *map = data; in map_benchmark_thread() local
[all …]

12345678910>>...206