/Linux-v4.19/include/linux/ |
D | kref.h | 22 refcount_t refcount; member 25 #define KREF_INIT(n) { .refcount = REFCOUNT_INIT(n), } 33 refcount_set(&kref->refcount, 1); in kref_init() 38 return refcount_read(&kref->refcount); in kref_read() 47 refcount_inc(&kref->refcount); in kref_get() 69 if (refcount_dec_and_test(&kref->refcount)) { in kref_put() 80 if (refcount_dec_and_mutex_lock(&kref->refcount, lock)) { in kref_put_mutex() 91 if (refcount_dec_and_lock(&kref->refcount, lock)) { in kref_put_lock() 116 return refcount_inc_not_zero(&kref->refcount); in kref_get_unless_zero()
|
D | iocontext.h | 99 atomic_long_t refcount; member 131 WARN_ON_ONCE(atomic_long_read(&ioc->refcount) <= 0); in get_io_context_active() 133 atomic_long_inc(&ioc->refcount); in get_io_context_active()
|
/Linux-v4.19/drivers/gpu/drm/msm/disp/dpu1/ |
D | dpu_hw_blk.c | 46 atomic_set(&hw_blk->refcount, 0); in dpu_hw_blk_init() 70 if (atomic_read(&hw_blk->refcount)) in dpu_hw_blk_destroy() 89 int rc, refcount; in dpu_hw_blk_get() local 97 atomic_read(&curr->refcount))) in dpu_hw_blk_get() 111 refcount = atomic_inc_return(&hw_blk->refcount); in dpu_hw_blk_get() 113 if (refcount == 1 && hw_blk->ops.start) { in dpu_hw_blk_get() 122 hw_blk->id, refcount); in dpu_hw_blk_get() 143 atomic_read(&hw_blk->refcount)); in dpu_hw_blk_put() 145 if (!atomic_read(&hw_blk->refcount)) { in dpu_hw_blk_put() 150 if (atomic_dec_return(&hw_blk->refcount)) in dpu_hw_blk_put()
|
D | dpu_power_handle.c | 126 curr_client->refcount); in dpu_power_resource_deinit() 156 pclient->refcount++; in dpu_power_resource_enable() 157 else if (pclient->refcount) in dpu_power_resource_enable() 158 pclient->refcount--; in dpu_power_resource_enable() 160 if (pclient->refcount) in dpu_power_resource_enable() 179 pclient->name, pclient->id, enable, pclient->refcount); in dpu_power_resource_enable()
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/core/ |
D | dc_surface.c | 81 kref_init(&plane_state->refcount); in dc_create_plane_state() 133 kref_get(&plane_state->refcount); in dc_plane_state_retain() 138 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free() 145 kref_put(&plane_state->refcount, dc_plane_state_free); in dc_plane_state_release() 150 kref_get(&gamma->refcount); in dc_gamma_retain() 155 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free() 161 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release() 172 kref_init(&gamma->refcount); in dc_create_gamma() 181 kref_get(&tf->refcount); in dc_transfer_func_retain() 186 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free() [all …]
|
D | dc_sink.c | 70 kref_get(&sink->refcount); in dc_sink_retain() 75 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free() 82 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release() 95 kref_init(&sink->refcount); in dc_sink_create()
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_global.c | 39 int refcount; member 52 item->refcount = 0; in drm_global_init() 62 BUG_ON(item->refcount != 0); in drm_global_release() 84 if (item->refcount == 0) { in drm_global_item_ref() 99 ++item->refcount; in drm_global_item_ref() 128 BUG_ON(item->refcount == 0); in drm_global_item_unref() 130 if (--item->refcount == 0) { in drm_global_item_unref()
|
D | drm_dp_aux_dev.c | 46 struct kref refcount; member 63 if (!kref_get_unless_zero(&aux_dev->refcount)) in drm_dp_aux_dev_get_by_minor() 80 kref_init(&aux_dev->refcount); in alloc_drm_dp_aux_dev() 98 container_of(ref, struct drm_dp_aux_dev, refcount); in release_drm_dp_aux_dev() 114 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in name_show() 232 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in auxdev_release() 290 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in drm_dp_aux_unregister_devnode()
|
/Linux-v4.19/Documentation/ |
D | kref.txt | 28 struct kref refcount; 46 kref_init(&data->refcount); 48 This sets the refcount in the kref to 1. 58 increment the refcount with kref_get() before passing it off:: 60 kref_get(&data->refcount); 63 refcount cannot go to zero) you may do this without a lock. 67 kref_put(&data->refcount, data_release); 85 struct my_data *data = container_of(ref, struct my_data, refcount); 95 kref_put(&data->refcount, data_release); 106 kref_init(&data->refcount); [all …]
|
/Linux-v4.19/fs/xfs/scrub/ |
D | refcount.c | 88 xfs_nlink_t refcount; member 120 if (refchk->refcount == 1 && rec->rm_owner != XFS_RMAP_OWN_COW) { in xchk_refcountbt_rmap_check() 169 target_nr = refchk->refcount - refchk->seen; in xchk_refcountbt_process_rmap_fragments() 265 refchk->seen = refchk->refcount; in xchk_refcountbt_process_rmap_fragments() 284 xfs_nlink_t refcount) in xchk_refcountbt_xref_rmap() argument 290 .refcount = refcount, in xchk_refcountbt_xref_rmap() 315 if (refcount != refchk.seen) in xchk_refcountbt_xref_rmap() 331 xfs_nlink_t refcount) in xchk_refcountbt_xref() argument 338 xchk_refcountbt_xref_rmap(sc, agbno, len, refcount); in xchk_refcountbt_xref() 352 xfs_nlink_t refcount; in xchk_refcountbt_rec() local [all …]
|
/Linux-v4.19/net/batman-adv/ |
D | originator.c | 87 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_orig_hash_find() 134 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_node_vlan_get() 175 kref_init(&vlan->refcount); in batadv_orig_node_vlan_new() 178 kref_get(&vlan->refcount); in batadv_orig_node_vlan_new() 196 orig_vlan = container_of(ref, struct batadv_orig_node_vlan, refcount); in batadv_orig_node_vlan_release() 208 kref_put(&orig_vlan->refcount, batadv_orig_node_vlan_release); in batadv_orig_node_vlan_put() 250 neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount); in batadv_neigh_ifinfo_release() 265 kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release); in batadv_neigh_ifinfo_put() 278 refcount); in batadv_hardif_neigh_release() 295 kref_put(&hardif_neigh->refcount, batadv_hardif_neigh_release); in batadv_hardif_neigh_put() [all …]
|
D | types.h | 194 struct kref refcount; member 261 struct kref refcount; member 331 struct kref refcount; member 482 struct kref refcount; member 557 struct kref refcount; member 616 struct kref refcount; member 651 struct kref refcount; member 720 struct kref refcount; member 1438 struct kref refcount; member 1469 struct kref refcount; member [all …]
|
D | tvlv.c | 54 tvlv_handler = container_of(ref, struct batadv_tvlv_handler, refcount); in batadv_tvlv_handler_release() 65 kref_put(&tvlv_handler->refcount, batadv_tvlv_handler_release); in batadv_tvlv_handler_put() 91 if (!kref_get_unless_zero(&tvlv_handler_tmp->refcount)) in batadv_tvlv_handler_get() 110 tvlv = container_of(ref, struct batadv_tvlv_container, refcount); in batadv_tvlv_container_release() 121 kref_put(&tvlv->refcount, batadv_tvlv_container_release); in batadv_tvlv_container_put() 150 kref_get(&tvlv_tmp->refcount); in batadv_tvlv_container_get() 256 kref_init(&tvlv_new->refcount); in batadv_tvlv_container_register() 262 kref_get(&tvlv_new->refcount); in batadv_tvlv_container_register() 552 kref_init(&tvlv_handler->refcount); in batadv_tvlv_handler_register() 555 kref_get(&tvlv_handler->refcount); in batadv_tvlv_handler_register()
|
/Linux-v4.19/mm/ |
D | zpool.c | 42 atomic_set(&driver->refcount, 0); in zpool_register_driver() 60 int ret = 0, refcount; in zpool_unregister_driver() local 63 refcount = atomic_read(&driver->refcount); in zpool_unregister_driver() 64 WARN_ON(refcount < 0); in zpool_unregister_driver() 65 if (refcount > 0) in zpool_unregister_driver() 86 atomic_inc(&driver->refcount); in zpool_get_driver() 98 atomic_dec(&driver->refcount); in zpool_put_driver()
|
/Linux-v4.19/drivers/scsi/qedf/ |
D | qedf_els.c | 95 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els() 108 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els() 179 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_process_els_compl() 187 int refcount; in qedf_rrq_compl() local 203 refcount = kref_read(&orig_io_req->refcount); in qedf_rrq_compl() 206 orig_io_req, orig_io_req->xid, rrq_req->xid, refcount); in qedf_rrq_compl() 210 kref_put(&orig_io_req->refcount, qedf_release_cmd); in qedf_rrq_compl() 220 kref_put(&rrq_req->refcount, qedf_release_cmd); in qedf_rrq_compl() 289 kref_put(&aborted_io_req->refcount, qedf_release_cmd); in qedf_send_rrq() 496 int refcount; in qedf_srr_compl() local [all …]
|
/Linux-v4.19/drivers/soc/qcom/ |
D | smem_state.c | 34 struct kref refcount; member 75 kref_get(&state->refcount); in of_node_to_state() 144 struct qcom_smem_state *state = container_of(ref, struct qcom_smem_state, refcount); in qcom_smem_state_release() 157 kref_put(&state->refcount, qcom_smem_state_release); in qcom_smem_state_put() 178 kref_init(&state->refcount); in qcom_smem_state_register()
|
/Linux-v4.19/tools/testing/selftests/rseq/ |
D | rseq.c | 39 volatile int refcount; variable 73 if (refcount++) in rseq_register_current_thread() 83 refcount--; in rseq_register_current_thread() 95 if (--refcount) in rseq_unregister_current_thread()
|
/Linux-v4.19/drivers/gpu/host1x/ |
D | channel.c | 64 kref_get(&channel->refcount); in host1x_channel_get() 83 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index() 92 container_of(kref, struct host1x_channel, refcount); in release_channel() 104 kref_put(&channel->refcount, release_channel); in host1x_channel_put() 145 kref_init(&channel->refcount); in host1x_channel_request()
|
D | intr.c | 40 kfree(container_of(kref, struct host1x_waitlist, refcount)); in waiter_release() 93 kref_put(&waiter->refcount, waiter_release); in remove_completed_waiters() 158 kref_put(&waiter->refcount, waiter_release); in run_handlers() 228 kref_init(&waiter->refcount); in host1x_intr_add_action() 230 kref_get(&waiter->refcount); in host1x_intr_add_action() 270 kref_put(&waiter->refcount, waiter_release); in host1x_intr_put_ref() 334 kref_put(&waiter->refcount, waiter_release); in host1x_intr_stop()
|
/Linux-v4.19/include/net/ |
D | netrom.h | 99 refcount_t refcount; member 115 refcount_t refcount; member 124 refcount_inc(&((__nr_node)->refcount)) 128 if (refcount_dec_and_test(&nr_node->refcount)) { in nr_node_put() 134 refcount_inc(&((__nr_neigh)->refcount)) 138 if (refcount_dec_and_test(&nr_neigh->refcount)) { in nr_neigh_put()
|
D | ax25.h | 163 refcount_t refcount; member 172 refcount_inc(&((ax25)->refcount)) 176 if (refcount_dec_and_test(&assoc->refcount)) { in ax25_uid_put() 190 refcount_t refcount; member 199 refcount_inc(&ax25_rt->refcount); in ax25_hold_route() 206 if (refcount_dec_and_test(&ax25_rt->refcount)) in ax25_put_route() 249 refcount_t refcount; member 271 refcount_inc(&((__ax25)->refcount)) 275 if (refcount_dec_and_test(&ax25->refcount)) { in ax25_cb_put()
|
/Linux-v4.19/drivers/tty/vt/ |
D | consolemap.c | 191 unsigned long refcount; member 428 if (--p->refcount) in con_free_unimap() 464 q->refcount++; in con_unify_unimap() 509 if (!p || --p->refcount) { in con_do_clear_unimap() 513 p->refcount++; in con_do_clear_unimap() 516 q->refcount=1; in con_do_clear_unimap() 520 p->refcount++; in con_do_clear_unimap() 560 if (p->refcount > 1) { in con_set_unimap() 597 p->refcount++; in con_set_unimap() 670 dflt->refcount++; in con_set_default_unimap() [all …]
|
/Linux-v4.19/drivers/scsi/bnx2fc/ |
D | bnx2fc_io.c | 37 kref_get(&io_req->refcount); in bnx2fc_cmd_timer_set() 78 kref_read(&io_req->refcount)); in bnx2fc_cmd_timeout() 86 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout() 107 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout() 124 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout() 158 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout() 460 kref_init(&io_req->refcount); in bnx2fc_elstm_alloc() 515 kref_init(&io_req->refcount); in bnx2fc_cmd_alloc() 522 struct bnx2fc_cmd, refcount); in bnx2fc_cmd_release() 733 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_initiate_tmf() [all …]
|
/Linux-v4.19/include/drm/ |
D | drm_syncobj.h | 42 struct kref refcount; member 96 kref_get(&obj->refcount); in drm_syncobj_get() 106 kref_put(&obj->refcount, drm_syncobj_free); in drm_syncobj_put()
|
/Linux-v4.19/drivers/media/common/videobuf2/ |
D | videobuf2-memops.c | 99 __func__, h, refcount_read(h->refcount), vma->vm_start, in vb2_common_vm_open() 102 refcount_inc(h->refcount); in vb2_common_vm_open() 117 __func__, h, refcount_read(h->refcount), vma->vm_start, in vb2_common_vm_close()
|