Home
last modified time | relevance | path

Searched refs:refs (Results 1 – 25 of 128) sorted by relevance

123456

/kernel/linux/linux-5.10/tools/bpf/bpftool/
Dpids.c30 struct obj_refs *refs; in add_ref() local
35 hash_for_each_possible(table->table, refs, node, e->id) { in add_ref()
36 if (refs->id != e->id) in add_ref()
39 for (i = 0; i < refs->ref_cnt; i++) { in add_ref()
40 if (refs->refs[i].pid == e->pid) in add_ref()
44 tmp = realloc(refs->refs, (refs->ref_cnt + 1) * sizeof(*ref)); in add_ref()
50 refs->refs = tmp; in add_ref()
51 ref = &refs->refs[refs->ref_cnt]; in add_ref()
54 refs->ref_cnt++; in add_ref()
60 refs = calloc(1, sizeof(*refs)); in add_ref()
[all …]
/kernel/linux/linux-5.10/drivers/media/v4l2-core/
Dv4l2-h264.c51 b->refs[i].pic_num = dpb[i].pic_num; in v4l2_h264_init_reflist_builder()
53 b->refs[i].longterm = true; in v4l2_h264_init_reflist_builder()
62 b->refs[i].frame_num = (int)dpb[i].frame_num - in v4l2_h264_init_reflist_builder()
65 b->refs[i].frame_num = dpb[i].frame_num; in v4l2_h264_init_reflist_builder()
75 b->refs[i].pic_order_count = pic_order_count; in v4l2_h264_init_reflist_builder()
98 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_p_ref_list_cmp()
100 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
110 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
111 return builder->refs[idxb].frame_num < in v4l2_h264_p_ref_list_cmp()
112 builder->refs[idxa].frame_num ? in v4l2_h264_p_ref_list_cmp()
[all …]
/kernel/linux/linux-5.10/tools/include/linux/
Drefcount.h53 atomic_t refs; member
56 #define REFCOUNT_INIT(n) { .refs = ATOMIC_INIT(n), }
60 atomic_set(&r->refs, n); in refcount_set()
65 return atomic_read(&r->refs); in refcount_read()
78 unsigned int old, new, val = atomic_read(&r->refs); in refcount_inc_not_zero()
89 old = atomic_cmpxchg_relaxed(&r->refs, val, new); in refcount_inc_not_zero()
123 unsigned int old, new, val = atomic_read(&r->refs); in refcount_sub_and_test()
135 old = atomic_cmpxchg_release(&r->refs, val, new); in refcount_sub_and_test()
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/core/
Devent.c31 if (--event->refs[index * event->types_nr + type] == 0) { in nvkm_event_put()
44 if (++event->refs[index * event->types_nr + type] == 1) { in nvkm_event_get()
58 if (!event->refs || WARN_ON(index >= event->index_nr)) in nvkm_event_send()
77 if (event->refs) { in nvkm_event_fini()
78 kfree(event->refs); in nvkm_event_fini()
79 event->refs = NULL; in nvkm_event_fini()
87 event->refs = kzalloc(array3_size(index_nr, types_nr, in nvkm_event_init()
88 sizeof(*event->refs)), in nvkm_event_init()
90 if (!event->refs) in nvkm_event_init()
/kernel/linux/linux-5.10/drivers/xen/
Dgntdev-dmabuf.c49 grant_ref_t *refs; member
442 int count, u32 domid, u32 *refs, u32 *fd) in dmabuf_exp_from_refs() argument
454 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs()
493 dmabuf_imp_grant_foreign_access(struct page **pages, u32 *refs, in dmabuf_imp_grant_foreign_access() argument
517 refs[i] = cur_ref; in dmabuf_imp_grant_foreign_access()
527 static void dmabuf_imp_end_foreign_access(u32 *refs, int count) in dmabuf_imp_end_foreign_access() argument
532 if (refs[i] != GRANT_INVALID_REF) in dmabuf_imp_end_foreign_access()
533 gnttab_end_foreign_access(refs[i], 0, 0UL); in dmabuf_imp_end_foreign_access()
539 kfree(gntdev_dmabuf->u.imp.refs); in dmabuf_imp_free_storage()
552 gntdev_dmabuf->u.imp.refs = kcalloc(count, in dmabuf_imp_alloc_storage()
[all …]
/kernel/linux/linux-5.10/include/linux/
Drefcount.h112 atomic_t refs; member
115 #define REFCOUNT_INIT(n) { .refs = ATOMIC_INIT(n), }
136 atomic_set(&r->refs, n); in refcount_set()
147 return atomic_read(&r->refs); in refcount_read()
157 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &old, old + i)); in __refcount_add_not_zero()
193 int old = atomic_fetch_add_relaxed(i, &r->refs); in __refcount_add()
272 int old = atomic_fetch_sub_release(i, &r->refs); in __refcount_sub_and_test()
338 int old = atomic_fetch_sub_release(1, &r->refs); in __refcount_dec()
/kernel/linux/linux-5.10/mm/
Dgup.c31 static void hpage_pincount_add(struct page *page, int refs) in hpage_pincount_add() argument
36 atomic_add(refs, compound_pincount_ptr(page)); in hpage_pincount_add()
39 static void hpage_pincount_sub(struct page *page, int refs) in hpage_pincount_sub() argument
44 atomic_sub(refs, compound_pincount_ptr(page)); in hpage_pincount_sub()
48 static void put_page_refs(struct page *page, int refs) in put_page_refs() argument
51 if (VM_WARN_ON_ONCE_PAGE(page_ref_count(page) < refs, page)) in put_page_refs()
59 if (refs > 1) in put_page_refs()
60 page_ref_sub(page, refs - 1); in put_page_refs()
68 static inline struct page *try_get_compound_head(struct page *page, int refs) in try_get_compound_head() argument
74 if (unlikely(!page_cache_add_speculative(head, refs))) in try_get_compound_head()
[all …]
/kernel/linux/linux-5.10/fs/cifs/
Ddfs_cache.c248 static inline void dump_refs(const struct dfs_info3_param *refs, int numrefs) in dump_refs() argument
254 const struct dfs_info3_param *ref = &refs[i]; in dump_refs()
375 static int copy_ref_data(const struct dfs_info3_param *refs, int numrefs, in copy_ref_data() argument
380 ce->ttl = refs[0].ttl; in copy_ref_data()
382 ce->srvtype = refs[0].server_type; in copy_ref_data()
383 ce->flags = refs[0].ref_flag; in copy_ref_data()
384 ce->path_consumed = refs[0].path_consumed; in copy_ref_data()
389 t = alloc_target(refs[i].node_name, refs[i].path_consumed); in copy_ref_data()
411 const struct dfs_info3_param *refs, in alloc_cache_entry() argument
429 rc = copy_ref_data(refs, numrefs, ce, NULL); in alloc_cache_entry()
[all …]
/kernel/linux/linux-5.10/lib/
Drefcount.c59 return atomic_try_cmpxchg_release(&r->refs, &val, 0); in refcount_dec_if_one()
76 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one()
91 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one()
/kernel/linux/linux-5.10/fs/btrfs/
Ddelayed-ref.h36 refcount_t refs; member
74 refcount_t refs; member
311 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref()
312 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref()
341 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head()
Ddelayed-inode.c47 refcount_set(&delayed_node->refs, 0); in btrfs_init_delayed_node()
76 refcount_inc(&node->refs); in btrfs_get_delayed_node()
85 refcount_inc(&node->refs); /* can be accessed */ in btrfs_get_delayed_node()
107 if (refcount_inc_not_zero(&node->refs)) { in btrfs_get_delayed_node()
108 refcount_inc(&node->refs); in btrfs_get_delayed_node()
142 refcount_set(&node->refs, 2); in btrfs_get_or_create_delayed_node()
183 refcount_inc(&node->refs); /* inserted into list */ in btrfs_queue_delayed_node()
197 refcount_dec(&node->refs); /* not in the list */ in btrfs_dequeue_delayed_node()
218 refcount_inc(&node->refs); in btrfs_first_delayed_node()
245 refcount_inc(&next->refs); in btrfs_next_delayed_node()
[all …]
Dextent-tree.c115 u64 offset, int metadata, u64 *refs, u64 *flags) in btrfs_lookup_extent_info() argument
204 refcount_inc(&head->refs); in btrfs_lookup_extent_info()
231 if (refs) in btrfs_lookup_extent_info()
232 *refs = num_refs; in btrfs_lookup_extent_info()
985 u64 refs; in setup_inline_extent_backref() local
999 refs = btrfs_extent_refs(leaf, ei); in setup_inline_extent_backref()
1000 refs += refs_to_add; in setup_inline_extent_backref()
1001 btrfs_set_extent_refs(leaf, ei, refs); in setup_inline_extent_backref()
1079 u64 refs; in update_inline_extent_backref() local
1082 refs = btrfs_extent_refs(leaf, ei); in update_inline_extent_backref()
[all …]
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/xen/
Dgntdev.h31 struct ioctl_gntdev_grant_ref refs[1]; member
84 __u32 refs[1]; member
97 __u32 refs[1]; member
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/xen/
Dgntdev.h27 struct ioctl_gntdev_grant_ref refs[1]; member
109 __u32 refs[1]; member
134 __u32 refs[1]; member
/kernel/linux/linux-5.10/include/uapi/xen/
Dgntdev.h64 struct ioctl_gntdev_grant_ref refs[1]; member
250 __u32 refs[1]; member
292 __u32 refs[1]; member
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/
Dport.c69 table->refs[i] = 0; in mlx4_init_mac_table()
83 table->refs[i] = 0; in mlx4_init_vlan_table()
118 if (table->refs[i] && in find_index()
157 if (!table->refs[i]) in mlx4_find_cached_mac()
232 dup_table->refs[index_at_port]) { in __mlx4_register_mac()
242 if (!table->refs[index_at_dup_port] || in __mlx4_register_mac()
251 if (!table->refs[i]) { in __mlx4_register_mac()
255 if (!dup_table->refs[i]) in __mlx4_register_mac()
265 ++table->refs[i]; in __mlx4_register_mac()
308 table->refs[free] = 1; in __mlx4_register_mac()
[all …]
/kernel/linux/linux-5.10/drivers/misc/sgi-xp/
Dxpc.h683 s32 refs = atomic_dec_return(&ch->references); in xpc_msgqueue_deref() local
685 DBUG_ON(refs < 0); in xpc_msgqueue_deref()
686 if (refs == 0) in xpc_msgqueue_deref()
700 s32 refs = atomic_dec_return(&part->references); in xpc_part_deref() local
702 DBUG_ON(refs < 0); in xpc_part_deref()
703 if (refs == 0 && part->setup_state == XPC_P_SS_WTEARDOWN) in xpc_part_deref()
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/
Dnouveau_vmm.c65 if (vma && --vma->refs <= 0) { in nouveau_vma_del()
86 vma->refs++; in nouveau_vma_new()
93 vma->refs = 1; in nouveau_vma_new()
/kernel/linux/linux-5.10/drivers/most/
Dcore.c34 int refs; member
852 if (c->pipe0.refs && c->pipe0.comp->tx_completion) in arm_mbo()
855 if (c->pipe1.refs && c->pipe1.comp->tx_completion) in arm_mbo()
963 if (c->pipe0.refs && c->pipe1.refs && in channel_has_mbo()
996 if (c->pipe0.refs && c->pipe1.refs && in most_get_mbo()
1068 if (c->pipe0.refs && c->pipe0.comp->rx_completion && in most_read_completion()
1072 if (c->pipe1.refs && c->pipe1.comp->rx_completion && in most_read_completion()
1101 if (c->pipe0.refs + c->pipe1.refs > 0) in most_start_channel()
1141 c->pipe0.refs++; in most_start_channel()
1143 c->pipe1.refs++; in most_start_channel()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dbpf_iter_netlink.c47 s->sk_wmem_alloc.refs.counter - 1, in dump_netlink()
48 nlk->cb_running, s->sk_refcnt.refs.counter); in dump_netlink()
Dbpf_iter_ipv6_route.c51 rt->fib6_ref.refs.counter, 0, flags, dev->name); in dump_ipv6_route()
54 rt->fib6_ref.refs.counter, 0, flags); in dump_ipv6_route()
Dbpf_iter_udp4.c63 inet->sk.sk_wmem_alloc.refs.counter - 1, in dump_udp4()
67 inet->sk.sk_refcnt.refs.counter, udp_sk, in dump_udp4()
Dbpf_iter_udp6.c71 inet->sk.sk_wmem_alloc.refs.counter - 1, in dump_udp6()
75 inet->sk.sk_refcnt.refs.counter, udp_sk, in dump_udp6()
/kernel/linux/linux-5.10/net/core/
Ddatagram.c630 int refs, n = 0; in __zerocopy_sg_from_iter() local
653 for (refs = 0; copied != 0; start = 0) { in __zerocopy_sg_from_iter()
672 refs++; in __zerocopy_sg_from_iter()
676 if (refs) { in __zerocopy_sg_from_iter()
677 page_ref_sub(last_head, refs); in __zerocopy_sg_from_iter()
678 refs = 0; in __zerocopy_sg_from_iter()
682 if (refs) in __zerocopy_sg_from_iter()
683 page_ref_sub(last_head, refs); in __zerocopy_sg_from_iter()
/kernel/linux/linux-5.10/fs/btrfs/tests/
Dqgroup-tests.c74 u64 refs; in add_tree_ref() local
99 refs = btrfs_extent_refs(path->nodes[0], item); in add_tree_ref()
100 btrfs_set_extent_refs(path->nodes[0], item, refs + 1); in add_tree_ref()
158 u64 refs; in remove_extent_ref() local
183 refs = btrfs_extent_refs(path->nodes[0], item); in remove_extent_ref()
184 btrfs_set_extent_refs(path->nodes[0], item, refs - 1); in remove_extent_ref()

123456