Home
last modified time | relevance | path

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

123456

/linux/tools/bpf/bpftool/
A Dpids.c42 if (refs->refs[i].pid == e->pid) in add_ref()
46 tmp = realloc(refs->refs, (refs->ref_cnt + 1) * sizeof(*ref)); in add_ref()
52 refs->refs = tmp; in add_ref()
53 ref = &refs->refs[refs->ref_cnt]; in add_ref()
62 refs = calloc(1, sizeof(*refs)); in add_ref()
69 refs->refs = malloc(sizeof(*refs->refs)); in add_ref()
70 if (!refs->refs) { in add_ref()
76 ref = &refs->refs[0]; in add_ref()
185 free(refs->refs); in delete_obj_refs_table()
210 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
[all …]
/linux/drivers/media/v4l2-core/
A 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()
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()
115 return builder->refs[idxa].pic_num < builder->refs[idxb].pic_num ? in v4l2_h264_p_ref_list_cmp()
133 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b0_ref_list_cmp()
135 if (!builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
142 if (builder->refs[idxa].longterm) in v4l2_h264_b0_ref_list_cmp()
178 if (builder->refs[idxa].longterm != builder->refs[idxb].longterm) { in v4l2_h264_b1_ref_list_cmp()
[all …]
/linux/include/linux/
A Dfreelist.h19 atomic_t refs; member
50 atomic_set_release(&node->refs, 1); in __freelist_add()
70 if (!atomic_fetch_add_release(REFS_ON_FREELIST, &node->refs)) { in freelist_add()
82 unsigned int refs; in freelist_try_get() local
86 refs = atomic_read(&head->refs); in freelist_try_get()
87 if ((refs & REFS_MASK) == 0 || in freelist_try_get()
88 !atomic_try_cmpxchg_acquire(&head->refs, &refs, refs+1)) { in freelist_try_get()
106 WARN_ON_ONCE(atomic_read(&head->refs) & REFS_ON_FREELIST); in freelist_try_get()
112 atomic_fetch_add(-2, &head->refs); in freelist_try_get()
121 refs = atomic_fetch_add(-1, &prev->refs); in freelist_try_get()
[all …]
A 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()
/linux/drivers/gpu/drm/nouveau/nvkm/core/
A 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()
/linux/tools/include/linux/
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/drivers/xen/
A Dgntdev-dmabuf.c52 grant_ref_t *refs; member
457 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs()
520 refs[i] = cur_ref; in dmabuf_imp_grant_foreign_access()
558 if (!gntdev_dmabuf->u.imp.refs) in dmabuf_imp_alloc_storage()
744 u32 *refs; in gntdev_ioctl_dmabuf_exp_from_refs() local
759 refs = kcalloc(op.count, sizeof(*refs), GFP_KERNEL); in gntdev_ioctl_dmabuf_exp_from_refs()
760 if (!refs) in gntdev_ioctl_dmabuf_exp_from_refs()
763 if (copy_from_user(refs, u->refs, sizeof(*refs) * op.count) != 0) { in gntdev_ioctl_dmabuf_exp_from_refs()
769 op.domid, refs, &op.fd); in gntdev_ioctl_dmabuf_exp_from_refs()
777 kfree(refs); in gntdev_ioctl_dmabuf_exp_from_refs()
[all …]
/linux/fs/cifs/
A Ddfs_cache.c498 ce->srvtype = refs[0].server_type; in copy_ref_data()
499 ce->hdr_flags = refs[0].flags; in copy_ref_data()
500 ce->ref_flags = refs[0].ref_flag; in copy_ref_data()
506 t = alloc_target(refs[i].node_name, refs[i].path_consumed); in copy_ref_data()
536 ce->path = refs[0].path_name; in alloc_cache_entry()
537 refs[0].path_name = NULL; in alloc_cache_entry()
595 rc = cache_entry_hash(refs[0].path_name, strlen(refs[0].path_name), &hash); in add_cache_entry_locked()
765 *refs = NULL; in get_dfs_referral()
824 dump_refs(refs, numrefs); in cache_refresh_path()
1352 refs[i].node_name)) in mark_for_reconnect_if_needed()
[all …]
/linux/mm/
A Dgup.c60 if (refs > 1) in put_page_refs()
166 refs); in try_grab_compound_head()
179 refs); in put_compound_head()
2470 int refs; in gup_hugepte() local
2497 *nr += refs; in gup_hugepte()
2533 int refs; in gup_huge_pmd() local
2557 *nr += refs; in gup_huge_pmd()
2567 int refs; in gup_huge_pud() local
2591 *nr += refs; in gup_huge_pud()
2600 int refs; in gup_huge_pgd() local
[all …]
/linux/drivers/iommu/arm/arm-smmu-v3/
A Darm-smmu-v3-sva.c19 refcount_t refs; member
31 refcount_t refs; member
60 refcount_inc(&cd->refs); in arm_smmu_share_asid()
109 refcount_set(&cd->refs, 1); in arm_smmu_alloc_shared_cd()
240 refcount_inc(&smmu_mn->refs); in arm_smmu_mmu_notifier_get()
255 refcount_set(&smmu_mn->refs, 1); in arm_smmu_mmu_notifier_get()
287 if (!refcount_dec_and_test(&smmu_mn->refs)) in arm_smmu_mmu_notifier_put()
322 refcount_inc(&bond->refs); in __arm_smmu_sva_bind()
338 refcount_set(&bond->refs, 1); in __arm_smmu_sva_bind()
377 if (refcount_dec_and_test(&bond->refs)) { in arm_smmu_sva_unbind()
/linux/lib/
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/fs/btrfs/
A Ddelayed-ref.h36 refcount_t refs; member
74 refcount_t refs; member
318 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref()
319 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref()
348 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head()
A Ddelayed-inode.c46 refcount_set(&delayed_node->refs, 0); in btrfs_init_delayed_node()
75 refcount_inc(&node->refs); in btrfs_get_delayed_node()
107 refcount_inc(&node->refs); in btrfs_get_delayed_node()
141 refcount_set(&node->refs, 2); in btrfs_get_or_create_delayed_node()
217 refcount_inc(&node->refs); in btrfs_first_delayed_node()
244 refcount_inc(&next->refs); in btrfs_next_delayed_node()
303 refcount_inc(&node->refs); in btrfs_first_prepared_delayed_node()
325 refcount_set(&item->refs, 1); in btrfs_alloc_delayed_item()
1525 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items()
1532 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items()
[all …]
A Dextent-tree.c233 if (refs) in btrfs_lookup_extent_info()
234 *refs = num_refs; in btrfs_lookup_extent_info()
989 u64 refs; in setup_inline_extent_backref() local
1083 u64 refs; in update_inline_extent_backref() local
1107 refs = 1; in update_inline_extent_backref()
1114 if (refs > 0) { in update_inline_extent_backref()
1460 u64 refs; in __btrfs_inc_extent_ref() local
2933 u64 refs; in __btrfs_free_extent() local
3106 if (refs > 0) { in __btrfs_free_extent()
4983 u64 refs; in reada_walk_down() local
[all …]
/linux/drivers/net/ethernet/mellanox/mlx4/
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/include/uapi/xen/
A Dgntdev.h64 struct ioctl_gntdev_grant_ref refs[1]; member
250 __u32 refs[1]; member
292 __u32 refs[1]; member
/linux/drivers/misc/sgi-xp/
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/drivers/most/
A 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()
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()
1174 if (c->pipe0.refs + c->pipe1.refs >= 2) in most_stop_channel()
1207 c->pipe0.refs--; in most_stop_channel()
[all …]
/linux/net/core/
A Ddatagram.c630 int refs, n = 0; in __zerocopy_sg_from_iter() local
654 for (refs = 0; copied != 0; start = 0) { in __zerocopy_sg_from_iter()
673 refs++; in __zerocopy_sg_from_iter()
677 if (refs) { in __zerocopy_sg_from_iter()
678 page_ref_sub(last_head, refs); in __zerocopy_sg_from_iter()
679 refs = 0; in __zerocopy_sg_from_iter()
683 if (refs) in __zerocopy_sg_from_iter()
684 page_ref_sub(last_head, refs); in __zerocopy_sg_from_iter()
/linux/drivers/gpu/drm/nouveau/
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()
/linux/fs/btrfs/tests/
A Dqgroup-tests.c73 u64 refs; in add_tree_ref() local
97 refs = btrfs_extent_refs(path->nodes[0], item); in add_tree_ref()
98 btrfs_set_extent_refs(path->nodes[0], item, refs + 1); in add_tree_ref()
155 u64 refs; in remove_extent_ref() local
179 refs = btrfs_extent_refs(path->nodes[0], item); in remove_extent_ref()
180 btrfs_set_extent_refs(path->nodes[0], item, refs - 1); in remove_extent_ref()
/linux/net/netfilter/
A Dnf_conntrack_ecache.c43 struct nf_conn *refs[ECACHE_STACK_ALLOC]; in ecache_work_evict_list() local
80 refs[evicted] = ct; in ecache_work_evict_list()
82 if (++evicted >= ARRAY_SIZE(refs)) { in ecache_work_evict_list()
92 nf_ct_put(refs[--evicted]); in ecache_work_evict_list()
/linux/tools/testing/selftests/bpf/progs/
A Dbpf_iter_ipv6_route.c50 rt->fib6_ref.refs.counter, 0, flags, dev->name); in dump_ipv6_route()
53 rt->fib6_ref.refs.counter, 0, flags); in dump_ipv6_route()
A Dbpf_iter_netlink.c46 s->sk_wmem_alloc.refs.counter - 1, in dump_netlink()
47 nlk->cb_running, s->sk_refcnt.refs.counter); in dump_netlink()
/linux/tools/perf/arch/x86/util/
A Dintel-bts.c283 struct intel_bts_snapshot_ref *refs; in intel_bts_alloc_snapshot_refs() local
291 refs = calloc(new_cnt, sz); in intel_bts_alloc_snapshot_refs()
292 if (!refs) in intel_bts_alloc_snapshot_refs()
295 memcpy(refs, btsr->snapshot_refs, cnt * sz); in intel_bts_alloc_snapshot_refs()
297 btsr->snapshot_refs = refs; in intel_bts_alloc_snapshot_refs()

Completed in 83 milliseconds

123456