/linux-6.3-rc2/tools/bpf/bpftool/ |
A D | pids.c | 43 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() 188 free(refs->refs); in delete_obj_refs_table() 216 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | freelist.h | 19 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 D | refcount.h | 112 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-6.3-rc2/drivers/media/v4l2-core/ |
A D | v4l2-h264.c | 60 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-6.3-rc2/tools/include/linux/ |
A D | refcount.h | 53 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-6.3-rc2/drivers/xen/ |
A D | gntdev-dmabuf.c | 43 grant_ref_t *refs; member 448 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs() 511 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-6.3-rc2/io_uring/ |
A D | refs.h | 12 ((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_set(&req->refs, nr); in __io_req_set_refcount()
|
A D | rsrc.h | 34 atomic_t refs; member 40 struct percpu_ref refs; member 112 percpu_ref_put_many(&node->refs, nr); in io_rsrc_put_node() 154 percpu_ref_get(&req->rsrc_node->refs); in io_req_set_rsrc_node()
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/nvkm/core/ |
A D | event.c | 34 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-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | map_kptr.c | 205 if (p_st->cnt.refs.counter != 2) { in test_map_kptr_ref() 221 if (p_st->cnt.refs.counter != 2) in test_map_kptr_ref() 227 if (p_st->cnt.refs.counter != 3) { in test_map_kptr_ref() 232 if (p_st->cnt.refs.counter != 2) in test_map_kptr_ref() 239 if (p_st->cnt.refs.counter != 1) in test_map_kptr_ref() 250 if (p_st->cnt.refs.counter != 2) in test_map_kptr_ref() 272 if (!p_st || p_st->cnt.refs.counter != 2) in test_map_kptr_ref2() 278 if (p_st->cnt.refs.counter != 2) { in test_map_kptr_ref2() 288 if (p_st->cnt.refs.counter != 2) in test_map_kptr_ref2()
|
/linux-6.3-rc2/fs/cifs/ |
A D | dfs_cache.c | 478 ce->srvtype = refs[0].server_type; in copy_ref_data() 479 ce->hdr_flags = refs[0].flags; in copy_ref_data() 480 ce->ref_flags = refs[0].ref_flag; in copy_ref_data() 486 t = alloc_target(refs[i].node_name, refs[i].path_consumed); in copy_ref_data() 517 ce->path = refs[0].path_name; in alloc_cache_entry() 518 refs[0].path_name = NULL; in alloc_cache_entry() 577 rc = cache_entry_hash(refs[0].path_name, strlen(refs[0].path_name), &hash); in add_cache_entry_locked() 748 *refs = NULL; in get_dfs_referral() 784 struct dfs_info3_param *refs = NULL; in cache_refresh_path() local 821 dump_refs(refs, numrefs); in cache_refresh_path() [all …]
|
/linux-6.3-rc2/mm/ |
A D | gup.c | 91 folio_put_refs(folio, refs); in try_get_folio() 187 refs *= GUP_PIN_COUNTING_BIAS; in gup_put_folio() 191 folio_put_refs(folio, refs); in gup_put_folio() 2591 int refs; in gup_hugepte() local 2622 *nr += refs; in gup_hugepte() 2659 int refs; in gup_huge_pmd() local 2688 *nr += refs; in gup_huge_pmd() 2699 int refs; in gup_huge_pud() local 2728 *nr += refs; in gup_huge_pud() 2737 int refs; in gup_huge_pgd() local [all …]
|
A D | workingset.c | 229 int refs = folio_lru_refs(folio); in lru_gen_eviction() local 230 int tier = lru_tier_from_refs(refs); in lru_gen_eviction() 239 token = (min_seq << LRU_REFS_WIDTH) | max(refs - 1, 0); in lru_gen_eviction() 244 return pack_shadow(mem_cgroup_id(memcg), pgdat, token, refs); in lru_gen_eviction() 249 int hist, tier, refs; in lru_gen_refault() local 281 refs = (token & (BIT(LRU_REFS_WIDTH) - 1)) + workingset; in lru_gen_refault() 282 tier = lru_tier_from_refs(refs); in lru_gen_refault() 294 if (lru_gen_in_fault() || refs == BIT(LRU_REFS_WIDTH)) { in lru_gen_refault()
|
/linux-6.3-rc2/drivers/iommu/arm/arm-smmu-v3/ |
A D | arm-smmu-v3-sva.c | 20 refcount_t refs; member 32 refcount_t refs; member 61 refcount_inc(&cd->refs); in arm_smmu_share_asid() 115 refcount_set(&cd->refs, 1); in arm_smmu_alloc_shared_cd() 256 refcount_inc(&smmu_mn->refs); in arm_smmu_mmu_notifier_get() 271 refcount_set(&smmu_mn->refs, 1); in arm_smmu_mmu_notifier_get() 303 if (!refcount_dec_and_test(&smmu_mn->refs)) in arm_smmu_mmu_notifier_put() 338 refcount_inc(&bond->refs); in __arm_smmu_sva_bind() 349 refcount_set(&bond->refs, 1); in __arm_smmu_sva_bind() 528 if (!WARN_ON(!bond) && refcount_dec_and_test(&bond->refs)) { in arm_smmu_sva_remove_dev_pasid()
|
/linux-6.3-rc2/kernel/trace/ |
A D | trace_events_user.c | 1403 refs = rcu_dereference_sched(info->refs); in user_events_write_core() 1410 if (likely(refs && idx < refs->count)) in user_events_write_core() 1511 refs = rcu_dereference_protected(info->refs, in user_events_ref_add() 1514 if (refs) { in user_events_ref_add() 1515 count = refs->count; in user_events_ref_add() 1540 if (refs) in user_events_ref_add() 1541 kfree_rcu(refs, rcu); in user_events_ref_add() 1693 refs = info->refs; in user_events_release() 1695 if (!refs) in user_events_release() 1704 user = refs->events[i]; in user_events_release() [all …]
|
/linux-6.3-rc2/drivers/thermal/ |
A D | k3_j72xx_bandgap.c | 78 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-6.3-rc2/fs/btrfs/ |
A D | delayed-inode.c | 69 refcount_inc(&node->refs); in btrfs_get_delayed_node() 101 refcount_inc(&node->refs); in btrfs_get_delayed_node() 135 refcount_set(&node->refs, 2); in btrfs_get_or_create_delayed_node() 211 refcount_inc(&node->refs); in btrfs_first_delayed_node() 238 refcount_inc(&next->refs); in btrfs_next_delayed_node() 297 refcount_inc(&node->refs); in btrfs_first_prepared_delayed_node() 325 refcount_set(&item->refs, 1); in btrfs_alloc_delayed_item() 1655 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items() 1662 refcount_inc(&item->refs); in btrfs_readdir_get_delayed_items() 2120 refcount_dec(&node->refs); in btrfs_log_get_delayed_items() [all …]
|
A D | delayed-ref.h | 36 refcount_t refs; member 73 refcount_t refs; member 317 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref() 318 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref() 347 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head()
|
/linux-6.3-rc2/lib/ |
A D | refcount.c | 59 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-6.3-rc2/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
A D | cgrp.c | 39 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-6.3-rc2/include/uapi/xen/ |
A D | gntdev.h | 70 struct ioctl_gntdev_grant_ref refs[1]; member 256 __u32 refs[1]; member 298 __u32 refs[1]; member
|
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx4/ |
A D | port.c | 69 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-6.3-rc2/drivers/misc/sgi-xp/ |
A D | xpc.h | 684 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-6.3-rc2/drivers/gpu/drm/nouveau/ |
A D | nouveau_vmm.c | 65 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-6.3-rc2/drivers/most/ |
A D | core.c | 34 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 …]
|