Home
last modified time | relevance | path

Searched refs:smap (Results 1 - 25 of 53) sorted by relevance

123

/kernel/linux/linux-6.6/kernel/bpf/
H A Dbpf_local_storage.c21 select_bucket(struct bpf_local_storage_map *smap, in select_bucket() argument
24 return &smap->buckets[hash_ptr(selem, 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, voi argument
75 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value, bool charge_mem, gfp_t gfp_flags) bpf_selem_alloc() argument
156 bpf_local_storage_free(struct bpf_local_storage *local_storage, struct bpf_local_storage_map *smap, bool bpf_ma, bool reuse_now) bpf_local_storage_free() argument
225 bpf_selem_free(struct bpf_local_storage_elem *selem, struct bpf_local_storage_map *smap, bool reuse_now) bpf_selem_free() argument
257 struct bpf_local_storage_map *smap; bpf_selem_unlink_storage_nolock() local
379 struct bpf_local_storage_map *smap; bpf_selem_unlink_map() local
395 bpf_selem_link_map(struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *selem) bpf_selem_link_map() argument
419 bpf_local_storage_lookup(struct bpf_local_storage *local_storage, struct bpf_local_storage_map *smap, bool cacheit_lockit) bpf_local_storage_lookup() argument
474 bpf_local_storage_alloc(void *owner, struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *first_selem, gfp_t gfp_flags) bpf_local_storage_alloc() argument
552 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap, void *value, u64 map_flags, gfp_t gfp_flags) bpf_local_storage_update() argument
773 struct bpf_local_storage_map *smap = (struct bpf_local_storage_map *)map; bpf_local_storage_map_mem_usage() local
796 struct bpf_local_storage_map *smap; bpf_local_storage_map_alloc() local
854 struct bpf_local_storage_map *smap; bpf_local_storage_map_free() local
[all...]
H A Dstackmap.c45 static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) in prealloc_elems_and_freelist() argument
48 (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()
56 err = pcpu_freelist_init(&smap->freelist); in prealloc_elems_and_freelist()
60 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist()
61 smap in prealloc_elems_and_freelist()
73 struct bpf_stack_map *smap; stack_map_alloc() local
216 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); __bpf_get_stackid() local
580 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); bpf_stackmap_copy() local
604 struct bpf_stack_map *smap = container_of(map, stack_map_get_next_key() local
639 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); stack_map_delete_elem() local
658 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); stack_map_free() local
668 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); stack_map_mem_usage() local
[all...]
H A Dbpf_cgrp_storage.c67 struct bpf_local_storage_map *smap; in cgroup_storage_lookup() local
74 smap = (struct bpf_local_storage_map *)map; in cgroup_storage_lookup()
75 return bpf_local_storage_lookup(cgroup_storage, smap, cacheit_lockit); in cgroup_storage_lookup()
H A Dbpf_inode_storage.c41 struct bpf_local_storage_map *smap; in inode_storage_lookup() local
53 smap = (struct bpf_local_storage_map *)map; in inode_storage_lookup()
54 return bpf_local_storage_lookup(inode_storage, smap, cacheit_lockit); in inode_storage_lookup()
H A Dbpf_task_storage.c61 struct bpf_local_storage_map *smap; in task_storage_lookup() local
68 smap = (struct bpf_local_storage_map *)map; in task_storage_lookup()
69 return bpf_local_storage_lookup(task_storage, smap, cacheit_lockit); in task_storage_lookup()
/kernel/linux/linux-5.10/kernel/bpf/
H A Dbpf_local_storage.c18 select_bucket(struct bpf_local_storage_map *smap, in select_bucket() argument
21 return &smap->buckets[hash_ptr(selem, smap->bucket_log)]; in select_bucket()
24 static int mem_charge(struct bpf_local_storage_map *smap, void *owner, u32 size) in mem_charge() argument
26 struct bpf_map *map = &smap->map; in mem_charge()
31 return map->ops->map_local_storage_charge(smap, owner, size); in mem_charge()
34 static void mem_uncharge(struct bpf_local_storage_map *smap, void *owner, in mem_uncharge() argument
37 struct bpf_map *map = &smap->map; in mem_uncharge()
40 map->ops->map_local_storage_uncharge(smap, owner, size); in mem_uncharge()
44 owner_storage(struct bpf_local_storage_map *smap, voi argument
72 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value, bool charge_mem) bpf_selem_alloc() argument
101 struct bpf_local_storage_map *smap; bpf_selem_unlink_storage_nolock() local
177 struct bpf_local_storage_map *smap; bpf_selem_unlink_map() local
192 bpf_selem_link_map(struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *selem) bpf_selem_link_map() argument
214 bpf_local_storage_lookup(struct bpf_local_storage *local_storage, struct bpf_local_storage_map *smap, bool cacheit_lockit) bpf_local_storage_lookup() argument
265 bpf_local_storage_alloc(void *owner, struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *first_selem) bpf_local_storage_alloc() argument
332 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap, void *value, u64 map_flags) bpf_local_storage_update() argument
479 bpf_local_storage_map_free(struct bpf_local_storage_map *smap) bpf_local_storage_map_free() argument
553 struct bpf_local_storage_map *smap; bpf_local_storage_map_alloc() local
[all...]
H A Dstackmap.c65 static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) in prealloc_elems_and_freelist() argument
68 (u64)smap->map.value_size; in prealloc_elems_and_freelist()
71 smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, in prealloc_elems_and_freelist()
72 smap->map.numa_node); in prealloc_elems_and_freelist()
73 if (!smap->elems) in prealloc_elems_and_freelist()
76 err = pcpu_freelist_init(&smap->freelist); in prealloc_elems_and_freelist()
80 pcpu_freelist_populate(&smap->freelist, smap->elems, elem_size, in prealloc_elems_and_freelist()
81 smap in prealloc_elems_and_freelist()
93 struct bpf_stack_map *smap; stack_map_alloc() local
403 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); __bpf_get_stackid() local
769 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); bpf_stackmap_copy() local
793 struct bpf_stack_map *smap = container_of(map, stack_map_get_next_key() local
828 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); stack_map_delete_elem() local
847 struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map); stack_map_free() local
[all...]
H A Dbpf_inode_storage.c40 struct bpf_local_storage_map *smap; in inode_storage_lookup() local
51 smap = (struct bpf_local_storage_map *)map; in inode_storage_lookup()
52 return bpf_local_storage_lookup(inode_storage, smap, cacheit_lockit); in inode_storage_lookup()
224 struct bpf_local_storage_map *smap; in inode_storage_map_alloc() local
226 smap = bpf_local_storage_map_alloc(attr); in inode_storage_map_alloc()
227 if (IS_ERR(smap)) in inode_storage_map_alloc()
228 return ERR_CAST(smap); in inode_storage_map_alloc()
230 smap->cache_idx = bpf_local_storage_cache_idx_get(&inode_cache); in inode_storage_map_alloc()
231 return &smap->map; in inode_storage_map_alloc()
236 struct bpf_local_storage_map *smap; in inode_storage_map_free() local
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/vm/
H A Dmap_populate.c33 static int parent_f(int sock, unsigned long *smap, int child) in parent_f() argument
40 *smap = 0x22222BAD; in parent_f()
41 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f()
53 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument
57 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in child_f()
59 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f()
61 BUG_ON(*smap != 0xdeadbabe, "MAP_PRIVATE | MAP_POPULATE changed file"); in child_f()
69 BUG_ON(*smap == 0x22222BAD, "MAP_POPULATE didn't COW private page"); in child_f()
70 BUG_ON(*smap != 0xdeadbabe, "mapping was corrupted"); in child_f()
79 unsigned long *smap; in main() local
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dmap_populate.c31 static int parent_f(int sock, unsigned long *smap, int child) in parent_f() argument
38 *smap = 0x22222BAD; in parent_f()
39 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f()
51 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument
55 smap = mmap(0, MMAP_SZ, PROT_READ | PROT_WRITE, in child_f()
57 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f()
59 BUG_ON(*smap != 0xdeadbabe, "MAP_PRIVATE | MAP_POPULATE changed file"); in child_f()
67 BUG_ON(*smap == 0x22222BAD, "MAP_POPULATE didn't COW private page"); in child_f()
68 BUG_ON(*smap != 0xdeadbabe, "mapping was corrupted"); in child_f()
77 unsigned long *smap; in main() local
[all...]
/kernel/linux/linux-5.10/net/core/
H A Dbpf_sk_storage.c22 struct bpf_local_storage_map *smap; in sk_storage_lookup() local
28 smap = (struct bpf_local_storage_map *)map; in sk_storage_lookup()
29 return bpf_local_storage_lookup(sk_storage, smap, cacheit_lockit); in sk_storage_lookup()
87 struct bpf_local_storage_map *smap; in sk_storage_map_free() local
89 smap = (struct bpf_local_storage_map *)map; in sk_storage_map_free()
90 bpf_local_storage_cache_idx_free(&sk_cache, smap->cache_idx); in sk_storage_map_free()
91 bpf_local_storage_map_free(smap); in sk_storage_map_free()
96 struct bpf_local_storage_map *smap; in sk_storage_map_alloc() local
98 smap = bpf_local_storage_map_alloc(attr); in sk_storage_map_alloc()
99 if (IS_ERR(smap)) in sk_storage_map_alloc()
166 bpf_sk_storage_clone_elem(struct sock *newsk, struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *selem) bpf_sk_storage_clone_elem() argument
203 struct bpf_local_storage_map *smap; bpf_sk_storage_clone() local
304 sk_storage_charge(struct bpf_local_storage_map *smap, void *owner, u32 size) sk_storage_charge() argument
320 sk_storage_uncharge(struct bpf_local_storage_map *smap, void *owner, u32 size) sk_storage_uncharge() argument
498 struct bpf_local_storage_map *smap; diag_get() local
539 struct bpf_local_storage_map *smap; bpf_sk_storage_diag_put_all() local
666 struct bpf_local_storage_map *smap; __acquires() local
[all...]
/kernel/linux/linux-6.6/net/core/
H A Dbpf_sk_storage.c24 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()
140 copy_selem = bpf_selem_alloc(smap, newsk, NULL, true, GFP_ATOMIC); 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()
171 struct bpf_local_storage_map *smap; in bpf_sk_storage_clone() local
174 smap in bpf_sk_storage_clone()
134 bpf_sk_storage_clone_elem(struct sock *newsk, struct bpf_local_storage_map *smap, struct bpf_local_storage_elem *selem) bpf_sk_storage_clone_elem() argument
275 bpf_sk_storage_charge(struct bpf_local_storage_map *smap, void *owner, u32 size) bpf_sk_storage_charge() argument
291 bpf_sk_storage_uncharge(struct bpf_local_storage_map *smap, void *owner, u32 size) bpf_sk_storage_uncharge() argument
547 struct bpf_local_storage_map *smap; diag_get() local
588 struct bpf_local_storage_map *smap; bpf_sk_storage_diag_put_all() local
715 struct bpf_local_storage_map *smap; __acquires() local
[all...]
/kernel/linux/linux-6.6/include/linux/
H A Dbpf_local_storage.h65 /* smap is used as the searching key when looking up
71 struct bpf_local_storage_map __rcu *smap; member
90 struct bpf_local_storage_map __rcu *smap; member
134 struct bpf_local_storage_map *smap,
153 void bpf_selem_link_map(struct bpf_local_storage_map *smap,
157 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value,
161 struct bpf_local_storage_map *smap,
166 struct bpf_local_storage_map *smap,
171 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap,
/kernel/linux/linux-5.10/include/linux/
H A Dbpf_local_storage.h57 /* smap is used as the searching key when looking up
63 struct bpf_local_storage_map __rcu *smap; member
126 struct bpf_local_storage_map *smap,
129 void bpf_local_storage_map_free(struct bpf_local_storage_map *smap);
145 void bpf_selem_link_map(struct bpf_local_storage_map *smap,
151 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value,
156 struct bpf_local_storage_map *smap,
160 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap,
/kernel/linux/linux-6.6/fs/btrfs/
H A Dbio.c497 struct btrfs_io_stripe *smap, int mirror_num) in __btrfs_submit_bio()
502 bio->bi_iter.bi_sector = smap->physical >> SECTOR_SHIFT; in __btrfs_submit_bio()
504 btrfs_bio(bio)->orig_physical = smap->physical; in __btrfs_submit_bio()
505 bio->bi_private = smap->dev; in __btrfs_submit_bio()
507 btrfs_submit_dev_bio(smap->dev, bio); in __btrfs_submit_bio()
540 struct btrfs_io_stripe smap; member
590 __btrfs_submit_bio(bio, async->bioc, &async->smap, async->mirror_num); in run_one_async_done()
625 struct btrfs_io_stripe *smap, int mirror_num) in btrfs_wq_submit_bio()
636 async->smap = *smap; in btrfs_wq_submit_bio()
496 __btrfs_submit_bio(struct bio *bio, struct btrfs_io_context *bioc, struct btrfs_io_stripe *smap, int mirror_num) __btrfs_submit_bio() argument
623 btrfs_wq_submit_bio(struct btrfs_bio *bbio, struct btrfs_io_context *bioc, struct btrfs_io_stripe *smap, int mirror_num) btrfs_wq_submit_bio() argument
656 struct btrfs_io_stripe smap; btrfs_submit_chunk() local
752 struct btrfs_io_stripe smap = { 0 }; btrfs_repair_io_failure() local
814 struct btrfs_io_stripe smap = { 0 }; btrfs_submit_repair_write() local
[all...]
/kernel/linux/linux-5.10/fs/xfs/
H A Dxfs_reflink.c996 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local
1017 * Read what's currently mapped in the destination file into smap. in xfs_reflink_remap_extent()
1018 * If smap isn't a hole, we will have to remove it before we can add in xfs_reflink_remap_extent()
1023 &smap, &nimaps, 0); in xfs_reflink_remap_extent()
1026 ASSERT(nimaps == 1 && smap.br_startoff == dmap->br_startoff); in xfs_reflink_remap_extent()
1027 smap_real = xfs_bmap_is_real_extent(&smap); in xfs_reflink_remap_extent()
1033 dmap->br_blockcount = min(dmap->br_blockcount, smap.br_blockcount); in xfs_reflink_remap_extent()
1034 ASSERT(dmap->br_blockcount == smap.br_blockcount); in xfs_reflink_remap_extent()
1036 trace_xfs_reflink_remap_extent_dest(ip, &smap); in xfs_reflink_remap_extent()
1043 if (dmap->br_startblock == smap in xfs_reflink_remap_extent()
[all...]
/kernel/linux/linux-5.10/fs/nilfs2/
H A Dpage.c241 struct address_space *smap) in nilfs_copy_dirty_pages()
250 if (!pagevec_lookup_tag(&pvec, smap, &index, PAGECACHE_TAG_DIRTY)) in nilfs_copy_dirty_pages()
289 * @smap: source page cache
295 struct address_space *smap) in nilfs_copy_back_pages()
303 n = pagevec_lookup(&pvec, smap, &index); in nilfs_copy_back_pages()
319 /* Do we not need to remove page from smap here? */ in nilfs_copy_back_pages()
324 xa_lock_irq(&smap->i_pages); in nilfs_copy_back_pages()
325 p = __xa_erase(&smap->i_pages, offset); in nilfs_copy_back_pages()
327 smap->nrpages--; in nilfs_copy_back_pages()
328 xa_unlock_irq(&smap in nilfs_copy_back_pages()
240 nilfs_copy_dirty_pages(struct address_space *dmap, struct address_space *smap) nilfs_copy_dirty_pages() argument
294 nilfs_copy_back_pages(struct address_space *dmap, struct address_space *smap) nilfs_copy_back_pages() argument
[all...]
/kernel/linux/linux-6.6/fs/nilfs2/
H A Dpage.c241 struct address_space *smap) in nilfs_copy_dirty_pages()
250 if (!filemap_get_folios_tag(smap, &index, (pgoff_t)-1, in nilfs_copy_dirty_pages()
290 * @smap: source page cache
296 struct address_space *smap) in nilfs_copy_back_pages()
304 n = filemap_get_folios(smap, &start, ~0UL, &fbatch); in nilfs_copy_back_pages()
320 /* Do we not need to remove folio from smap here? */ in nilfs_copy_back_pages()
325 xa_lock_irq(&smap->i_pages); in nilfs_copy_back_pages()
326 f = __xa_erase(&smap->i_pages, index); in nilfs_copy_back_pages()
328 smap->nrpages--; in nilfs_copy_back_pages()
329 xa_unlock_irq(&smap in nilfs_copy_back_pages()
240 nilfs_copy_dirty_pages(struct address_space *dmap, struct address_space *smap) nilfs_copy_dirty_pages() argument
295 nilfs_copy_back_pages(struct address_space *dmap, struct address_space *smap) nilfs_copy_back_pages() argument
[all...]
/kernel/linux/linux-6.6/fs/xfs/
H A Dxfs_reflink.c1157 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local
1203 * Read what's currently mapped in the destination file into smap. in xfs_reflink_remap_extent()
1204 * If smap isn't a hole, we will have to remove it before we can add in xfs_reflink_remap_extent()
1209 &smap, &nimaps, 0); in xfs_reflink_remap_extent()
1212 ASSERT(nimaps == 1 && smap.br_startoff == dmap->br_startoff); in xfs_reflink_remap_extent()
1213 smap_real = xfs_bmap_is_real_extent(&smap); in xfs_reflink_remap_extent()
1219 dmap->br_blockcount = min(dmap->br_blockcount, smap.br_blockcount); in xfs_reflink_remap_extent()
1220 ASSERT(dmap->br_blockcount == smap.br_blockcount); in xfs_reflink_remap_extent()
1222 trace_xfs_reflink_remap_extent_dest(ip, &smap); in xfs_reflink_remap_extent()
1229 if (dmap->br_startblock == smap in xfs_reflink_remap_extent()
[all...]
/kernel/linux/linux-5.10/arch/x86/kvm/
H A Dmmu.h186 unsigned long smap = (cpl - 3) & (rflags & X86_EFLAGS_AC); in permission_fault() local
188 (smap >> (X86_EFLAGS_AC_BIT - PFERR_RSVD_BIT + 1)); in permission_fault()
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
H A Dlocal_storage.c99 if (!local_storage || local_storage->smap) in BPF_PROG()
175 if (!sock->sk->sk_bpf_storage || sock->sk->sk_bpf_storage->smap) in BPF_PROG()
/kernel/linux/linux-5.10/arch/x86/lib/
H A Dcsum-wrappers_64.c10 #include <asm/smap.h>
/kernel/linux/linux-6.6/arch/x86/lib/
H A Dcsum-wrappers_64.c10 #include <asm/smap.h>
/kernel/linux/linux-5.10/arch/x86/include/asm/
H A Dfutex.h13 #include <asm/smap.h>
/kernel/linux/linux-6.6/arch/x86/include/asm/
H A Dfutex.h13 #include <asm/smap.h>

Completed in 14 milliseconds

123