/Linux-v5.4/include/linux/ |
D | kref.h | 20 refcount_t refcount; member 23 #define KREF_INIT(n) { .refcount = REFCOUNT_INIT(n), } 31 refcount_set(&kref->refcount, 1); in kref_init() 36 return refcount_read(&kref->refcount); in kref_read() 45 refcount_inc(&kref->refcount); in kref_get() 64 if (refcount_dec_and_test(&kref->refcount)) { in kref_put() 75 if (refcount_dec_and_mutex_lock(&kref->refcount, lock)) { in kref_put_mutex() 86 if (refcount_dec_and_lock(&kref->refcount, lock)) { in kref_put_lock() 111 return refcount_inc_not_zero(&kref->refcount); in kref_get_unless_zero()
|
/Linux-v5.4/drivers/gpu/drm/msm/disp/dpu1/ |
D | dpu_hw_blk.c | 32 atomic_set(&hw_blk->refcount, 0); in dpu_hw_blk_init() 54 if (atomic_read(&hw_blk->refcount)) in dpu_hw_blk_destroy() 73 int rc, refcount; in dpu_hw_blk_get() local 81 atomic_read(&curr->refcount))) in dpu_hw_blk_get() 95 refcount = atomic_inc_return(&hw_blk->refcount); in dpu_hw_blk_get() 97 if (refcount == 1 && hw_blk->ops.start) { in dpu_hw_blk_get() 106 hw_blk->id, refcount); in dpu_hw_blk_get() 127 atomic_read(&hw_blk->refcount)); in dpu_hw_blk_put() 129 if (!atomic_read(&hw_blk->refcount)) { in dpu_hw_blk_put() 134 if (atomic_dec_return(&hw_blk->refcount)) in dpu_hw_blk_put()
|
/Linux-v5.4/drivers/gpu/drm/amd/display/dc/core/ |
D | dc_surface.c | 123 kref_init(&plane_state->refcount); in dc_create_plane_state() 188 kref_get(&plane_state->refcount); in dc_plane_state_retain() 193 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free() 200 kref_put(&plane_state->refcount, dc_plane_state_free); in dc_plane_state_release() 205 kref_get(&gamma->refcount); in dc_gamma_retain() 210 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free() 216 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release() 227 kref_init(&gamma->refcount); in dc_create_gamma() 236 kref_get(&tf->refcount); in dc_transfer_func_retain() 241 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free() [all …]
|
D | dc_sink.c | 72 kref_get(&sink->refcount); in dc_sink_retain() 77 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free() 84 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release() 97 kref_init(&sink->refcount); in dc_sink_create()
|
/Linux-v5.4/include/trace/events/ |
D | objagg.h | 88 unsigned int refcount), 90 TP_ARGS(objagg, obj, refcount), 95 __field(unsigned int, refcount) 101 __entry->refcount = refcount; 105 __entry->objagg, __entry->obj, __entry->refcount) 111 unsigned int refcount), 113 TP_ARGS(objagg, obj, refcount), 118 __field(unsigned int, refcount) 124 __entry->refcount = refcount; 128 __entry->objagg, __entry->obj, __entry->refcount)
|
/Linux-v5.4/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-v5.4/drivers/scsi/qedf/ |
D | qedf_els.c | 84 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els() 97 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els() 165 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_process_els_compl() 173 int refcount; in qedf_rrq_compl() local 192 refcount = kref_read(&orig_io_req->refcount); in qedf_rrq_compl() 195 orig_io_req, orig_io_req->xid, rrq_req->xid, refcount); in qedf_rrq_compl() 202 if (orig_io_req && refcount > 0) in qedf_rrq_compl() 203 kref_put(&orig_io_req->refcount, qedf_release_cmd); in qedf_rrq_compl() 213 kref_put(&rrq_req->refcount, qedf_release_cmd); in qedf_rrq_compl() 229 int refcount; in qedf_send_rrq() local [all …]
|
D | qedf_io.c | 60 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_cmd_timeout() 81 kref_get(&io_req->refcount); in qedf_cmd_timeout() 97 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_cmd_timeout() 382 kref_init(&io_req->refcount); /* ID: 001 */ in qedf_alloc_cmd() 390 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_alloc_cmd() 442 container_of(ref, struct qedf_ioreq, refcount); in qedf_release_cmd() 833 io_log->refcount = kref_read(&io_req->refcount); in qedf_trace_io() 895 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req() 904 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req() 923 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req() [all …]
|
/Linux-v5.4/fs/xfs/scrub/ |
D | refcount.c | 78 xfs_nlink_t refcount; member 110 if (refchk->refcount == 1 && rec->rm_owner != XFS_RMAP_OWN_COW) { in xchk_refcountbt_rmap_check() 159 target_nr = refchk->refcount - refchk->seen; in xchk_refcountbt_process_rmap_fragments() 255 refchk->seen = refchk->refcount; in xchk_refcountbt_process_rmap_fragments() 274 xfs_nlink_t refcount) in xchk_refcountbt_xref_rmap() argument 280 .refcount = refcount, in xchk_refcountbt_xref_rmap() 305 if (refcount != refchk.seen) in xchk_refcountbt_xref_rmap() 321 xfs_nlink_t refcount) in xchk_refcountbt_xref() argument 328 xchk_refcountbt_xref_rmap(sc, agbno, len, refcount); in xchk_refcountbt_xref() 342 xfs_nlink_t refcount; in xchk_refcountbt_rec() local [all …]
|
/Linux-v5.4/net/batman-adv/ |
D | originator.c | 76 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_orig_hash_find() 123 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_node_vlan_get() 164 kref_init(&vlan->refcount); in batadv_orig_node_vlan_new() 167 kref_get(&vlan->refcount); in batadv_orig_node_vlan_new() 185 orig_vlan = container_of(ref, struct batadv_orig_node_vlan, refcount); in batadv_orig_node_vlan_release() 197 kref_put(&orig_vlan->refcount, batadv_orig_node_vlan_release); in batadv_orig_node_vlan_put() 239 neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount); in batadv_neigh_ifinfo_release() 254 kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release); in batadv_neigh_ifinfo_put() 267 refcount); in batadv_hardif_neigh_release() 284 kref_put(&hardif_neigh->refcount, batadv_hardif_neigh_release); in batadv_hardif_neigh_put() [all …]
|
D | types.h | 197 struct kref refcount; member 281 struct kref refcount; member 351 struct kref refcount; member 504 struct kref refcount; member 579 struct kref refcount; member 638 struct kref refcount; member 673 struct kref refcount; member 742 struct kref refcount; member 1496 struct kref refcount; member 1527 struct kref refcount; member [all …]
|
D | tvlv.c | 42 tvlv_handler = container_of(ref, struct batadv_tvlv_handler, refcount); in batadv_tvlv_handler_release() 53 kref_put(&tvlv_handler->refcount, batadv_tvlv_handler_release); in batadv_tvlv_handler_put() 79 if (!kref_get_unless_zero(&tvlv_handler_tmp->refcount)) in batadv_tvlv_handler_get() 98 tvlv = container_of(ref, struct batadv_tvlv_container, refcount); in batadv_tvlv_container_release() 109 kref_put(&tvlv->refcount, batadv_tvlv_container_release); in batadv_tvlv_container_put() 138 kref_get(&tvlv_tmp->refcount); in batadv_tvlv_container_get() 244 kref_init(&tvlv_new->refcount); in batadv_tvlv_container_register() 250 kref_get(&tvlv_new->refcount); in batadv_tvlv_container_register() 540 kref_init(&tvlv_handler->refcount); in batadv_tvlv_handler_register() 543 kref_get(&tvlv_handler->refcount); in batadv_tvlv_handler_register()
|
/Linux-v5.4/mm/ |
D | zpool.c | 43 atomic_set(&driver->refcount, 0); in zpool_register_driver() 61 int ret = 0, refcount; in zpool_unregister_driver() local 64 refcount = atomic_read(&driver->refcount); in zpool_unregister_driver() 65 WARN_ON(refcount < 0); in zpool_unregister_driver() 66 if (refcount > 0) in zpool_unregister_driver() 87 atomic_inc(&driver->refcount); in zpool_get_driver() 99 atomic_dec(&driver->refcount); in zpool_put_driver()
|
/Linux-v5.4/drivers/media/mc/ |
D | mc-dev-allocator.c | 33 struct kref refcount; member 45 container_of(kref, struct media_device_instance, refcount); in media_device_instance_release() 71 kref_get(&mdi->refcount); in __media_device_get() 89 kref_init(&mdi->refcount); in __media_device_get() 133 kref_put(&mdi->refcount, media_device_instance_release); in media_device_delete()
|
/Linux-v5.4/net/core/ |
D | dev_addr_lists.c | 35 ha->refcount = 1; in __hw_addr_create_ex() 71 ha->refcount++; in __hw_addr_add_ex() 104 if (--ha->refcount) in __hw_addr_del_entry() 146 ha->refcount++; in __hw_addr_sync_one() 176 if (ha->sync_cnt == ha->refcount) { in __hw_addr_sync_multiple() 204 } else if (ha->refcount == 1) in __hw_addr_sync() 248 if (!ha->sync_cnt || ha->refcount != 1) in __hw_addr_sync_dev() 269 ha->refcount++; in __hw_addr_sync_dev() 305 if ((ha->sync_cnt << 1) <= ha->refcount) in __hw_addr_ref_sync_dev() 309 ref_cnt = ha->refcount - ha->sync_cnt; in __hw_addr_ref_sync_dev() [all …]
|
/Linux-v5.4/drivers/soc/qcom/ |
D | smem_state.c | 26 struct kref refcount; member 67 kref_get(&state->refcount); in of_node_to_state() 136 struct qcom_smem_state *state = container_of(ref, struct qcom_smem_state, refcount); in qcom_smem_state_release() 149 kref_put(&state->refcount, qcom_smem_state_release); in qcom_smem_state_put() 170 kref_init(&state->refcount); in qcom_smem_state_register()
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
D | geneve.c | 14 u32 refcount; member 72 if (geneve->refcount) { in mlx5_geneve_tlv_option_add() 76 geneve->refcount++; in mlx5_geneve_tlv_option_add() 107 geneve->refcount++; in mlx5_geneve_tlv_option_add() 121 if (--geneve->refcount == 0) { in mlx5_geneve_tlv_option_del() 153 if (geneve->refcount) in mlx5_geneve_destroy()
|
/Linux-v5.4/drivers/gpu/host1x/ |
D | channel.c | 53 kref_get(&channel->refcount); in host1x_channel_get() 72 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index() 81 container_of(kref, struct host1x_channel, refcount); in release_channel() 93 kref_put(&channel->refcount, release_channel); in host1x_channel_put() 134 kref_init(&channel->refcount); in host1x_channel_request()
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_table.c | 73 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_set_miss_action() 78 refcount_inc(&action->refcount); in mlx5dr_table_set_miss_action() 240 refcount_inc(&dmn->refcount); in mlx5dr_table_create() 248 refcount_set(&tbl->refcount, 1); in mlx5dr_table_create() 265 refcount_dec(&dmn->refcount); in mlx5dr_table_create() 273 if (refcount_read(&tbl->refcount) > 1) in mlx5dr_table_destroy() 283 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_destroy() 285 refcount_dec(&tbl->dmn->refcount); in mlx5dr_table_destroy()
|
/Linux-v5.4/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() 218 if (refcount_dec_and_test(&ax25_rt->refcount)) in ax25_put_route() 261 refcount_t refcount; member 283 refcount_inc(&((__ax25)->refcount)) 287 if (refcount_dec_and_test(&ax25->refcount)) { in ax25_cb_put()
|
/Linux-v5.4/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-v5.4/drivers/gpu/drm/lima/ |
D | lima_vm.h | 31 struct kref refcount; member 51 kref_get(&vm->refcount); in lima_vm_get() 57 kref_put(&vm->refcount, lima_vm_release); in lima_vm_put()
|
/Linux-v5.4/drivers/gpu/drm/ |
D | drm_dp_aux_dev.c | 49 struct kref refcount; member 66 if (!kref_get_unless_zero(&aux_dev->refcount)) in drm_dp_aux_dev_get_by_minor() 83 kref_init(&aux_dev->refcount); in alloc_drm_dp_aux_dev() 100 container_of(ref, struct drm_dp_aux_dev, refcount); in release_drm_dp_aux_dev() 116 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in name_show() 244 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in auxdev_release() 302 kref_put(&aux_dev->refcount, release_drm_dp_aux_dev); in drm_dp_aux_unregister_devnode()
|
/Linux-v5.4/drivers/misc/habanalabs/ |
D | context.c | 49 ctx = container_of(ref, struct hl_ctx, refcount); in hl_ctx_do_release() 109 if (kref_put(&ctx->refcount, hl_ctx_do_release) == 1) in hl_ctx_free() 123 kref_init(&ctx->refcount); in hl_ctx_init() 163 kref_get(&ctx->refcount); in hl_ctx_get() 168 return kref_put(&ctx->refcount, hl_ctx_do_release); in hl_ctx_put()
|