| /linux/kernel/bpf/ |
| H A D | bpf_local_storage.c | 21 select_bucket(struct bpf_local_storage_map *smap, in select_bucket() argument 24 return &smap->buckets[hash_ptr(local_storage, smap->bucket_log)]; in select_bucket() 27 static int mem_charge(struct bpf_local_storage_map *smap, void *owner, u32 size) in mem_charge() argument 29 struct bpf_map *map = &smap->map; in mem_charge() 34 return map->ops->map_local_storage_charge(smap, owner, size); in mem_charge() 37 static void mem_uncharge(struct bpf_local_storage_map *smap, void *owner, in mem_uncharge() argument 40 struct bpf_map *map = &smap->map; in mem_uncharge() 43 map->ops->map_local_storage_uncharge(smap, owner, size); in mem_uncharge() 47 owner_storage(struct bpf_local_storage_map *smap, void *owner) in owner_storage() argument 49 struct bpf_map *map = &smap->map; in owner_storage() [all …]
|
| H A D | stackmap.c | 68 static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) in prealloc_elems_and_freelist() argument 71 (u64)smap->map.value_size; in prealloc_elems_and_freelist() 74 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist() 75 smap->map.numa_node); in prealloc_elems_and_freelist() 76 if (!smap->elems) in prealloc_elems_and_freelist() 79 err = pcpu_freelist_init(&smap->freelist); in prealloc_elems_and_freelist() 83 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist() 84 smap->map.max_entries); in prealloc_elems_and_freelist() 88 bpf_map_area_free(smap->elems); in prealloc_elems_and_freelist() 96 struct bpf_stack_map *smap; in stack_map_alloc() local [all …]
|
| H A D | bpf_inode_storage.c | 40 struct bpf_local_storage_map *smap; in inode_storage_lookup() local 52 smap = (struct bpf_local_storage_map *)map; in inode_storage_lookup() 53 return bpf_local_storage_lookup(inode_storage, smap, cacheit_lockit); in inode_storage_lookup()
|
| /linux/tools/testing/selftests/mm/ |
| H A D | map_populate.c | 35 static void parent_f(int sock, unsigned long *smap, int child) in parent_f() argument 42 *smap = 0x22222BAD; in parent_f() 43 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f() 56 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument 60 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in child_f() 62 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f() 64 BUG_ON(*smap != 0xdeadbabe, "MAP_PRIVATE | MAP_POPULATE changed file"); in child_f() 72 ksft_test_result(*smap != 0x22222BAD, "MAP_POPULATE COW private page\n"); in child_f() 73 ksft_test_result(*smap == 0xdeadbabe, "The mapping state\n"); in child_f() 83 unsigned long *smap; in main() local [all …]
|
| /linux/include/linux/ |
| H A D | bpf_local_storage.h | 66 struct bpf_local_storage_map __rcu *smap; member 140 struct bpf_local_storage_map *smap, 145 struct bpf_local_storage_map *smap, in bpf_local_storage_lookup() argument 152 sdata = rcu_dereference_check(local_storage->cache[smap->cache_idx], in bpf_local_storage_lookup() 154 if (sdata && rcu_access_pointer(sdata->smap) == smap) in bpf_local_storage_lookup() 160 if (rcu_access_pointer(SDATA(selem)->smap) == smap) in bpf_local_storage_lookup() 166 __bpf_local_storage_insert_cache(local_storage, smap, selem); in bpf_local_storage_lookup() 185 int bpf_selem_link_map(struct bpf_local_storage_map *smap, 190 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value, 198 struct bpf_local_storage_map *smap, [all …]
|
| H A D | bpf.h | 156 int (*map_local_storage_charge)(struct bpf_local_storage_map *smap, 158 void (*map_local_storage_uncharge)(struct bpf_local_storage_map *smap,
|
| /linux/net/core/ |
| H A D | bpf_sk_storage.c | 24 struct bpf_local_storage_map *smap; in bpf_sk_storage_lookup() local 31 smap = (struct bpf_local_storage_map *)map; in bpf_sk_storage_lookup() 32 return bpf_local_storage_lookup(sk_storage, smap, cacheit_lockit); in bpf_sk_storage_lookup() 135 struct bpf_local_storage_map *smap, in bpf_sk_storage_clone_elem() argument 140 copy_selem = bpf_selem_alloc(smap, newsk, NULL, false); in bpf_sk_storage_clone_elem() 144 if (btf_record_has_field(smap->map.record, BPF_SPIN_LOCK)) in bpf_sk_storage_clone_elem() 145 copy_map_value_locked(&smap->map, SDATA(copy_selem)->data, in bpf_sk_storage_clone_elem() 148 copy_map_value(&smap->map, SDATA(copy_selem)->data, in bpf_sk_storage_clone_elem() 169 struct bpf_local_storage_map *smap; in bpf_sk_storage_clone() local 172 smap = rcu_dereference(SDATA(selem)->smap); in bpf_sk_storage_clone() [all …]
|
| /linux/fs/xfs/ |
| H A D | xfs_reflink.c | 1354 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local 1414 &smap, &nimaps, 0); in xfs_reflink_remap_extent() 1417 ASSERT(nimaps == 1 && smap.br_startoff == dmap->br_startoff); in xfs_reflink_remap_extent() 1418 smap_real = xfs_bmap_is_real_extent(&smap); in xfs_reflink_remap_extent() 1424 dmap->br_blockcount = min(dmap->br_blockcount, smap.br_blockcount); in xfs_reflink_remap_extent() 1425 ASSERT(dmap->br_blockcount == smap.br_blockcount); in xfs_reflink_remap_extent() 1427 trace_xfs_reflink_remap_extent_dest(ip, &smap); in xfs_reflink_remap_extent() 1434 if (dmap->br_startblock == smap.br_startblock) { in xfs_reflink_remap_extent() 1435 if (dmap->br_state != smap.br_state) { in xfs_reflink_remap_extent() 1444 smap.br_state == XFS_EXT_UNWRITTEN) in xfs_reflink_remap_extent() [all …]
|
| H A D | xfs_iomap.c | 1658 struct xfs_bmbt_irec smap; in xfs_zoned_buffered_write_iomap_begin() local 1662 &smap)) in xfs_zoned_buffered_write_iomap_begin() 1663 smap.br_startoff = end_fsb; /* fake hole until EOF */ in xfs_zoned_buffered_write_iomap_begin() 1664 if (smap.br_startoff > offset_fsb) { in xfs_zoned_buffered_write_iomap_begin() 1665 end_fsb = min(end_fsb, smap.br_startoff); in xfs_zoned_buffered_write_iomap_begin() 1668 smap.br_startoff + smap.br_blockcount); in xfs_zoned_buffered_write_iomap_begin() 1669 xfs_trim_extent(&smap, offset_fsb, in xfs_zoned_buffered_write_iomap_begin() 1671 error = xfs_bmbt_to_iomap(ip, srcmap, &smap, flags, 0, in xfs_zoned_buffered_write_iomap_begin()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | local_storage.c | |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | hwmon.c | 209 DECLARE_BITMAP(smap, BITS_PER_TYPE(sensor_map)); in mlx5_hwmon_init_sensors_indexes() 214 bitmap_from_u64(smap, sensor_map); in mlx5_hwmon_init_sensors_indexes() 216 for_each_set_bit(bit_pos, smap, BITS_PER_TYPE(sensor_map)) { in mlx5_hwmon_init_sensors_indexes()
|
| /linux/lib/zstd/common/ |
| H A D | cpu.h | 176 B(smap, 20)
|
| /linux/fs/btrfs/ |
| H A D | volumes.h | 735 struct btrfs_io_stripe *smap, int *mirror_num_ret); 737 struct btrfs_io_stripe *smap, u64 logical,
|
| H A D | volumes.c | 7046 const struct btrfs_io_stripe *smap, in is_single_device_io() argument 7051 if (!smap) in is_single_device_io() 7234 struct btrfs_io_stripe *smap, int *mirror_num_ret) in btrfs_map_block() argument 7355 if (is_single_device_io(fs_info, smap, map, num_alloc_stripes, &io_geom)) { in btrfs_map_block() 7356 ret = set_io_stripe(fs_info, logical, length, smap, map, &io_geom); in btrfs_map_block() 8998 struct btrfs_io_stripe *smap, in map_raid56_repair_block() argument 9013 smap->dev = bioc->stripes[i].dev; in map_raid56_repair_block() 9014 smap->physical = bioc->stripes[i].physical + in map_raid56_repair_block() 9033 struct btrfs_io_stripe *smap, u64 logical, in btrfs_map_repair_block() argument 9044 &bioc, smap, &mirror_ret); in btrfs_map_repair_block() [all …]
|
| /linux/fs/ |
| H A D | dax.c | 2199 const struct iomap *smap = &it_src->iomap; in dax_range_compare_iter() local 2205 len = min(len, min(smap->length, dmap->length)); in dax_range_compare_iter() 2207 if (smap->type == IOMAP_HOLE && dmap->type == IOMAP_HOLE) { in dax_range_compare_iter() 2212 if (smap->type == IOMAP_HOLE || dmap->type == IOMAP_HOLE) { in dax_range_compare_iter() 2218 ret = dax_iomap_direct_access(smap, pos1, ALIGN(pos1 + len, PAGE_SIZE), in dax_range_compare_iter()
|
| /linux/arch/x86/kvm/svm/ |
| H A D | svm.c | 5132 bool smep, smap, is_user; in svm_check_emulate_instruction() 5241 smap = kvm_is_cr4_bit_set(vcpu, X86_CR4_SMAP); in svm_check_emulate_instruction() 5243 if (smap && (!smep || is_user)) { in svm_check_emulate_instruction() 5135 bool smep, smap, is_user; svm_check_emulate_instruction() local
|
| /linux/tools/arch/x86/kcpuid/ |
| H A D | cpuid.csv | 210 0x7, 0, ebx, 20, smap , Supervisor mode access prevention
|