/Linux-v4.19/include/linux/ |
D | refcount.h | 20 atomic_t refs; member 23 #define REFCOUNT_INIT(n) { .refs = ATOMIC_INIT(n), } 32 atomic_set(&r->refs, n); in refcount_set() 43 return atomic_read(&r->refs); in refcount_read() 76 return atomic_add_unless(&r->refs, i, 0); in refcount_add_not_zero() 81 atomic_add(i, &r->refs); in refcount_add() 86 return atomic_add_unless(&r->refs, 1, 0); in refcount_inc_not_zero() 91 atomic_inc(&r->refs); in refcount_inc() 96 return atomic_sub_and_test(i, &r->refs); in refcount_sub_and_test() 101 return atomic_dec_and_test(&r->refs); in refcount_dec_and_test() [all …]
|
/Linux-v4.19/tools/include/linux/ |
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-v4.19/drivers/gpu/drm/nouveau/nvkm/core/ |
D | event.c | 31 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-v4.19/arch/x86/include/asm/ |
D | refcount.h | 46 : [counter] "+m" (r->refs.counter) in refcount_add() 55 : [counter] "+m" (r->refs.counter) in refcount_inc() 63 : [counter] "+m" (r->refs.counter) in refcount_dec() 71 r->refs.counter, "er", i, "%0", e, "cx"); in refcount_sub_and_test() 77 r->refs.counter, "%0", e, "cx"); in refcount_dec_and_test() 85 c = atomic_read(&(r->refs)); in refcount_add_not_zero() 95 : : [counter] "m" (r->refs.counter) in refcount_add_not_zero() 100 } while (!atomic_try_cmpxchg(&(r->refs), &c, result)); in refcount_add_not_zero()
|
/Linux-v4.19/lib/ |
D | refcount.c | 63 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero_checked() 76 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked() 120 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked() 131 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked() 179 unsigned int new, val = atomic_read(&r->refs); in refcount_sub_and_test_checked() 191 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_sub_and_test_checked() 252 return atomic_try_cmpxchg_release(&r->refs, &val, 0); in refcount_dec_if_one() 269 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one() 284 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one()
|
/Linux-v4.19/arch/sparc/mm/ |
D | gup.c | 74 int refs; in gup_huge_pmd() local 82 refs = 0; in gup_huge_pmd() 90 refs++; in gup_huge_pmd() 93 if (!page_cache_add_speculative(head, refs)) { in gup_huge_pmd() 94 *nr -= refs; in gup_huge_pmd() 99 *nr -= refs; in gup_huge_pmd() 100 while (refs--) in gup_huge_pmd() 113 int refs; in gup_huge_pud() local 121 refs = 0; in gup_huge_pud() 129 refs++; in gup_huge_pud() [all …]
|
/Linux-v4.19/arch/s390/mm/ |
D | gup.c | 62 int refs; in gup_huge_pmd() local 69 refs = 0; in gup_huge_pmd() 77 refs++; in gup_huge_pmd() 80 if (!page_cache_add_speculative(head, refs)) { in gup_huge_pmd() 81 *nr -= refs; in gup_huge_pmd() 86 *nr -= refs; in gup_huge_pmd() 87 while (refs--) in gup_huge_pmd() 136 int refs; in gup_huge_pud() local 143 refs = 0; in gup_huge_pud() 151 refs++; in gup_huge_pud() [all …]
|
/Linux-v4.19/drivers/xen/ |
D | gntdev-dmabuf.c | 49 grant_ref_t *refs; member 463 int count, u32 domid, u32 *refs, u32 *fd) in dmabuf_exp_from_refs() argument 475 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs() 514 dmabuf_imp_grant_foreign_access(struct page **pages, u32 *refs, in dmabuf_imp_grant_foreign_access() argument 538 refs[i] = cur_ref; in dmabuf_imp_grant_foreign_access() 548 static void dmabuf_imp_end_foreign_access(u32 *refs, int count) in dmabuf_imp_end_foreign_access() argument 553 if (refs[i] != GRANT_INVALID_REF) in dmabuf_imp_end_foreign_access() 554 gnttab_end_foreign_access(refs[i], 0, 0UL); in dmabuf_imp_end_foreign_access() 560 kfree(gntdev_dmabuf->u.imp.refs); in dmabuf_imp_free_storage() 573 gntdev_dmabuf->u.imp.refs = kcalloc(count, in dmabuf_imp_alloc_storage() [all …]
|
/Linux-v4.19/arch/mips/mm/ |
D | gup.c | 77 int refs; in gup_huge_pmd() local 85 refs = 0; in gup_huge_pmd() 93 refs++; in gup_huge_pmd() 96 get_head_page_multiple(head, refs); in gup_huge_pmd() 130 int refs; in gup_huge_pud() local 138 refs = 0; in gup_huge_pud() 146 refs++; in gup_huge_pud() 149 get_head_page_multiple(head, refs); in gup_huge_pud()
|
/Linux-v4.19/fs/btrfs/ |
D | delayed-ref.h | 36 refcount_t refs; member 74 refcount_t refs; member 213 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref() 214 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref() 233 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head()
|
D | delayed-inode.c | 44 refcount_set(&delayed_node->refs, 0); in btrfs_init_delayed_node() 73 refcount_inc(&node->refs); in btrfs_get_delayed_node() 82 refcount_inc(&node->refs); /* can be accessed */ in btrfs_get_delayed_node() 104 if (refcount_inc_not_zero(&node->refs)) { in btrfs_get_delayed_node() 105 refcount_inc(&node->refs); in btrfs_get_delayed_node() 139 refcount_set(&node->refs, 2); in btrfs_get_or_create_delayed_node() 180 refcount_inc(&node->refs); /* inserted into list */ in btrfs_queue_delayed_node() 194 refcount_dec(&node->refs); /* not in the list */ in btrfs_dequeue_delayed_node() 215 refcount_inc(&node->refs); in btrfs_first_delayed_node() 242 refcount_inc(&next->refs); in btrfs_next_delayed_node() [all …]
|
D | ref-verify.c | 70 struct rb_root refs; member 256 while((n = rb_first(&be->refs))) { in free_block_entry() 258 rb_erase(&ref->node, &be->refs); in free_block_entry() 309 be->refs = RB_ROOT; in add_block_entry() 353 exist = insert_ref_entry(&be->refs, ref); in add_tree_block() 382 if (insert_ref_entry(&be->refs, ref)) { in add_shared_data_ref() 420 if (insert_ref_entry(&be->refs, ref)) { in add_extent_data_ref() 653 for (n = rb_first(&be->refs); n; n = rb_next(n)) { in dump_block_entry() 817 exist = insert_ref_entry(&be->refs, ref); in btrfs_ref_tree_mod() 830 rb_erase(&exist->node, &be->refs); in btrfs_ref_tree_mod()
|
D | delayed-inode.h | 57 refcount_t refs; member 70 refcount_t refs; member
|
D | extent_io.c | 73 refcount_read(&state->refs)); in btrfs_leak_debug_check() 81 eb->start, eb->len, atomic_read(&eb->refs), eb->bflags); in btrfs_leak_debug_check() 220 refcount_set(&state->refs, 1); in alloc_extent_state() 230 if (refcount_dec_and_test(&state->refs)) { in free_extent_state() 625 refcount_dec(&cached->refs); in __clear_extent_bit() 777 refcount_inc(&state->refs); in wait_extent_bit() 820 refcount_inc(&state->refs); in cache_state_if_flags() 1506 refcount_inc(&state->refs); in find_delalloc_range() 2847 refcount_inc(&em->refs); in __get_extent_map() 2858 refcount_inc(&em->refs); in __get_extent_map() [all …]
|
/Linux-v4.19/include/uapi/xen/ |
D | gntdev.h | 64 struct ioctl_gntdev_grant_ref refs[1]; member 250 __u32 refs[1]; member 292 __u32 refs[1]; member
|
/Linux-v4.19/mm/ |
D | gup.c | 1529 int refs; in gup_huge_pmd() local 1537 refs = 0; in gup_huge_pmd() 1543 refs++; in gup_huge_pmd() 1547 if (!page_cache_add_speculative(head, refs)) { in gup_huge_pmd() 1548 *nr -= refs; in gup_huge_pmd() 1553 *nr -= refs; in gup_huge_pmd() 1554 while (refs--) in gup_huge_pmd() 1567 int refs; in gup_huge_pud() local 1575 refs = 0; in gup_huge_pud() 1581 refs++; in gup_huge_pud() [all …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx4/ |
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() 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 …]
|
/Linux-v4.19/drivers/gpu/drm/nouveau/ |
D | nouveau_vmm.c | 64 if (vma && --vma->refs <= 0) { in nouveau_vma_del() 85 vma->refs++; in nouveau_vma_new() 92 vma->refs = 1; in nouveau_vma_new()
|
/Linux-v4.19/drivers/misc/sgi-xp/ |
D | xpc.h | 956 s32 refs = atomic_dec_return(&ch->references); in xpc_msgqueue_deref() local 958 DBUG_ON(refs < 0); in xpc_msgqueue_deref() 959 if (refs == 0) in xpc_msgqueue_deref() 973 s32 refs = atomic_dec_return(&part->references); in xpc_part_deref() local 975 DBUG_ON(refs < 0); in xpc_part_deref() 976 if (refs == 0 && part->setup_state == XPC_P_SS_WTEARDOWN) in xpc_part_deref()
|
/Linux-v4.19/drivers/staging/most/ |
D | core.c | 43 int refs; member 955 if (c->pipe0.refs && c->pipe0.comp->tx_completion) in arm_mbo() 958 if (c->pipe1.refs && c->pipe1.comp->tx_completion) in arm_mbo() 1068 if (c->pipe0.refs && c->pipe1.refs && in channel_has_mbo() 1101 if (c->pipe0.refs && c->pipe1.refs && in most_get_mbo() 1173 if (c->pipe0.refs && c->pipe0.comp->rx_completion && in most_read_completion() 1177 if (c->pipe1.refs && c->pipe1.comp->rx_completion && in most_read_completion() 1206 if (c->pipe0.refs + c->pipe1.refs > 0) in most_start_channel() 1246 c->pipe0.refs++; in most_start_channel() 1248 c->pipe1.refs++; in most_start_channel() [all …]
|
/Linux-v4.19/fs/btrfs/tests/ |
D | qgroup-tests.c | 74 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()
|
/Linux-v4.19/tools/perf/arch/x86/util/ |
D | intel-bts.c | 283 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()
|
/Linux-v4.19/net/netfilter/ |
D | nf_conntrack_ecache.c | 44 struct nf_conn *refs[16]; in ecache_work_evict_list() local 69 refs[evicted] = ct; in ecache_work_evict_list() 71 if (++evicted >= ARRAY_SIZE(refs)) { in ecache_work_evict_list() 81 nf_ct_put(refs[--evicted]); in ecache_work_evict_list()
|
/Linux-v4.19/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
D | base.c | 116 u32 refs; member 133 ptc->refs = 0; in nvkm_mmu_ptc_find() 155 if (pt->ptc->refs < 8 /* Heuristic. */ && !force) { in nvkm_mmu_ptc_put() 157 pt->ptc->refs++; in nvkm_mmu_ptc_put() 195 ptc->refs--; in nvkm_mmu_ptc_get()
|
/Linux-v4.19/arch/powerpc/mm/ |
D | hugetlbpage.c | 868 int refs; in gup_hugepte() local 882 refs = 0; in gup_hugepte() 891 refs++; in gup_hugepte() 894 if (!page_cache_add_speculative(head, refs)) { in gup_hugepte() 895 *nr -= refs; in gup_hugepte() 901 *nr -= refs; in gup_hugepte() 902 while (refs--) in gup_hugepte()
|