/linux-6.6.21/tools/perf/util/ |
D | map.h | 19 DECLARE_RC_STRUCT(map) { in DECLARE_RC_STRUCT() argument 29 u64 (*map_ip)(const struct map *, u64); in DECLARE_RC_STRUCT() 31 u64 (*unmap_ip)(const struct map *, u64); in DECLARE_RC_STRUCT() 40 struct kmap *__map__kmap(struct map *map); 41 struct kmap *map__kmap(struct map *map); 42 struct maps *map__kmaps(struct map *map); 45 u64 map__dso_map_ip(const struct map *map, u64 ip); 47 u64 map__dso_unmap_ip(const struct map *map, u64 ip); 49 u64 identity__map_ip(const struct map *map __maybe_unused, u64 ip); 51 static inline struct dso *map__dso(const struct map *map) in map__dso() argument [all …]
|
D | map.c | 105 void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso) in map__init() argument 107 map__set_start(map, start); in map__init() 108 map__set_end(map, end); in map__init() 109 map__set_pgoff(map, pgoff); in map__init() 110 map__set_reloc(map, 0); in map__init() 111 map__set_dso(map, dso__get(dso)); in map__init() 112 map__set_map_ip(map, map__dso_map_ip); in map__init() 113 map__set_unmap_ip(map, map__dso_unmap_ip); in map__init() 114 map__set_erange_warned(map, false); in map__init() 115 refcount_set(map__refcnt(map), 1); in map__init() [all …]
|
D | hashmap.c | 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 57 if (!map) in hashmap__new() [all …]
|
D | mmap.c | 39 size_t mmap__mmap_len(struct mmap *map) in mmap__mmap_len() argument 41 return perf_mmap__mmap_len(&map->core); in mmap__mmap_len() 71 static int perf_mmap__aio_enabled(struct mmap *map) in perf_mmap__aio_enabled() argument 73 return map->aio.nr_cblocks > 0; in perf_mmap__aio_enabled() 77 static int perf_mmap__aio_alloc(struct mmap *map, int idx) in perf_mmap__aio_alloc() argument 79 map->aio.data[idx] = mmap(NULL, mmap__mmap_len(map), PROT_READ|PROT_WRITE, in perf_mmap__aio_alloc() 81 if (map->aio.data[idx] == MAP_FAILED) { in perf_mmap__aio_alloc() 82 map->aio.data[idx] = NULL; in perf_mmap__aio_alloc() 89 static void perf_mmap__aio_free(struct mmap *map, int idx) in perf_mmap__aio_free() argument 91 if (map->aio.data[idx]) { in perf_mmap__aio_free() [all …]
|
D | hashmap.h | 83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 88 void hashmap__clear(struct hashmap *map); 89 void hashmap__free(struct hashmap *map); 91 size_t hashmap__size(const struct hashmap *map); 92 size_t hashmap__capacity(const struct hashmap *map); 129 int hashmap_insert(struct hashmap *map, long key, long value, 133 #define hashmap__insert(map, key, value, strategy, old_key, old_value) \ argument 134 hashmap_insert((map), (long)(key), (long)(value), (strategy), \ 138 #define hashmap__add(map, key, value) \ argument 139 hashmap__insert((map), (key), (value), HASHMAP_ADD, NULL, NULL) [all …]
|
/linux-6.6.21/drivers/base/regmap/ |
D | regcache.c | 24 static int regcache_hw_init(struct regmap *map) in regcache_hw_init() argument 32 if (!map->num_reg_defaults_raw) in regcache_hw_init() 36 for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) in regcache_hw_init() 37 if (regmap_readable(map, i * map->reg_stride) && in regcache_hw_init() 38 !regmap_volatile(map, i * map->reg_stride)) in regcache_hw_init() 43 map->cache_bypass = true; in regcache_hw_init() 47 map->num_reg_defaults = count; in regcache_hw_init() 48 map->reg_defaults = kmalloc_array(count, sizeof(struct reg_default), in regcache_hw_init() 50 if (!map->reg_defaults) in regcache_hw_init() 53 if (!map->reg_defaults_raw) { in regcache_hw_init() [all …]
|
D | regmap.c | 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 && 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() 98 if (map->wr_table) in regmap_writeable() [all …]
|
D | regmap-debugfs.c | 19 struct regmap *map; member 38 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() 67 static void regmap_debugfs_free_dump_cache(struct regmap *map) in regmap_debugfs_free_dump_cache() argument 71 while (!list_empty(&map->debugfs_off_cache)) { in regmap_debugfs_free_dump_cache() 72 c = list_first_entry(&map->debugfs_off_cache, in regmap_debugfs_free_dump_cache() 80 static bool regmap_printable(struct regmap *map, unsigned int reg) in regmap_printable() argument 82 if (regmap_precious(map, reg)) in regmap_printable() 85 if (!regmap_readable(map, reg) && !regmap_cached(map, reg)) in regmap_printable() [all …]
|
D | trace.h | 18 TP_PROTO(struct regmap *map, unsigned int reg, 21 TP_ARGS(map, reg, val), 24 __string( name, regmap_name(map) ) 30 __assign_str(name, regmap_name(map)); 40 TP_PROTO(struct regmap *map, unsigned int reg, 43 TP_ARGS(map, reg, val) 48 TP_PROTO(struct regmap *map, unsigned int reg, 51 TP_ARGS(map, reg, val) 56 TP_PROTO(struct regmap *map, unsigned int reg, 59 TP_ARGS(map, reg, val) [all …]
|
/linux-6.6.21/include/linux/mtd/ |
D | map.h | 22 #define map_bankwidth(map) 1 argument 23 #define map_bankwidth_is_1(map) (map_bankwidth(map) == 1) argument 24 #define map_bankwidth_is_large(map) (0) argument 25 #define map_words(map) (1) argument 28 #define map_bankwidth_is_1(map) (0) argument 34 # define map_bankwidth(map) ((map)->bankwidth) argument 36 # define map_bankwidth(map) 2 argument 37 # define map_bankwidth_is_large(map) (0) argument 38 # define map_words(map) (1) argument 40 #define map_bankwidth_is_2(map) (map_bankwidth(map) == 2) argument [all …]
|
/linux-6.6.21/net/sctp/ |
D | tsnmap.c | 29 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-6.6.21/drivers/mtd/maps/ |
D | pci.c | 23 int (*init)(struct pci_dev *dev, struct map_pci_info *map); 24 void (*exit)(struct pci_dev *dev, struct map_pci_info *map); 25 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs); 30 struct map_info map; member 32 void (*exit)(struct pci_dev *dev, struct map_pci_info *map); 33 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs); 39 struct map_pci_info *map = (struct map_pci_info *)_map; in mtd_pci_read8() local 41 val.x[0]= readb(map->base + map->translate(map, ofs)); in mtd_pci_read8() 47 struct map_pci_info *map = (struct map_pci_info *)_map; in mtd_pci_read32() local 49 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32() [all …]
|
D | amd76xrom.c | 42 struct map_info map; member 71 struct amd76xrom_map_info *map, *scratch; in amd76xrom_cleanup() local 82 list_for_each_entry_safe(map, scratch, &window->maps, list) { in amd76xrom_cleanup() 83 if (map->rsrc.parent) { in amd76xrom_cleanup() 84 release_resource(&map->rsrc); in amd76xrom_cleanup() 86 mtd_device_unregister(map->mtd); in amd76xrom_cleanup() 87 map_destroy(map->mtd); in amd76xrom_cleanup() 88 list_del(&map->list); in amd76xrom_cleanup() 89 kfree(map); in amd76xrom_cleanup() 110 struct amd76xrom_map_info *map = NULL; in amd76xrom_init_one() local [all …]
|
D | ck804xrom.c | 46 struct map_info map; member 84 struct ck804xrom_map_info *map, *scratch; in ck804xrom_cleanup() local 94 list_for_each_entry_safe(map, scratch, &window->maps, list) { in ck804xrom_cleanup() 95 if (map->rsrc.parent) in ck804xrom_cleanup() 96 release_resource(&map->rsrc); in ck804xrom_cleanup() 98 mtd_device_unregister(map->mtd); in ck804xrom_cleanup() 99 map_destroy(map->mtd); in ck804xrom_cleanup() 100 list_del(&map->list); in ck804xrom_cleanup() 101 kfree(map); in ck804xrom_cleanup() 123 struct ck804xrom_map_info *map = NULL; in ck804xrom_init_one() local [all …]
|
D | ichxrom.c | 47 struct map_info map; member 59 struct ichxrom_map_info *map, *scratch; in ichxrom_cleanup() local 70 list_for_each_entry_safe(map, scratch, &window->maps, list) { in ichxrom_cleanup() 71 if (map->rsrc.parent) in ichxrom_cleanup() 72 release_resource(&map->rsrc); in ichxrom_cleanup() 73 mtd_device_unregister(map->mtd); in ichxrom_cleanup() 74 map_destroy(map->mtd); in ichxrom_cleanup() 75 list_del(&map->list); in ichxrom_cleanup() 76 kfree(map); in ichxrom_cleanup() 95 struct ichxrom_map_info *map = NULL; in ichxrom_init_one() local [all …]
|
D | esb2rom.c | 108 struct map_info map; member 120 struct esb2rom_map_info *map, *scratch; in esb2rom_cleanup() local 129 list_for_each_entry_safe(map, scratch, &window->maps, list) { in esb2rom_cleanup() 130 if (map->rsrc.parent) in esb2rom_cleanup() 131 release_resource(&map->rsrc); in esb2rom_cleanup() 132 mtd_device_unregister(map->mtd); in esb2rom_cleanup() 133 map_destroy(map->mtd); in esb2rom_cleanup() 134 list_del(&map->list); in esb2rom_cleanup() 135 kfree(map); in esb2rom_cleanup() 153 struct esb2rom_map_info *map = NULL; in esb2rom_init_one() local [all …]
|
/linux-6.6.21/tools/lib/bpf/ |
D | hashmap.c | 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 57 if (!map) in hashmap__new() [all …]
|
D | hashmap.h | 83 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, 88 void hashmap__clear(struct hashmap *map); 89 void hashmap__free(struct hashmap *map); 91 size_t hashmap__size(const struct hashmap *map); 92 size_t hashmap__capacity(const struct hashmap *map); 129 int hashmap_insert(struct hashmap *map, long key, long value, 133 #define hashmap__insert(map, key, value, strategy, old_key, old_value) \ argument 134 hashmap_insert((map), (long)(key), (long)(value), (strategy), \ 138 #define hashmap__add(map, key, value) \ argument 139 hashmap__insert((map), (key), (value), HASHMAP_ADD, NULL, NULL) [all …]
|
/linux-6.6.21/drivers/mtd/lpddr/ |
D | qinfo_probe.c | 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() 67 unsigned long adr = lpddr_get_qinforec_pos(map, id_str); in lpddr_info_query() [all …]
|
/linux-6.6.21/kernel/dma/ |
D | map_benchmark.c | 38 struct map_benchmark_data *map = data; in map_benchmark_thread() local 39 int npages = map->bparam.granule; in map_benchmark_thread() 58 if (map->dir != DMA_FROM_DEVICE) in map_benchmark_thread() 62 dma_addr = dma_map_single(map->dev, buf, size, map->dir); in map_benchmark_thread() 63 if (unlikely(dma_mapping_error(map->dev, dma_addr))) { in map_benchmark_thread() 65 dev_name(map->dev)); in map_benchmark_thread() 73 ndelay(map->bparam.dma_trans_ns); in map_benchmark_thread() 76 dma_unmap_single(map->dev, dma_addr, size, map->dir); in map_benchmark_thread() 87 atomic64_add(map_100ns, &map->sum_map_100ns); in map_benchmark_thread() 88 atomic64_add(unmap_100ns, &map->sum_unmap_100ns); in map_benchmark_thread() [all …]
|
/linux-6.6.21/kernel/bpf/ |
D | arraymap.c | 26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu() 37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu() 38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu() 143 array->map.bypass_spec_v1 = bypass_spec_v1; in array_map_alloc() 146 bpf_map_init_from_attr(&array->map, attr); in array_map_alloc() 154 return &array->map; in array_map_alloc() 163 static void *array_map_lookup_elem(struct bpf_map *map, void *key) in array_map_lookup_elem() argument 165 struct bpf_array *array = container_of(map, struct bpf_array, map); in array_map_lookup_elem() 168 if (unlikely(index >= array->map.max_entries)) in array_map_lookup_elem() 174 static int array_map_direct_value_addr(const struct bpf_map *map, u64 *imm, in array_map_direct_value_addr() argument [all …]
|
D | local_storage.c | 22 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 …]
|
/linux-6.6.21/drivers/xen/ |
D | gntdev.c | 67 static void unmap_grant_pages(struct gntdev_grant_map *map, 83 struct gntdev_grant_map *map; in gntdev_print_maps() local 86 list_for_each_entry(map, &priv->maps, next) in gntdev_print_maps() 88 map->index, map->count, in gntdev_print_maps() 89 map->index == text_index && text ? text : ""); in gntdev_print_maps() 93 static void gntdev_free_map(struct gntdev_grant_map *map) in gntdev_free_map() argument 95 if (map == NULL) in gntdev_free_map() 99 if (map->dma_vaddr) { in gntdev_free_map() 102 args.dev = map->dma_dev; in gntdev_free_map() 103 args.coherent = !!(map->dma_flags & GNTDEV_DMA_FLAG_COHERENT); in gntdev_free_map() [all …]
|
/linux-6.6.21/kernel/trace/ |
D | tracing_map.c | 202 static int tracing_map_add_field(struct tracing_map *map, in tracing_map_add_field() argument 207 if (map->n_fields < TRACING_MAP_FIELDS_MAX) { in tracing_map_add_field() 208 ret = map->n_fields; in tracing_map_add_field() 209 map->fields[map->n_fields++].cmp_fn = cmp_fn; in tracing_map_add_field() 227 int tracing_map_add_sum_field(struct tracing_map *map) in tracing_map_add_sum_field() argument 229 return tracing_map_add_field(map, tracing_map_cmp_atomic64); in tracing_map_add_sum_field() 244 int tracing_map_add_var(struct tracing_map *map) in tracing_map_add_var() argument 248 if (map->n_vars < TRACING_MAP_VARS_MAX) in tracing_map_add_var() 249 ret = map->n_vars++; in tracing_map_add_var() 270 int tracing_map_add_key_field(struct tracing_map *map, in tracing_map_add_key_field() argument [all …]
|
/linux-6.6.21/tools/lib/perf/ |
D | threadmap.c | 10 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 …]
|