Home
last modified time | relevance | path

Searched refs:smap (Results 1 – 24 of 24) sorted by relevance

/linux-6.15/kernel/bpf/
H A Dbpf_local_storage.c24 return &smap->buckets[hash_ptr(selem, smap->bucket_log)]; in select_bucket()
95 selem = bpf_map_kzalloc(&smap->map, smap->elem_size, in bpf_selem_alloc()
110 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_alloc()
175 if (smap) in bpf_local_storage_free()
214 smap = rcu_dereference_check(SDATA(selem)->smap, 1); in bpf_selem_free_rcu()
301 mem_uncharge(smap, owner, smap->elem_size); in bpf_selem_unlink_storage_nolock()
333 if (rcu_access_pointer(local_storage->smap) == smap) in bpf_selem_unlink_storage_nolock()
437 RCU_INIT_POINTER(SDATA(selem)->smap, smap); in bpf_selem_link_map()
506 RCU_INIT_POINTER(storage->smap, smap); in bpf_local_storage_alloc()
592 mem_uncharge(smap, owner, smap->elem_size); in bpf_local_storage_update()
[all …]
H A Dstackmap.c48 (u64)smap->map.value_size; in prealloc_elems_and_freelist()
51 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist()
52 smap->map.numa_node); in prealloc_elems_and_freelist()
53 if (!smap->elems) in prealloc_elems_and_freelist()
60 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist()
73 struct bpf_stack_map *smap; in stack_map_alloc() local
104 if (!smap) in stack_map_alloc()
118 return &smap->map; in stack_map_alloc()
123 bpf_map_area_free(smap); in stack_map_alloc()
685 if (id >= smap->n_buckets || !smap->buckets[id]) in stack_map_get_next_key()
[all …]
H A Dbpf_inode_storage.c40 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()
H A Dbpf_cgrp_storage.c66 struct bpf_local_storage_map *smap; in cgroup_storage_lookup() local
73 smap = (struct bpf_local_storage_map *)map; in cgroup_storage_lookup()
74 return bpf_local_storage_lookup(cgroup_storage, smap, cacheit_lockit); in cgroup_storage_lookup()
H A Dbpf_task_storage.c58 struct bpf_local_storage_map *smap; in task_storage_lookup() local
65 smap = (struct bpf_local_storage_map *)map; in task_storage_lookup()
66 return bpf_local_storage_lookup(task_storage, smap, cacheit_lockit); in task_storage_lookup()
/linux-6.15/tools/testing/selftests/mm/
H A Dmap_populate.c42 *smap = 0x22222BAD; in parent_f()
43 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f()
60 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in child_f()
62 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f()
83 unsigned long *smap; in main() local
97 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in main()
99 BUG_ON(smap == MAP_FAILED, "mmap()"); in main()
101 *smap = 0xdeadbabe; in main()
103 ret = msync(smap, MMAP_SZ, MS_SYNC); in main()
116 parent_f(sock[1], smap, child); in main()
[all …]
/linux-6.15/include/linux/
H A Dbpf_local_storage.h71 struct bpf_local_storage_map __rcu *smap; member
96 struct bpf_local_storage_map __rcu *smap; member
139 struct bpf_local_storage_map *smap,
144 struct bpf_local_storage_map *smap, in bpf_local_storage_lookup() argument
151 sdata = rcu_dereference_check(local_storage->cache[smap->cache_idx], in bpf_local_storage_lookup()
153 if (sdata && rcu_access_pointer(sdata->smap) == smap) in bpf_local_storage_lookup()
159 if (rcu_access_pointer(SDATA(selem)->smap) == smap) in bpf_local_storage_lookup()
165 __bpf_local_storage_insert_cache(local_storage, smap, selem); in bpf_local_storage_lookup()
185 void bpf_selem_link_map(struct bpf_local_storage_map *smap,
193 struct bpf_local_storage_map *smap,
[all …]
H A Dbpf.h149 int (*map_local_storage_charge)(struct bpf_local_storage_map *smap,
151 void (*map_local_storage_uncharge)(struct bpf_local_storage_map *smap,
/linux-6.15/net/core/
H A Dbpf_sk_storage.c24 struct bpf_local_storage_map *smap; in bpf_sk_storage_lookup() local
173 struct bpf_local_storage_map *smap; in bpf_sk_storage_clone() local
176 smap = rcu_dereference(SDATA(selem)->smap); in bpf_sk_storage_clone()
203 atomic_sub(smap->elem_size, in bpf_sk_storage_clone()
535 struct bpf_local_storage_map *smap; in diag_get() local
544 smap = rcu_dereference(sdata->smap); in diag_get()
549 smap->map.value_size, in diag_get()
576 struct bpf_local_storage_map *smap; in bpf_sk_storage_diag_put_all() local
596 smap = rcu_dereference(SDATA(selem)->smap); in bpf_sk_storage_diag_put_all()
721 b = &smap->buckets[bucket_id++]; in bpf_sk_storage_map_seq_find_next()
[all …]
/linux-6.15/fs/btrfs/
H A Dbio.c494 bio->bi_private = smap->dev; in btrfs_submit_bio()
496 btrfs_submit_dev_bio(smap->dev, bio); in btrfs_submit_bio()
529 struct btrfs_io_stripe smap; member
639 async->smap = *smap; in btrfs_wq_submit_bio()
676 struct btrfs_io_stripe smap; in btrfs_submit_chunk() local
681 smap.rst_search_commit_root = true; in btrfs_submit_chunk()
683 smap.rst_search_commit_root = false; in btrfs_submit_chunk()
687 &bioc, &smap, &mirror_num); in btrfs_submit_chunk()
809 struct btrfs_io_stripe smap = { 0 }; in btrfs_repair_io_failure() local
830 if (!smap.dev->bdev || in btrfs_repair_io_failure()
[all …]
H A Dvolumes.h708 struct btrfs_io_stripe *smap, int *mirror_num_ret);
710 struct btrfs_io_stripe *smap, u64 logical,
H A Dvolumes.c6365 const struct btrfs_io_stripe *smap, in is_single_device_io() argument
6370 if (!smap) in is_single_device_io()
6553 struct btrfs_io_stripe *smap, int *mirror_num_ret) in btrfs_map_block() argument
8194 struct btrfs_io_stripe *smap, in map_raid56_repair_block() argument
8209 smap->dev = bioc->stripes[i].dev; in map_raid56_repair_block()
8210 smap->physical = bioc->stripes[i].physical + in map_raid56_repair_block()
8229 struct btrfs_io_stripe *smap, u64 logical, in btrfs_map_repair_block() argument
8240 &bioc, smap, &mirror_ret); in btrfs_map_repair_block()
8253 map_raid56_repair_block(bioc, smap, logical); in btrfs_map_repair_block()
8258 smap->dev = bioc->stripes[mirror_num - 1].dev; in btrfs_map_repair_block()
[all …]
/linux-6.15/fs/nilfs2/
H A Dpage.c244 struct address_space *smap) in nilfs_copy_dirty_pages() argument
253 if (!filemap_get_folios_tag(smap, &index, (pgoff_t)-1, in nilfs_copy_dirty_pages()
299 struct address_space *smap) in nilfs_copy_back_pages() argument
307 n = filemap_get_folios(smap, &start, ~0UL, &fbatch); in nilfs_copy_back_pages()
328 xa_lock_irq(&smap->i_pages); in nilfs_copy_back_pages()
329 f = __xa_erase(&smap->i_pages, index); in nilfs_copy_back_pages()
331 smap->nrpages--; in nilfs_copy_back_pages()
332 xa_unlock_irq(&smap->i_pages); in nilfs_copy_back_pages()
/linux-6.15/fs/xfs/
H A Dxfs_reflink.c1234 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local
1294 &smap, &nimaps, 0); in xfs_reflink_remap_extent()
1298 smap_real = xfs_bmap_is_real_extent(&smap); in xfs_reflink_remap_extent()
1307 trace_xfs_reflink_remap_extent_dest(ip, &smap); in xfs_reflink_remap_extent()
1314 if (dmap->br_startblock == smap.br_startblock) { in xfs_reflink_remap_extent()
1315 if (dmap->br_state != smap.br_state) { in xfs_reflink_remap_extent()
1324 smap.br_state == XFS_EXT_UNWRITTEN) in xfs_reflink_remap_extent()
1387 xfs_refcount_decrease_extent(tp, isrt, &smap); in xfs_reflink_remap_extent()
1388 qdelta -= smap.br_blockcount; in xfs_reflink_remap_extent()
1398 error = xfs_bunmapi(NULL, ip, smap.br_startoff, in xfs_reflink_remap_extent()
[all …]
H A Dxfs_iomap.c1394 struct xfs_bmbt_irec smap; in xfs_zoned_buffered_write_iomap_begin() local
1398 &smap)) in xfs_zoned_buffered_write_iomap_begin()
1399 smap.br_startoff = end_fsb; /* fake hole until EOF */ in xfs_zoned_buffered_write_iomap_begin()
1400 if (smap.br_startoff > offset_fsb) { in xfs_zoned_buffered_write_iomap_begin()
1406 smap.br_startoff); in xfs_zoned_buffered_write_iomap_begin()
1409 end_fsb = min(end_fsb, smap.br_startoff); in xfs_zoned_buffered_write_iomap_begin()
1412 smap.br_startoff + smap.br_blockcount); in xfs_zoned_buffered_write_iomap_begin()
1413 xfs_trim_extent(&smap, offset_fsb, in xfs_zoned_buffered_write_iomap_begin()
1415 error = xfs_bmbt_to_iomap(ip, srcmap, &smap, flags, 0, in xfs_zoned_buffered_write_iomap_begin()
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dlocal_storage.c99 if (!local_storage || local_storage->smap) in BPF_PROG()
176 if (!sk->sk_bpf_storage || sk->sk_bpf_storage->smap) in BPF_PROG()
/linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/
H A Dhwmon.c209 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-6.15/lib/zstd/common/
H A Dcpu.h176 B(smap, 20)
/linux-6.15/fs/
H A Ddax.c2201 const struct iomap *smap = &it_src->iomap; in dax_range_compare_iter() local
2208 len = min(len, min(smap->length, dmap->length)); in dax_range_compare_iter()
2210 if (smap->type == IOMAP_HOLE && dmap->type == IOMAP_HOLE) { in dax_range_compare_iter()
2215 if (smap->type == IOMAP_HOLE || dmap->type == IOMAP_HOLE) { in dax_range_compare_iter()
2221 ret = dax_iomap_direct_access(smap, pos1, ALIGN(pos1 + len, PAGE_SIZE), in dax_range_compare_iter()
/linux-6.15/fs/ocfs2/dlm/
H A Ddlmdomain.c49 static inline void byte_copymap(u8 dmap[], unsigned long smap[], in byte_copymap() argument
59 if (test_bit(nn, smap)) in byte_copymap()
/linux-6.15/arch/x86/kvm/svm/
H A Dsvm.c4931 bool smep, smap, is_user; in svm_check_emulate_instruction() local
5040 smap = kvm_is_cr4_bit_set(vcpu, X86_CR4_SMAP); in svm_check_emulate_instruction()
5042 if (smap && (!smep || is_user)) { in svm_check_emulate_instruction()
/linux-6.15/Documentation/virt/kvm/x86/
H A Dmmu.rst192 Contains the value of cr4.smap && !cr0.wp for which the page is valid
/linux-6.15/arch/x86/kvm/mmu/
H A Dmmu.c210 BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, smap, X86_CR4_SMAP);
230 BUILD_MMU_ROLE_ACCESSOR(ext, cr4, smap);
/linux-6.15/tools/arch/x86/kcpuid/
H A Dcpuid.csv209 7, 0, ebx, 20, smap , Supervisor mode access prevention