Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/kernel/bpf/
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, void *owner) in owner_storage() argument
46 struct bpf_map *map = &smap->map; in owner_storage()
[all …]
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->map.max_entries); in prealloc_elems_and_freelist()
85 bpf_map_area_free(smap->elems); in prealloc_elems_and_freelist()
93 struct bpf_stack_map *smap; in stack_map_alloc() local
[all …]
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/
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-5.10/net/core/
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()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dbpf_local_storage.h63 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,
Dbpf.h111 int (*map_local_storage_charge)(struct bpf_local_storage_map *smap,
113 void (*map_local_storage_uncharge)(struct bpf_local_storage_map *smap,
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_reflink.c996 struct xfs_bmbt_irec smap; in xfs_reflink_remap_extent() local
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.br_startblock) { in xfs_reflink_remap_extent()
1044 if (dmap->br_state != smap.br_state) in xfs_reflink_remap_extent()
1051 smap.br_state == XFS_EXT_UNWRITTEN) in xfs_reflink_remap_extent()
[all …]
/kernel/linux/linux-5.10/fs/nilfs2/
Dpage.c241 struct address_space *smap) in nilfs_copy_dirty_pages() argument
250 if (!pagevec_lookup_tag(&pvec, smap, &index, PAGECACHE_TAG_DIRTY)) in nilfs_copy_dirty_pages()
295 struct address_space *smap) in nilfs_copy_back_pages() argument
303 n = pagevec_lookup(&pvec, smap, &index); 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->i_pages); in nilfs_copy_back_pages()
/kernel/linux/linux-5.10/arch/x86/kvm/
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-5.10/fs/ocfs2/dlm/
Ddlmdomain.c51 static inline void byte_copymap(u8 dmap[], unsigned long smap[], in byte_copymap() argument
61 if (test_bit(nn, smap)) in byte_copymap()
/kernel/linux/linux-5.10/arch/x86/kvm/svm/
Dsvm.c4090 bool smep, smap, is_user; in svm_can_emulate_instruction() local
4142 smap = cr4 & X86_CR4_SMAP; in svm_can_emulate_instruction()
4144 if (smap && (!smep || is_user)) { in svm_can_emulate_instruction()
/kernel/linux/linux-5.10/Documentation/virt/kvm/
Dmmu.rst192 Contains the value of cr4.smap && !cr0.wp for which the page is valid