Home
last modified time | relevance | path

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

12345678

/linux/tools/bpf/bpftool/
H A Dpids.c43 if (refs->refs[i].pid == e->pid) in add_ref()
47 tmp = realloc(refs->refs, (refs->ref_cnt + 1) * sizeof(*ref)); in add_ref()
53 refs->refs = tmp; in add_ref()
54 ref = &refs->refs[refs->ref_cnt]; in add_ref()
63 refs = calloc(1, sizeof(*refs)); in add_ref()
70 refs->refs = malloc(sizeof(*refs->refs)); in add_ref()
71 if (!refs->refs) { in add_ref()
77 ref = &refs->refs[0]; in add_ref()
193 free(refs->refs); in delete_obj_refs_table()
221 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
[all …]
/linux/drivers/media/v4l2-core/
H A Dv4l2-h264.c60 b->refs[i].longterm = true; in v4l2_h264_init_reflist_builder()
138 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_p_ref_list_cmp()
140 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
154 if (!builder->refs[idxa].longterm) in v4l2_h264_p_ref_list_cmp()
159 return builder->refs[idxa].frame_num < builder->refs[idxb].frame_num ? in v4l2_h264_p_ref_list_cmp()
177 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b0_ref_list_cmp()
179 if (!builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
186 if (builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
222 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b1_ref_list_cmp()
224 if (!builder->refs[idxa].longterm) in v4l2_h264_b1_ref_list_cmp()
[all …]
/linux/tools/include/linux/
H A 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()
/linux/io_uring/
H A Drefs.h12 ((unsigned int) atomic_read(&(req->refs)) + 127u <= 127u)
17 return atomic_inc_not_zero(&req->refs); in req_ref_inc_not_zero()
26 return atomic_dec_and_test(&req->refs); in req_ref_put_and_test()
33 atomic_inc(&req->refs); in req_ref_get()
40 atomic_dec(&req->refs); in req_ref_put()
47 atomic_set(&req->refs, nr); in __io_req_set_refcount()
H A Dwaitid.c29 atomic_t refs; member
124 WARN_ON_ONCE(!(atomic_read(&iw->refs) & IO_WAITID_REF_MASK)); in io_waitid_complete()
146 atomic_or(IO_WAITID_CANCEL_FLAG, &iw->refs); in __io_waitid_cancel()
149 if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK) in __io_waitid_cancel()
212 if (!atomic_sub_return(1, &iw->refs)) in io_waitid_drop_issue_ref()
246 if (!(atomic_read(&iw->refs) & IO_WAITID_CANCEL_FLAG)) { in io_waitid_cb()
276 if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK) in io_waitid_wait()
322 atomic_set(&iw->refs, 1); in io_waitid()
/linux/drivers/xen/
H A Dgntdev-dmabuf.c44 grant_ref_t *refs; member
449 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs()
512 refs[i] = cur_ref; in dmabuf_imp_grant_foreign_access()
549 if (!gntdev_dmabuf->u.imp.refs) in dmabuf_imp_alloc_storage()
735 u32 *refs; in gntdev_ioctl_dmabuf_exp_from_refs() local
750 refs = kcalloc(op.count, sizeof(*refs), GFP_KERNEL); in gntdev_ioctl_dmabuf_exp_from_refs()
751 if (!refs) in gntdev_ioctl_dmabuf_exp_from_refs()
754 if (copy_from_user(refs, u->refs, sizeof(*refs) * op.count) != 0) { in gntdev_ioctl_dmabuf_exp_from_refs()
760 op.domid, refs, &op.fd); in gntdev_ioctl_dmabuf_exp_from_refs()
768 kfree(refs); in gntdev_ioctl_dmabuf_exp_from_refs()
[all …]
/linux/include/linux/
H A Drefcount.h104 #define REFCOUNT_INIT(n) { .refs = ATOMIC_INIT(n), }
125 atomic_set(&r->refs, n); in refcount_set()
136 return atomic_read(&r->refs); in refcount_read()
147 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &old, old + i)); in __refcount_add_not_zero()
184 int old = atomic_fetch_add_relaxed(i, &r->refs); in __refcount_add()
264 int old = atomic_fetch_sub_release(i, &r->refs); in __refcount_sub_and_test()
330 int old = atomic_fetch_sub_release(1, &r->refs); in __refcount_dec()
/linux/tools/testing/selftests/net/
H A Dnl_netdev.py43 refs = sum([pp["inflight"] for pp in pp_list])
44 ksft_eq(refs, 0)
55 refs = sum([pp["inflight"] for pp in pp_list if pp.get("ifindex") == nsim.ifindex])
56 ksft_ge(refs, 1)
62 refs = sum([pp["inflight"] for pp in pp_list])
63 ksft_eq(refs, 1)
/linux/drivers/gpu/drm/nouveau/nvkm/core/
H A Devent.c34 if (--event->refs[index * event->types_nr + type] == 0) { in nvkm_event_put()
51 if (++event->refs[index * event->types_nr + type] == 1) { in nvkm_event_get()
175 if (!event->refs || WARN_ON(id >= event->index_nr)) in nvkm_event_ntfy()
194 if (event->refs) { in nvkm_event_fini()
195 kfree(event->refs); in nvkm_event_fini()
196 event->refs = NULL; in nvkm_event_fini()
204 event->refs = kzalloc(array3_size(index_nr, types_nr, sizeof(*event->refs)), GFP_KERNEL); in __nvkm_event_init()
205 if (!event->refs) in __nvkm_event_init()
/linux/fs/smb/client/
H A Ddfs_cache.c390 ce->srvtype = refs[0].server_type; in copy_ref_data()
391 ce->hdr_flags = refs[0].flags; in copy_ref_data()
392 ce->ref_flags = refs[0].ref_flag; in copy_ref_data()
398 t = alloc_target(refs[i].node_name, refs[i].path_consumed); in copy_ref_data()
429 ce->path = refs[0].path_name; in alloc_cache_entry()
430 refs[0].path_name = NULL; in alloc_cache_entry()
490 rc = cache_entry_hash(refs[0].path_name, strlen(refs[0].path_name), &hash); in add_cache_entry_locked()
652 *refs = NULL; in get_dfs_referral()
688 struct dfs_info3_param *refs = NULL; in cache_refresh_path() local
725 dump_refs(refs, numrefs); in cache_refresh_path()
[all …]
H A Ddfs.h28 struct dfs_ref refs[MAX_NESTED_LINKS]; member
31 #define ref_walk_start(w) ((w)->refs)
32 #define ref_walk_end(w) (&(w)->refs[ARRAY_SIZE((w)->refs) - 1])
/linux/mm/
H A Dgup.c93 folio_put_refs(folio, refs); in try_get_folio()
160 folio_put_refs(folio, refs); in try_grab_folio()
202 folio_put_refs(folio, refs); in gup_put_folio()
2809 int refs; in gup_hugepte() local
2845 *nr += refs; in gup_hugepte()
2882 int refs; in gup_huge_pmd() local
2915 *nr += refs; in gup_huge_pmd()
2926 int refs; in gup_huge_pud() local
2960 *nr += refs; in gup_huge_pud()
2969 int refs; in gup_huge_pgd() local
[all …]
H A Dworkingset.c241 int refs = folio_lru_refs(folio); in lru_gen_eviction() local
242 int tier = lru_tier_from_refs(refs); in lru_gen_eviction()
251 token = (min_seq << LRU_REFS_WIDTH) | max(refs - 1, 0); in lru_gen_eviction()
256 return pack_shadow(mem_cgroup_id(memcg), pgdat, token, refs); in lru_gen_eviction()
283 int hist, tier, refs; in lru_gen_refault() local
306 refs = (token & (BIT(LRU_REFS_WIDTH) - 1)) + workingset; in lru_gen_refault()
307 tier = lru_tier_from_refs(refs); in lru_gen_refault()
319 if (lru_gen_in_fault() || refs >= BIT(LRU_REFS_WIDTH) - 1) { in lru_gen_refault()
/linux/drivers/thermal/
H A Dk3_j72xx_bandgap.c78 int refs[4]; member
90 idx1 = err_vals->refs[seg]; in create_table_segments()
92 idx2 = err_vals->refs[seg + 1]; in create_table_segments()
95 ref1 = err_vals->refs[seg]; in create_table_segments()
96 ref2 = err_vals->refs[seg + 1]; in create_table_segments()
461 err_vals.refs[0] = MINUS40CREF; in k3_j72xx_bandgap_probe()
462 err_vals.refs[1] = PLUS30CREF; in k3_j72xx_bandgap_probe()
463 err_vals.refs[2] = PLUS125CREF; in k3_j72xx_bandgap_probe()
464 err_vals.refs[3] = PLUS150CREF; in k3_j72xx_bandgap_probe()
/linux/fs/btrfs/
H A Ddelayed-inode.c76 refcount_inc(&node->refs); in btrfs_get_delayed_node()
108 refcount_inc(&node->refs); in btrfs_get_delayed_node()
143 refcount_set(&node->refs, 2); in btrfs_get_or_create_delayed_node()
223 refcount_inc(&node->refs); in btrfs_first_delayed_node()
250 refcount_inc(&next->refs); in btrfs_next_delayed_node()
308 refcount_inc(&node->refs); in btrfs_first_prepared_delayed_node()
336 refcount_set(&item->refs, 1); in btrfs_alloc_delayed_item()
1709 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items()
1716 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items()
2168 refcount_dec(&node->refs); in btrfs_log_get_delayed_items()
[all …]
/linux/lib/
H A 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()
/linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dcgrp.c39 if (refcount_dec_and_test(&ectx->refs)) { in nvkm_cgrp_ectx_put()
65 refcount_inc(&ectx->refs); in nvkm_cgrp_ectx_get()
76 refcount_set(&ectx->refs, 1); in nvkm_cgrp_ectx_get()
100 if (refcount_dec_and_test(&vctx->refs)) { in nvkm_cgrp_vctx_put()
130 refcount_inc(&vctx->refs); in nvkm_cgrp_vctx_get()
151 refcount_set(&vctx->refs, 1); in nvkm_cgrp_vctx_get()
/linux/include/uapi/xen/
H A Dgntdev.h70 struct ioctl_gntdev_grant_ref refs[1]; member
256 __u32 refs[1]; member
298 __u32 refs[1]; member
/linux/tools/net/ynl/samples/
H A Dpage-pool.c18 size_t refs, bytes; member
52 s->live[l].refs += pp->inflight; in count()
127 s->live[1].refs, s->live[1].bytes, in main()
128 s->live[0].refs, s->live[0].bytes); in main()
/linux/sound/pci/hda/
H A Dcirrus_scodec_test.c193 struct software_node_ref_args *refs; in cirrus_scodec_test_spkid_parse() local
198 refs = kunit_kcalloc(test, num_spk_id_refs, sizeof(*refs), GFP_KERNEL); in cirrus_scodec_test_spkid_parse()
199 KUNIT_ASSERT_NOT_NULL(test, refs); in cirrus_scodec_test_spkid_parse()
202 cirrus_scodec_test_set_gpio_ref_arg(&refs[i++], v++); in cirrus_scodec_test_spkid_parse()
217 ret = cirrus_scodec_test_set_spkid_swnode(test, dev, refs, num_spk_id_refs); in cirrus_scodec_test_spkid_parse()
/linux/tools/testing/selftests/bpf/progs/
H A Dmap_kptr.c308 if (p_st->cnt.refs.counter != ref) { in test_map_kptr_ref_pre()
318 if (p_st->cnt.refs.counter != ref) in test_map_kptr_ref_pre()
326 if (p_st->cnt.refs.counter != ref) in test_map_kptr_ref_pre()
338 if (p_st->cnt.refs.counter != ref) in test_map_kptr_ref_pre()
355 if (!p_st || p_st->cnt.refs.counter != ref) in test_map_kptr_ref_post()
361 if (p_st->cnt.refs.counter != ref) { in test_map_kptr_ref_post()
371 if (p_st->cnt.refs.counter != ref) in test_map_kptr_ref_post()
471 if (p->cnt.refs.counter != ref) { in test_map_kptr_ref3()
/linux/drivers/net/ethernet/mellanox/mlx4/
H A 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()
265 ++table->refs[i]; in __mlx4_register_mac()
308 table->refs[free] = 1; in __mlx4_register_mac()
666 ++table->refs[i]; in __mlx4_register_vlan()
920 if (!t1->refs[i]) { in mlx4_unbond_mac_table()
925 if (!t2->refs[i]) { in mlx4_unbond_mac_table()
1027 if (!t1->refs[i]) { in mlx4_unbond_vlan_table()
[all …]
/linux/drivers/misc/sgi-xp/
H A Dxpc.h684 s32 refs = atomic_dec_return(&ch->references); in xpc_msgqueue_deref() local
686 DBUG_ON(refs < 0); in xpc_msgqueue_deref()
687 if (refs == 0) in xpc_msgqueue_deref()
701 s32 refs = atomic_dec_return(&part->references); in xpc_part_deref() local
703 DBUG_ON(refs < 0); in xpc_part_deref()
704 if (refs == 0 && part->setup_state == XPC_P_SS_WTEARDOWN) in xpc_part_deref()
/linux/kernel/trace/
H A Dtrace_events_user.c165 struct user_event_refs *refs; member
2185 refs = rcu_dereference_sched(info->refs); in user_events_write_core()
2192 if (likely(refs && idx < refs->count)) in user_events_write_core()
2292 refs = rcu_dereference_protected(info->refs, in user_events_ref_add()
2295 if (refs) { in user_events_ref_add()
2296 count = refs->count; in user_events_ref_add()
2319 if (refs) in user_events_ref_add()
2320 kfree_rcu(refs, rcu); in user_events_ref_add()
2655 refs = info->refs; in user_events_release()
2657 if (!refs) in user_events_release()
[all …]
/linux/drivers/gpu/drm/nouveau/
H A 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()

12345678