Home
last modified time | relevance | path

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

12345

/linux/drivers/soc/ti/
H A Dknav_dma.c101 atomic_t ref_count; member
110 atomic_t ref_count; member
345 if (atomic_read(&chan->ref_count)) in dma_debug_show_devices()
355 if (atomic_read(&dma->ref_count)) { in knav_dma_debug_show()
469 if (atomic_read(&chan->ref_count) >= 1) { in knav_dma_open_channel()
477 if (atomic_inc_return(&chan->dma->ref_count) <= 1) in knav_dma_open_channel()
480 if (atomic_inc_return(&chan->ref_count) <= 1) in knav_dma_open_channel()
505 if (atomic_dec_return(&chan->ref_count) <= 0) in knav_dma_close_channel()
508 if (atomic_dec_return(&chan->dma->ref_count) <= 0) in knav_dma_close_channel()
582 atomic_set(&chan->ref_count, 0); in pktdma_init_chan()
[all …]
/linux/drivers/gpu/drm/imagination/
H A Dpvr_hwrt.h59 struct kref ref_count; member
108 kref_get(&hwrt->ref_count); in pvr_hwrt_dataset_lookup()
161 kref_get(&hwrt->hwrt_dataset->ref_count); in pvr_hwrt_data_get()
H A Dpvr_free_list.h49 struct kref ref_count; member
120 kref_get(&free_list->ref_count); in pvr_free_list_get()
173 if (free_list && !kref_get_unless_zero(&free_list->ref_count)) in pvr_free_list_lookup_id()
H A Dpvr_job.h35 struct kref ref_count; member
107 kref_get(&job->ref_count); in pvr_job_get()
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_span.c16 refcount_t ref_count; member
34 refcount_set(&entry->ref_count, 1); in prestera_span_entry_create()
84 refcount_inc(&entry->ref_count); in prestera_span_get()
112 if (!refcount_dec_and_test(&entry->ref_count)) in prestera_span_put()
/linux/net/l2tp/
H A Dl2tp_core.c189 refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_sk_to_tunnel()
202 if (refcount_dec_and_test(&tunnel->ref_count)) in l2tp_tunnel_put()
209 if (refcount_dec_and_test(&session->ref_count)) in l2tp_session_put()
222 if (tunnel && refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_tunnel_get()
241 if (refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_tunnel_get_next()
262 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get()
285 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get()
305 if (session && refcount_inc_not_zero(&session->ref_count)) { in l2tp_v2_session_get()
349 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v2_session_get_next()
377 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get_next()
[all...]
H A Dl2tp_core.h58 refcount_t ref_count; member
89 refcount_t ref_count; member
177 refcount_t ref_count; member
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Duar.c83 struct mlx5_uars_page *up = container_of(kref, struct mlx5_uars_page, ref_count); in up_rel_func()
149 kref_init(&up->ref_count); in alloc_uars_page()
172 kref_get(&ret->ref_count); in mlx5_get_uars_page()
189 kref_put(&up->ref_count, up_rel_func); in mlx5_put_uars_page()
233 kref_get(&up->ref_count); in alloc_bfreg()
324 kref_put(&up->ref_count, up_rel_func); in mlx5_free_bfreg()
H A Deswitch_offloads_termtbl.c17 int ref_count; member
153 tt->ref_count++; in mlx5_eswitch_termtbl_get_create()
167 if (--tt->ref_count == 0) in mlx5_eswitch_termtbl_put()
171 if (!tt->ref_count) { in mlx5_eswitch_termtbl_put()
/linux/drivers/s390/char/
H A Draw3270.h78 atomic_t ref_count; member
106 atomic_inc(&view->ref_count); in raw3270_get_view()
114 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
/linux/drivers/gpu/drm/amd/display/dc/
H A Ddc_trace.h41 #define TRACE_DCN_FPU(begin, function, line, ref_count) \ argument
42 trace_dcn_fpu(begin, function, line, ref_count)
/linux/drivers/irqchip/
H A Dirq-pruss-intc.c80 u8 ref_count; member
186 intc->event_channel[hwirq].ref_count++; in pruss_intc_map()
200 if (++intc->channel_host[ch].ref_count == 1) { in pruss_intc_map()
232 if (--intc->channel_host[ch].ref_count == 0) { in pruss_intc_unmap()
240 intc->event_channel[hwirq].ref_count--; in pruss_intc_unmap()
384 if (intc->event_channel[event].ref_count > 0 && in pruss_intc_validate_mapping()
393 if (intc->channel_host[channel].ref_count > 0 && in pruss_intc_validate_mapping()
/linux/drivers/acpi/
H A Dpower.c56 unsigned int ref_count; member
405 if (resource->ref_count++) { in acpi_power_on_unlocked()
411 resource->ref_count--; in acpi_power_on_unlocked()
448 if (!resource->ref_count) { in acpi_power_off_unlocked()
454 if (--resource->ref_count) { in acpi_power_off_unlocked()
460 resource->ref_count++; in acpi_power_off_unlocked()
631 if (!resource->ref_count && in acpi_power_wakeup_list_init()
907 return sprintf(buf, "%u\n", !!resource->ref_count); in resource_in_use_show()
1051 && resource->ref_count) { in acpi_resume_power_resources()
1134 if (!resource->ref_count && in acpi_turn_off_unused_power_resources()
/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dtunnel_conf.c131 int ref_count; member
196 int ref_count; member
881 entry->ref_count++; in nfp_tunnel_add_ipv4_off()
894 entry->ref_count = 1; in nfp_tunnel_add_ipv4_off()
911 entry->ref_count--; in nfp_tunnel_del_ipv4_off()
912 if (!entry->ref_count) { in nfp_tunnel_del_ipv4_off()
957 entry->ref_count++; in nfp_tunnel_add_ipv6_off()
969 entry->ref_count = 1; in nfp_tunnel_add_ipv6_off()
985 if (!--entry->ref_count) { in nfp_tunnel_put_ipv6_off()
1074 entry->ref_count++; in nfp_tunnel_offloaded_macs_inc_ref_and_link()
[all …]
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_span.c39 refcount_t ref_count; member
48 refcount_t ref_count; member
861 if (!refcount_read(&mlxsw_sp->span->entries[i].ref_count)) { in mlxsw_sp_span_entry_create()
880 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
905 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev) in mlxsw_sp_span_entry_find_by_port()
926 if (refcount_read(&curr->ref_count) && curr->id == span_id) in mlxsw_sp_span_entry_find_by_id()
942 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev && in mlxsw_sp_span_entry_find_by_parms()
963 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get()
973 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put()
1043 if (!refcount_read(&curr->ref_count)) in mlxsw_sp_span_respin_work()
[all …]
H A Dcore_acl_flex_actions.c98 refcount_t ref_count; member
123 refcount_t ref_count; member
135 refcount_t ref_count; member
185 refcount_t ref_count; member
285 refcount_set(&set->ref_count, 1); in mlxsw_afa_set_create()
333 if (!refcount_dec_and_test(&set->ref_count)) in mlxsw_afa_set_put()
353 refcount_inc(&set->ref_count); in mlxsw_afa_set_get()
567 refcount_set(&fwd_entry->ref_count, 1); in mlxsw_afa_fwd_entry_create()
610 refcount_inc(&fwd_entry->ref_count); in mlxsw_afa_fwd_entry_get()
619 if (!refcount_dec_and_test(&fwd_entry->ref_count)) in mlxsw_afa_fwd_entry_put()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx4/
H A Dresource_tracker.c58 int ref_count; member
66 int ref_count; member
117 atomic_t ref_count; member
146 atomic_t ref_count; member
182 atomic_t ref_count; member
195 atomic_t ref_count; member
1063 atomic_set(&ret->ref_count, 0); in alloc_qp_tr()
1079 atomic_set(&ret->ref_count, 0); in alloc_mtt_tr()
1123 atomic_set(&ret->ref_count, 0); in alloc_cq_tr()
1138 atomic_set(&ret->ref_count, 0); in alloc_srq_tr()
[all …]
/linux/drivers/block/
H A Dswim3.c195 int ref_count; member
901 if (fs->ref_count != 1) in floppy_locked_ioctl()
932 if (fs->ref_count == 0) { in floppy_open()
961 } else if (fs->ref_count == -1 || mode & BLK_OPEN_EXCL) in floppy_open()
980 if (fs->ref_count == 0) { in floppy_open()
989 fs->ref_count = -1; in floppy_open()
991 ++fs->ref_count; in floppy_open()
1013 if (fs->ref_count > 0) in floppy_release()
1014 --fs->ref_count; in floppy_release()
1015 else if (fs->ref_count == -1) in floppy_release()
[all …]
/linux/fs/smb/client/
H A Dcifs_swn.c24 struct kref ref_count; member
312 kref_get(&reg->ref_count); in cifs_get_swn_reg()
324 kref_init(&reg->ref_count); in cifs_get_swn_reg()
370 struct cifs_swn_reg *swnreg = container_of(ref, struct cifs_swn_reg, ref_count); in cifs_swn_reg_release()
386 kref_put(&swnreg->ref_count, cifs_swn_reg_release); in cifs_put_swn_reg()
634 id, kref_read(&swnreg->ref_count), in cifs_swn_dump()
/linux/drivers/gpu/drm/lima/
H A Dlima_vm.c14 unsigned int ref_count; member
101 bo_va->ref_count++; in lima_vm_bo_add()
119 bo_va->ref_count = 1; in lima_vm_bo_add()
163 if (--bo_va->ref_count > 0) { in lima_vm_bo_del()
/linux/drivers/video/fbdev/
H A Dvt8623fb.c35 unsigned int ref_count; member
285 if (par->ref_count == 0) { in vt8623fb_open()
296 par->ref_count++; in vt8623fb_open()
307 if (par->ref_count == 0) { in vt8623fb_release()
312 if (par->ref_count == 1) in vt8623fb_release()
315 par->ref_count--; in vt8623fb_release()
849 if (par->ref_count == 0) { in vt8623_pci_suspend()
876 if (par->ref_count == 0) in vt8623_pci_resume()
/linux/drivers/misc/vmw_vmci/
H A Dvmci_queue_pair.c191 u32 ref_count; member
904 entry->qp.ref_count = 0; in qp_guest_endpoint_create()
1027 u32 ref_count = ~0; /* To avoid compiler warning below */ in qp_detatch_guest_work() local
1040 if (entry->qp.ref_count > 1) { in qp_detatch_guest_work()
1072 entry->qp.ref_count--; in qp_detatch_guest_work()
1073 if (entry->qp.ref_count == 0) in qp_detatch_guest_work()
1078 ref_count = entry->qp.ref_count; in qp_detatch_guest_work()
1082 if (ref_count == 0) in qp_detatch_guest_work()
1120 if (queue_pair_entry->qp.ref_count > 1) { in qp_alloc_guest_work()
1227 queue_pair_entry->qp.ref_count++; in qp_alloc_guest_work()
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_page_dirty.c46 struct kref ref_count; member
224 kref_get(&dirty->ref_count); in vmw_bo_dirty_add()
238 kref_init(&dirty->ref_count); in vmw_bo_dirty_add()
277 if (dirty && kref_put(&dirty->ref_count, (void *)kvfree)) in vmw_bo_dirty_release()
/linux/drivers/net/ethernet/broadcom/
H A Dcnic_if.h304 atomic_t ref_count; member
339 atomic_t ref_count; member
382 atomic_t ref_count; member
/linux/drivers/mtd/ubi/
H A Dbuild.c268 ubi_assert(ubi->ref_count >= 0); in ubi_get_device()
269 ubi->ref_count += 1; in ubi_get_device()
284 ubi->ref_count -= 1; in ubi_put_device()
305 ubi_assert(ubi->ref_count >= 0); in ubi_get_by_major()
306 ubi->ref_count += 1; in ubi_get_by_major()
1105 ubi->ref_count -= 1; in ubi_detach_mtd_dev()
1106 if (ubi->ref_count) { in ubi_detach_mtd_dev()
1113 ubi->ubi_name, ubi->ref_count); in ubi_detach_mtd_dev()

12345