Home
last modified time | relevance | path

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

12345678910>>...222

/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.c25 static int regcache_default_sync(struct regmap *map, unsigned int min, unsigned int max); in regcache_defaults_cmp()
47 static int regcache_count_cacheable_registers(struct regmap *map) in regcache_count_cacheable_registers()
53 for (unsigned int i = 0; i < map->num_reg_defaults_raw; i++) in regcache_count_cacheable_registers()
54 if (regmap_readable(map, i * map->reg_stride) && in regcache_count_cacheable_registers()
55 !regmap_volatile(map, i * map->reg_stride)) in regcache_count_cacheable_registers()
61 static int regcache_hw_init(struct regmap *map, int count) in regcache_hw_init()
70 if (!map->reg_defaults_raw) { in regcache_hw_init()
71 bool cache_bypass = map in regcache_hw_init()
45 regcache_count_cacheable_registers(struct regmap * map) regcache_count_cacheable_registers() argument
59 regcache_hw_init(struct regmap * map) regcache_hw_init() argument
118 regcache_hw_exit(struct regmap * map) regcache_hw_exit() argument
124 regcache_init(struct regmap * map,const struct regmap_config * config) regcache_init() argument
268 regcache_exit(struct regmap * map) regcache_exit() argument
295 regcache_read(struct regmap * map,unsigned int reg,unsigned int * value) regcache_read() argument
326 regcache_write(struct regmap * map,unsigned int reg,unsigned int value) regcache_write() argument
340 regcache_reg_needs_sync(struct regmap * map,unsigned int reg,unsigned int val) regcache_reg_needs_sync() argument
359 regcache_default_sync(struct regmap * map,unsigned int min,unsigned int max) regcache_default_sync() argument
415 regcache_sync(struct regmap * map) regcache_sync() argument
516 regcache_sync_region(struct regmap * map,unsigned int min,unsigned int max) regcache_sync_region() argument
578 regcache_drop_region(struct regmap * map,unsigned int min,unsigned int max) regcache_drop_region() argument
610 regcache_cache_only(struct regmap * map,bool enable) regcache_cache_only() argument
634 regcache_mark_dirty(struct regmap * map) regcache_mark_dirty() argument
654 regcache_cache_bypass(struct regmap * map,bool enable) regcache_cache_bypass() argument
672 regcache_reg_cached(struct regmap * map,unsigned int reg) regcache_reg_cached() argument
687 regcache_set_val(struct regmap * map,void * base,unsigned int idx,unsigned int val) regcache_set_val() argument
721 regcache_get_val(struct regmap * map,const void * base,unsigned int idx) regcache_get_val() argument
755 regcache_lookup_reg(struct regmap * map,unsigned int reg) regcache_lookup_reg() argument
780 regcache_sync_val(struct regmap * map,unsigned int reg,unsigned int val) regcache_sync_val() argument
804 regcache_sync_block_single(struct regmap * map,void * block,unsigned long * cache_present,unsigned int block_base,unsigned int start,unsigned int end) regcache_sync_block_single() argument
828 regcache_sync_block_raw_flush(struct regmap * map,const void ** data,unsigned int base,unsigned int cur) regcache_sync_block_raw_flush() argument
856 regcache_sync_block_raw(struct regmap * map,void * block,unsigned long * cache_present,unsigned int block_base,unsigned int start,unsigned int end) regcache_sync_block_raw() argument
898 regcache_sync_block(struct regmap * map,void * block,unsigned long * cache_present,unsigned int block_base,unsigned int start,unsigned int end) regcache_sync_block() argument
[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 in regmap_writeable()
104 regmap_cached(struct regmap * map,unsigned int reg) regmap_cached() argument
127 regmap_readable(struct regmap * map,unsigned int reg) regmap_readable() argument
147 regmap_volatile(struct regmap * map,unsigned int reg) regmap_volatile() argument
164 regmap_precious(struct regmap * map,unsigned int reg) regmap_precious() argument
178 regmap_writeable_noinc(struct regmap * map,unsigned int reg) regmap_writeable_noinc() argument
189 regmap_readable_noinc(struct regmap * map,unsigned int reg) regmap_readable_noinc() argument
200 regmap_volatile_range(struct regmap * map,unsigned int reg,size_t num) regmap_volatile_range() argument
212 regmap_format_12_20_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_12_20_write() argument
224 regmap_format_2_6_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_2_6_write() argument
232 regmap_format_4_12_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_4_12_write() argument
239 regmap_format_7_9_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_7_9_write() argument
246 regmap_format_7_17_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_7_17_write() argument
256 regmap_format_10_14_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_format_10_14_write() argument
396 struct regmap *map = __map; regmap_lock_hwlock() local
403 struct regmap *map = __map; regmap_lock_hwlock_irq() local
410 struct regmap *map = __map; regmap_lock_hwlock_irqsave() local
420 struct regmap *map = __map; regmap_unlock_hwlock() local
427 struct regmap *map = __map; regmap_unlock_hwlock_irq() local
434 struct regmap *map = __map; regmap_unlock_hwlock_irqrestore() local
446 struct regmap *map = __map; regmap_lock_mutex() local
452 struct regmap *map = __map; regmap_unlock_mutex() local
459 struct regmap *map = __map; regmap_lock_spinlock() local
469 struct regmap *map = __map; regmap_unlock_spinlock() local
476 struct regmap *map = __map; regmap_lock_raw_spinlock() local
486 struct regmap *map = __map; regmap_unlock_raw_spinlock() local
499 _regmap_range_add(struct regmap * map,struct regmap_range_node * data) _regmap_range_add() argument
524 _regmap_range_lookup(struct regmap * map,unsigned int reg) _regmap_range_lookup() argument
544 regmap_range_exit(struct regmap * map) regmap_range_exit() argument
560 regmap_set_name(struct regmap * map,const struct regmap_config * config) regmap_set_name() argument
575 regmap_attach_dev(struct device * dev,struct regmap * map,const struct regmap_config * config) regmap_attach_dev() argument
605 regmap_detach_dev(struct device * dev,struct regmap * map) regmap_detach_dev() argument
684 struct regmap *map; __regmap_init() local
1421 regmap_reinit_cache(struct regmap * map,const struct regmap_config * config) regmap_reinit_cache() argument
1461 regmap_exit(struct regmap * map) regmap_exit() argument
1537 regmap_get_device(struct regmap * map) regmap_get_device() argument
1543 _regmap_select_page(struct regmap * map,unsigned int * reg,struct regmap_range_node * range,unsigned int val_num) _regmap_select_page() argument
1613 regmap_set_work_buf_flag_mask(struct regmap * map,int max_bytes,unsigned long mask) regmap_set_work_buf_flag_mask() argument
1628 regmap_reg_addr(struct regmap * map,unsigned int reg) regmap_reg_addr() argument
1640 _regmap_raw_write_impl(struct regmap * map,unsigned int reg,const void * val,size_t val_len,bool noinc) _regmap_raw_write_impl() argument
1845 regmap_can_raw_write(struct regmap * map) regmap_can_raw_write() argument
1856 regmap_get_raw_read_max(struct regmap * map) regmap_get_raw_read_max() argument
1867 regmap_get_raw_write_max(struct regmap * map) regmap_get_raw_write_max() argument
1878 struct regmap *map = context; _regmap_bus_formatted_write() local
1904 struct regmap *map = context; _regmap_bus_reg_write() local
1922 struct regmap *map = context; _regmap_bus_raw_write() local
1936 _regmap_map_get_context(struct regmap * map) _regmap_map_get_context() argument
1941 _regmap_write(struct regmap * map,unsigned int reg,unsigned int val) _regmap_write() argument
1981 regmap_write(struct regmap * map,unsigned int reg,unsigned int val) regmap_write() argument
2008 regmap_write_async(struct regmap * map,unsigned int reg,unsigned int val) regmap_write_async() argument
2029 _regmap_raw_write(struct regmap * map,unsigned int reg,const void * val,size_t val_len,bool noinc) _regmap_raw_write() argument
2083 regmap_raw_write(struct regmap * map,unsigned int reg,const void * val,size_t val_len) regmap_raw_write() argument
2103 regmap_noinc_readwrite(struct regmap * map,unsigned int reg,void * val,unsigned int val_len,bool write) regmap_noinc_readwrite() argument
2202 regmap_noinc_write(struct regmap * map,unsigned int reg,const void * val,size_t val_len) regmap_noinc_write() argument
2349 regmap_bulk_write(struct regmap * map,unsigned int reg,const void * val,size_t val_count) regmap_bulk_write() argument
2419 _regmap_raw_multi_reg_write(struct regmap * map,const struct reg_sequence * regs,size_t num_regs) _regmap_raw_multi_reg_write() argument
2468 _regmap_register_page(struct regmap * map,unsigned int reg,struct regmap_range_node * range) _regmap_register_page() argument
2477 _regmap_range_multi_paged_reg_write(struct regmap * map,struct reg_sequence * regs,size_t num_regs) _regmap_range_multi_paged_reg_write() argument
2558 _regmap_multi_reg_write(struct regmap * map,const struct reg_sequence * regs,size_t num_regs) _regmap_multi_reg_write() argument
2656 regmap_multi_reg_write(struct regmap * map,const struct reg_sequence * regs,int num_regs) regmap_multi_reg_write() argument
2689 regmap_multi_reg_write_bypassed(struct regmap * map,const struct reg_sequence * regs,int num_regs) regmap_multi_reg_write_bypassed() argument
2733 regmap_raw_write_async(struct regmap * map,unsigned int reg,const void * val,size_t val_len) regmap_raw_write_async() argument
2757 _regmap_raw_read(struct regmap * map,unsigned int reg,void * val,unsigned int val_len,bool noinc) _regmap_raw_read() argument
2792 struct regmap *map = context; _regmap_bus_reg_read() local
2811 struct regmap *map = context; _regmap_bus_read() local
2825 _regmap_read(struct regmap * map,unsigned int reg,unsigned int * val) _regmap_read() argument
2867 regmap_read(struct regmap * map,unsigned int reg,unsigned int * val) regmap_read() argument
2895 regmap_read_bypassed(struct regmap * map,unsigned int reg,unsigned int * val) regmap_read_bypassed() argument
2932 regmap_raw_read(struct regmap * map,unsigned int reg,void * val,size_t val_len) regmap_raw_read() argument
3031 regmap_noinc_read(struct regmap * map,unsigned int reg,void * val,size_t val_len) regmap_noinc_read() argument
3147 _regmap_bulk_read(struct regmap * map,unsigned int reg,const unsigned int * regs,void * val,size_t val_count) _regmap_bulk_read() argument
3203 regmap_bulk_read(struct regmap * map,unsigned int reg,void * val,size_t val_count) regmap_bulk_read() argument
3242 regmap_multi_reg_read(struct regmap * map,const unsigned int * regs,void * val,size_t val_count) regmap_multi_reg_read() argument
3252 _regmap_update_bits(struct regmap * map,unsigned int reg,unsigned int mask,unsigned int val,bool * change,bool force_write) _regmap_update_bits() argument
3310 regmap_update_bits_base(struct regmap * map,unsigned int reg,unsigned int mask,unsigned int val,bool * change,bool async,bool force) regmap_update_bits_base() argument
3341 regmap_test_bits(struct regmap * map,unsigned int reg,unsigned int bits) regmap_test_bits() argument
3356 struct regmap *map = async->map; regmap_async_complete_cb() local
3375 regmap_async_is_done(struct regmap * map) regmap_async_is_done() argument
3395 regmap_async_complete(struct regmap * map) regmap_async_complete() argument
3436 regmap_register_patch(struct regmap * map,const struct reg_sequence * regs,int num_regs) regmap_register_patch() argument
3486 regmap_get_val_bytes(struct regmap * map) regmap_get_val_bytes() argument
3503 regmap_get_max_register(struct regmap * map) regmap_get_max_register() argument
3517 regmap_get_reg_stride(struct regmap * map) regmap_get_reg_stride() argument
3530 regmap_might_sleep(struct regmap * map) regmap_might_sleep() argument
3536 regmap_parse_val(struct regmap * map,const void * buf,unsigned int * val) regmap_parse_val() argument
[all...]
H A Dregmap-debugfs.c3 // Register map access API - debugfs
20 struct regmap *map; member
39 struct regmap *map = file->private_data; in regmap_name_read_file() local
47 if (map->dev && map->dev->driver) in regmap_name_read_file()
48 name = map->dev->driver->name; in regmap_name_read_file()
63 static void regmap_debugfs_free_dump_cache(struct regmap *map)
67 while (!list_empty(&map->debugfs_off_cache)) {
68 c = list_first_entry(&map->debugfs_off_cache, in regmap_debugfs_free_dump_cache() argument
76 static bool regmap_printable(struct regmap *map, unsigne in regmap_debugfs_free_dump_cache()
81 regmap_printable(struct regmap * map,unsigned int reg) regmap_printable() argument
96 regmap_debugfs_get_dump_start(struct regmap * map,unsigned int base,loff_t from,loff_t * pos) regmap_debugfs_get_dump_start() argument
182 regmap_calc_tot_len(struct regmap * map,void * buf,size_t count) regmap_calc_tot_len() argument
194 regmap_next_readable_reg(struct regmap * map,int reg) regmap_next_readable_reg() argument
216 regmap_read_debugfs(struct regmap * map,unsigned int from,unsigned int to,char __user * user_buf,size_t count,loff_t * ppos) regmap_read_debugfs() argument
288 struct regmap *map = file->private_data; regmap_map_read_file() local
310 struct regmap *map = file->private_data; regmap_map_write_file() local
349 struct regmap *map = range->map; regmap_range_read_file() local
365 struct regmap *map = file->private_data; regmap_reg_ranges_read_file() local
437 struct regmap *map = s->private; regmap_access_show() local
464 struct regmap *map = container_of(file->private_data, regmap_cache_only_write_file() local
506 struct regmap *map = container_of(file->private_data, regmap_cache_bypass_write_file() local
537 regmap_debugfs_init(struct regmap * map) regmap_debugfs_init() argument
663 regmap_debugfs_exit(struct regmap * map) regmap_debugfs_exit() argument
[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/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()
167 array_map_lookup_elem(struct bpf_map * map,void * key) array_map_lookup_elem() argument
178 array_map_get_hash(struct bpf_map * map) array_map_get_hash() argument
187 array_map_direct_value_addr(const struct bpf_map * map,u64 * imm,u32 off) array_map_direct_value_addr() argument
201 array_map_direct_value_meta(const struct bpf_map * map,u64 imm,u32 * off) array_map_direct_value_meta() argument
218 array_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) array_map_gen_lookup() argument
251 percpu_array_map_lookup_elem(struct bpf_map * map,void * key) percpu_array_map_lookup_elem() argument
262 percpu_array_map_direct_value_addr(const struct bpf_map * map,u64 * imm,u32 off) percpu_array_map_direct_value_addr() argument
277 percpu_array_map_direct_value_meta(const struct bpf_map * map,u64 imm,u32 * off) percpu_array_map_direct_value_meta() argument
294 percpu_array_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) percpu_array_map_gen_lookup() argument
325 percpu_array_map_lookup_percpu_elem(struct bpf_map * map,void * key,u32 cpu) percpu_array_map_lookup_percpu_elem() argument
339 bpf_percpu_array_copy(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_array_copy() argument
374 bpf_array_get_next_key(struct bpf_map * map,void * key,void * next_key) bpf_array_get_next_key() argument
392 array_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) array_map_update_elem() argument
431 bpf_percpu_array_update(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_array_update() argument
482 array_map_delete_elem(struct bpf_map * map,void * key) array_map_delete_elem() argument
492 array_map_free_internal_structs(struct bpf_map * map) array_map_free_internal_structs() argument
506 array_map_free(struct bpf_map * map) array_map_free() argument
537 array_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) array_map_seq_show_elem() argument
558 percpu_array_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) percpu_array_map_seq_show_elem() argument
581 array_map_check_btf(struct bpf_map * map,const struct btf * btf,const struct btf_type * key_type,const struct btf_type * value_type) array_map_check_btf() argument
609 array_map_mmap(struct bpf_map * map,struct vm_area_struct * vma) array_map_mmap() argument
632 array_map_mmap_fault(struct bpf_map * map,struct vm_fault * vmf) array_map_mmap_fault() argument
660 struct bpf_map *map; global() member
668 struct bpf_map *map = info->map; bpf_array_map_seq_start() local
687 struct bpf_map *map = info->map; bpf_array_map_seq_next() local
707 struct bpf_map *map = info->map; __bpf_array_map_seq_show() local
758 struct bpf_map *map = aux->map; bpf_iter_init_array_map() local
803 bpf_for_each_array_elem(struct bpf_map * map,bpf_callback_t callback_fn,void * callback_ctx,u64 flags) bpf_for_each_array_elem() argument
836 array_map_mem_usage(const struct bpf_map * map) array_map_mem_usage() argument
921 fd_array_map_free(struct bpf_map * map) fd_array_map_free() argument
933 fd_array_map_lookup_elem(struct bpf_map * map,void * key) fd_array_map_lookup_elem() argument
939 bpf_fd_array_map_lookup_elem(struct bpf_map * map,void * key,u32 * value) bpf_fd_array_map_lookup_elem() argument
959 bpf_fd_array_map_update_elem(struct bpf_map * map,struct file * map_file,void * key,void * value,u64 map_flags) bpf_fd_array_map_update_elem() argument
991 __fd_array_map_delete_elem(struct bpf_map * map,void * key,bool need_defer) __fd_array_map_delete_elem() argument
1017 fd_array_map_delete_elem(struct bpf_map * map,void * key) fd_array_map_delete_elem() argument
1022 prog_fd_array_get_ptr(struct bpf_map * map,struct file * map_file,int fd) prog_fd_array_get_ptr() argument
1055 prog_fd_array_put_ptr(struct bpf_map * map,void * ptr,bool need_defer) prog_fd_array_put_ptr() argument
1072 bpf_fd_array_map_clear(struct bpf_map * map,bool need_defer) bpf_fd_array_map_clear() argument
1083 prog_array_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) prog_array_map_seq_show_elem() argument
1111 prog_array_map_poke_track(struct bpf_map * map,struct bpf_prog_aux * prog_aux) prog_array_map_poke_track() argument
1144 prog_array_map_poke_untrack(struct bpf_map * map,struct bpf_prog_aux * prog_aux) prog_array_map_poke_untrack() argument
1168 prog_array_map_poke_run(struct bpf_map * map,u32 key,struct bpf_prog * old,struct bpf_prog * new) prog_array_map_poke_run() argument
1219 struct bpf_map *map = container_of(work, struct bpf_array_aux, prog_array_map_clear_deferred() local
1225 prog_array_map_clear(struct bpf_map * map) prog_array_map_clear() argument
1236 struct bpf_map *map; prog_array_map_alloc() local
1258 prog_array_map_free(struct bpf_map * map) prog_array_map_free() argument
1325 perf_event_fd_array_get_ptr(struct bpf_map * map,struct file * map_file,int fd) perf_event_fd_array_get_ptr() argument
1351 perf_event_fd_array_put_ptr(struct bpf_map * map,void * ptr,bool need_defer) perf_event_fd_array_put_ptr() argument
1357 perf_event_fd_array_release(struct bpf_map * map,struct file * map_file) perf_event_fd_array_release() argument
1376 perf_event_fd_array_map_free(struct bpf_map * map) perf_event_fd_array_map_free() argument
1400 cgroup_fd_array_get_ptr(struct bpf_map * map,struct file * map_file,int fd) cgroup_fd_array_get_ptr() argument
1407 cgroup_fd_array_put_ptr(struct bpf_map * map,void * ptr,bool need_defer) cgroup_fd_array_put_ptr() argument
1413 cgroup_fd_array_free(struct bpf_map * map) cgroup_fd_array_free() argument
1437 struct bpf_map *map, *inner_map_meta; array_of_map_alloc() local
1454 array_of_map_free(struct bpf_map * map) array_of_map_free() argument
1464 array_of_map_lookup_elem(struct bpf_map * map,void * key) array_of_map_lookup_elem() argument
1474 array_of_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) array_of_map_gen_lookup() argument
[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
102 cgroup_storage_insert(struct bpf_cgroup_storage_map * map,struct bpf_cgroup_storage * storage) cgroup_storage_insert() argument
134 struct bpf_cgroup_storage_map *map = map_to_storage(_map); cgroup_storage_lookup_elem() local
144 cgroup_storage_update_elem(struct bpf_map * map,void * key,void * value,u64 flags) cgroup_storage_update_elem() argument
185 struct bpf_cgroup_storage_map *map = map_to_storage(_map); bpf_percpu_cgroup_storage_copy() local
219 struct bpf_cgroup_storage_map *map = map_to_storage(_map); bpf_percpu_cgroup_storage_update() local
260 struct bpf_cgroup_storage_map *map = map_to_storage(_map); cgroup_storage_get_next_key() local
301 struct bpf_cgroup_storage_map *map; cgroup_storage_map_alloc() local
344 struct bpf_cgroup_storage_map *map = map_to_storage(_map); cgroup_storage_map_free() local
363 cgroup_storage_delete_elem(struct bpf_map * map,void * key) cgroup_storage_delete_elem() argument
368 cgroup_storage_check_btf(struct bpf_map * map,const struct btf * btf,const struct btf_type * key_type,const struct btf_type * value_type) cgroup_storage_check_btf() argument
419 cgroup_storage_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) cgroup_storage_seq_show_elem() argument
454 cgroup_storage_map_usage(const struct bpf_map * map) cgroup_storage_map_usage() argument
487 bpf_cgroup_storage_calculate_size(struct bpf_map * map,u32 * pages) bpf_cgroup_storage_calculate_size() argument
509 struct bpf_map *map; bpf_cgroup_storage_alloc() local
566 struct bpf_map *map; bpf_cgroup_storage_free() local
583 struct bpf_cgroup_storage_map *map; bpf_cgroup_storage_link() local
602 struct bpf_cgroup_storage_map *map; bpf_cgroup_storage_unlink() local
[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
98 * use_percpu_counter it only follows map.elem_count in steps of
166 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_unlock_bucket()
201 return htab->map.map_type == BPF_MAP_TYPE_LRU_HASH || in htab_elem_get_ptr()
202 htab->map.map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH;
207 return htab->map in fd_htab_map_get_ptr()
203 fd_htab_map_get_ptr(const struct bpf_map * map,struct htab_elem * l) fd_htab_map_get_ptr() argument
510 bpf_ma_set_dtor(struct bpf_map * map,struct bpf_mem_alloc * ma,void (* dtor)(void *,void *)) bpf_ma_set_dtor() argument
543 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
753 __htab_map_lookup_elem(struct bpf_map * map,void * key) __htab_map_lookup_elem() argument
773 htab_map_lookup_elem(struct bpf_map * map,void * key) htab_map_lookup_elem() argument
794 htab_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_map_gen_lookup() argument
809 __htab_lru_map_lookup_elem(struct bpf_map * map,void * key,const bool mark) __htab_lru_map_lookup_elem() argument
823 htab_lru_map_lookup_elem(struct bpf_map * map,void * key) htab_lru_map_lookup_elem() argument
828 htab_lru_map_lookup_elem_sys(struct bpf_map * map,void * key) htab_lru_map_lookup_elem_sys() argument
833 htab_lru_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_lru_map_gen_lookup() argument
913 htab_map_get_next_key(struct bpf_map * map,void * key,void * next_key) htab_map_get_next_key() argument
982 struct bpf_map *map = &htab->map; htab_put_fd_value() local
1195 htab_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_map_update_elem() argument
1302 htab_lru_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_lru_map_update_elem() argument
1377 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
1440 __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
1509 htab_percpu_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_percpu_map_update_elem() argument
1515 htab_lru_percpu_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) htab_lru_percpu_map_update_elem() argument
1523 htab_map_delete_elem(struct bpf_map * map,void * key) htab_map_delete_elem() argument
1558 htab_lru_map_delete_elem(struct bpf_map * map,void * key) htab_lru_map_delete_elem() argument
1633 htab_map_free_internal_structs(struct bpf_map * map) htab_map_free_internal_structs() argument
1648 htab_map_free(struct bpf_map * map) htab_map_free() argument
1678 htab_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) htab_map_seq_show_elem() argument
1699 __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
1763 htab_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) htab_map_lookup_and_delete_elem() argument
1770 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
1778 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
1785 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
1800 __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
2053 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
2061 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
2070 htab_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) htab_map_lookup_batch() argument
2078 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
2087 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
2096 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
2105 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
2113 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
2122 struct bpf_map *map; global() member
2212 struct bpf_map *map = info->map; __bpf_hash_map_seq_show() local
2263 struct bpf_map *map = aux->map; bpf_iter_init_hash_map() local
2305 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
2358 htab_map_mem_usage(const struct bpf_map * map) htab_map_mem_usage() argument
2443 htab_percpu_map_lookup_elem(struct bpf_map * map,void * key) htab_percpu_map_lookup_elem() argument
2454 htab_percpu_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_percpu_map_gen_lookup() argument
2473 htab_percpu_map_lookup_percpu_elem(struct bpf_map * map,void * key,u32 cpu) htab_percpu_map_lookup_percpu_elem() argument
2487 htab_lru_percpu_map_lookup_elem(struct bpf_map * map,void * key) htab_lru_percpu_map_lookup_elem() argument
2499 htab_lru_percpu_map_lookup_percpu_elem(struct bpf_map * map,void * key,u32 cpu) htab_lru_percpu_map_lookup_percpu_elem() argument
2515 bpf_percpu_hash_copy(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_hash_copy() argument
2553 bpf_percpu_hash_update(struct bpf_map * map,void * key,void * value,u64 map_flags) bpf_percpu_hash_update() argument
2571 htab_percpu_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) htab_percpu_map_seq_show_elem() argument
2650 fd_htab_map_free(struct bpf_map * map) fd_htab_map_free() argument
2672 bpf_fd_htab_map_lookup_elem(struct bpf_map * map,void * key,u32 * value) bpf_fd_htab_map_lookup_elem() argument
2692 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
2717 struct bpf_map *map, *inner_map_meta; htab_of_map_alloc() local
2734 htab_of_map_lookup_elem(struct bpf_map * map,void * key) htab_of_map_lookup_elem() argument
2744 htab_of_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) htab_of_map_gen_lookup() argument
2762 htab_of_map_free(struct bpf_map * map) htab_of_map_free() argument
2792 struct bpf_map map; global() member
2928 rhtab_map_free(struct bpf_map * map) rhtab_map_free() argument
2937 rhtab_lookup_elem(struct bpf_map * map,void * key) rhtab_lookup_elem() argument
2950 rhtab_map_lookup_elem(struct bpf_map * map,void * key) rhtab_map_lookup_elem() argument
2958 rhtab_read_elem_value(struct bpf_map * map,void * dst,struct rhtab_elem * elem,u64 flags) rhtab_read_elem_value() argument
3002 rhtab_map_delete_elem(struct bpf_map * map,void * key) rhtab_map_delete_elem() argument
3016 rhtab_map_lookup_and_delete_elem(struct bpf_map * map,void * key,void * value,u64 flags) rhtab_map_lookup_and_delete_elem() argument
3035 rhtab_map_update_existing(struct bpf_map * map,struct rhtab_elem * elem,void * value,u64 map_flags) rhtab_map_update_existing() argument
3061 rhtab_map_update_elem(struct bpf_map * map,void * key,void * value,u64 map_flags) rhtab_map_update_elem() argument
3120 rhtab_map_gen_lookup(struct bpf_map * map,struct bpf_insn * insn_buf) rhtab_map_gen_lookup() argument
3135 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
3147 rhtab_map_free_internal_structs(struct bpf_map * map) rhtab_map_free_internal_structs() argument
3188 rhtab_map_get_next_key(struct bpf_map * map,void * key,void * next_key) rhtab_map_get_next_key() argument
3209 rhtab_map_seq_show_elem(struct bpf_map * map,void * key,struct seq_file * m) rhtab_map_seq_show_elem() argument
3226 bpf_each_rhash_elem(struct bpf_map * map,bpf_callback_t callback_fn,void * callback_ctx,u64 flags) bpf_each_rhash_elem() argument
3264 rhtab_map_mem_usage(const struct bpf_map * map) rhtab_map_mem_usage() argument
3274 __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
3412 rhtab_map_lookup_batch(struct bpf_map * map,const union bpf_attr * attr,union bpf_attr __user * uattr) rhtab_map_lookup_batch() argument
3418 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
3425 struct bpf_map *map; global() member
3514 struct bpf_map *map = aux->map; bpf_iter_init_rhash_map() local
[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/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 in gntdev_free_map()
224 struct gntdev_grant_map *map; gntdev_add_map() local
242 struct gntdev_grant_map *map; gntdev_find_map_index() local
254 gntdev_put_map(struct gntdev_priv * priv,struct gntdev_grant_map * map) gntdev_put_map() argument
306 struct gntdev_grant_map *map = data; find_grant_ptes() local
324 gntdev_map_grant_pages(struct gntdev_grant_map * map) gntdev_map_grant_pages() argument
400 struct gntdev_grant_map *map = data->data; __unmap_grant_pages_done() local
443 __unmap_grant_pages(struct gntdev_grant_map * map,int offset,int pages) __unmap_grant_pages() argument
469 unmap_grant_pages(struct gntdev_grant_map * map,int offset,int pages) unmap_grant_pages() argument
505 struct gntdev_grant_map *map = vma->vm_private_data; gntdev_vma_open() local
513 struct gntdev_grant_map *map = vma->vm_private_data; gntdev_vma_close() local
526 struct gntdev_grant_map *map = vma->vm_private_data; gntdev_vma_find_normal_page() local
543 struct gntdev_grant_map *map = gntdev_invalidate() local
616 struct gntdev_grant_map *map; gntdev_release() local
650 struct gntdev_grant_map *map; gntdev_ioctl_map_grant_ref() local
689 struct gntdev_grant_map *map; gntdev_ioctl_unmap_grant_ref() local
713 struct gntdev_grant_map *map; gntdev_ioctl_get_offset_for_vaddr() local
744 struct gntdev_grant_map *map; gntdev_ioctl_notify() local
1063 struct gntdev_grant_map *map; gntdev_mmap() local
[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 in pvcalls_conn_back_read()
168 pvcalls_conn_back_write(struct sock_mapping * map) pvcalls_conn_back_write() argument
234 struct sock_mapping *map = container_of(ioworker, struct sock_mapping, pvcalls_back_ioworker() local
291 struct sock_mapping *map = sock->sk_user_data; pvcalls_sk_state_change() local
302 struct sock_mapping *map = sock->sk_user_data; pvcalls_sk_data_ready() local
324 struct sock_mapping *map; pvcalls_new_active_socket() local
398 struct sock_mapping *map; pvcalls_back_connect() local
438 pvcalls_back_release_active(struct xenbus_device * dev,struct pvcalls_fedata * fedata,struct sock_mapping * map) pvcalls_back_release_active() argument
482 struct sock_mapping *map, *n; pvcalls_back_release() local
524 struct sock_mapping *map; __pvcalls_back_accept() local
630 struct sockpass_mapping *map; pvcalls_back_bind() local
695 struct sockpass_mapping *map; pvcalls_back_listen() local
911 struct sock_mapping *map = sock_map; pvcalls_back_conn_event() local
1000 struct sock_mapping *map, *n; backend_disconnect() local
[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/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/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 in perf_mmap__mmap()
53 perf_mmap__munmap(struct perf_mmap * map) perf_mmap__munmap() argument
70 perf_mmap__get(struct perf_mmap * map) perf_mmap__get() argument
75 perf_mmap__put(struct perf_mmap * map) perf_mmap__put() argument
88 perf_mmap__read_head(struct perf_mmap * map) perf_mmap__read_head() argument
93 perf_mmap__empty(struct perf_mmap * map) perf_mmap__empty() argument
100 perf_mmap__consume(struct perf_mmap * map) perf_mmap__consume() argument
181 perf_mmap__read_init(struct perf_mmap * map) perf_mmap__read_init() argument
198 perf_mmap__read_done(struct perf_mmap * map) perf_mmap__read_done() argument
210 perf_mmap__read(struct perf_mmap * map,u64 * startp,u64 end) perf_mmap__read() argument
272 perf_mmap__read_event(struct perf_mmap * map) perf_mmap__read_event() argument
480 perf_mmap__read_self(struct perf_mmap * map,struct perf_counts_values * count) perf_mmap__read_self() argument
[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...]

12345678910>>...222