Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 1231) sorted by relevance

12345678910>>...50

/openbmc/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_counter.c126 arr = krealloc(counter->block_list, (counter->block_list_len + 1) * in prestera_counter_block_list_add()
134 counter->block_list[counter->block_list_len] = block; in prestera_counter_block_list_add()
374 err = prestera_hw_counters_get(counter->sw, counter->total_read, in prestera_counter_stats_work()
406 prestera_counter_block_idx_next(counter, counter->curr_idx); in prestera_counter_stats_work()
441 counter = kzalloc(sizeof(*counter), GFP_KERNEL); in prestera_counter_init()
442 if (!counter) in prestera_counter_init()
447 kfree(counter); in prestera_counter_init()
453 counter->sw = sw; in prestera_counter_init()
454 sw->counter = counter; in prestera_counter_init()
464 struct prestera_counter *counter = sw->counter; in prestera_counter_fini() local
[all …]
/openbmc/linux/drivers/counter/
H A Dcounter-chrdev.c72 if (!counter->ops) in counter_chrdev_read()
85 !counter->ops); in counter_chrdev_read()
88 if (!counter->ops) in counter_chrdev_read()
109 if (!counter->ops) in counter_chrdev_poll()
208 err = counter->ops->events_configure(counter); in counter_enable_events()
226 err = counter->ops->events_configure(counter); in counter_disable_events()
287 ext = counter->ext; in counter_add_watch()
367 err = counter->ops->watch_validate(counter, &watch); in counter_add_watch()
390 if (!counter->ops) in counter_chrdev_ioctl()
433 if (!counter->ops) { in counter_chrdev_release()
[all …]
H A Dcounter-core.c48 kfree(container_of(counter, struct counter_device_allochelper, counter)); in counter_device_release()
72 container_of(counter, struct counter_device_allochelper, counter); in counter_priv()
98 counter = &ch->counter; in counter_alloc()
99 dev = &counter->dev; in counter_alloc()
122 return counter; in counter_alloc()
179 if (!counter) in counter_unregister()
182 cdev_device_del(&counter->chrdev, &counter->dev); in counter_unregister()
186 counter->ops = NULL; in counter_unregister()
200 counter_put(counter); in devm_counter_put()
217 if (!counter) in devm_counter_alloc()
[all …]
H A Drz-mtu3-cnt.c447 rz_mtu3_32bit_cnt_setting(counter); in rz_mtu3_initialize_counter()
838 struct counter_device *counter; in rz_mtu3_cnt_probe() local
845 if (!counter) in rz_mtu3_cnt_probe()
848 priv = counter_priv(counter); in rz_mtu3_cnt_probe()
868 counter->name = dev_name(dev); in rz_mtu3_cnt_probe()
869 counter->parent = dev; in rz_mtu3_cnt_probe()
870 counter->ops = &rz_mtu3_cnt_ops; in rz_mtu3_cnt_probe()
871 counter->counts = rz_mtu3_counts; in rz_mtu3_cnt_probe()
873 counter->signals = rz_mtu3_signals; in rz_mtu3_cnt_probe()
875 counter->ext = rz_mtu3_device_ext; in rz_mtu3_cnt_probe()
[all …]
H A Dinterrupt-cnt.c164 struct counter_device *counter; in interrupt_cnt_probe() local
169 if (!counter) in interrupt_cnt_probe()
171 priv = counter_priv(counter); in interrupt_cnt_probe()
202 counter->signals = &priv->signals; in interrupt_cnt_probe()
203 counter->num_signals = 1; in interrupt_cnt_probe()
217 counter->name = dev_name(dev); in interrupt_cnt_probe()
218 counter->parent = dev; in interrupt_cnt_probe()
219 counter->ops = &interrupt_cnt_ops; in interrupt_cnt_probe()
220 counter->counts = &priv->cnts; in interrupt_cnt_probe()
221 counter->num_counts = 1; in interrupt_cnt_probe()
[all …]
H A Dti-ecap-capture.c105 pm_runtime_get_sync(counter->parent); in ecap_cnt_capture_get_evmode()
107 pm_runtime_put_sync(counter->parent); in ecap_cnt_capture_get_evmode()
116 pm_runtime_get_sync(counter->parent); in ecap_cnt_capture_set_evmode()
118 pm_runtime_put_sync(counter->parent); in ecap_cnt_capture_set_evmode()
125 pm_runtime_get_sync(counter->parent); in ecap_cnt_capture_enable()
146 pm_runtime_put_sync(counter->parent); in ecap_cnt_capture_disable()
154 pm_runtime_get_sync(counter->parent); in ecap_cnt_count_get_val()
156 pm_runtime_put_sync(counter->parent); in ecap_cnt_count_get_val()
165 pm_runtime_get_sync(counter->parent); in ecap_cnt_count_set_val()
340 ecap_cnt_capture_enable(counter); in ecap_cnt_enable_write()
[all …]
H A Dti-eqep.c86 struct counter_device counter; member
93 return counter_priv(counter); in ti_eqep_count_from_counter()
377 struct counter_device *counter; in ti_eqep_probe() local
384 if (!counter) in ti_eqep_probe()
386 priv = counter_priv(counter); in ti_eqep_probe()
402 counter->name = dev_name(dev); in ti_eqep_probe()
403 counter->parent = dev; in ti_eqep_probe()
405 counter->counts = ti_eqep_counts; in ti_eqep_probe()
407 counter->signals = ti_eqep_signals; in ti_eqep_probe()
424 err = counter_add(counter); in ti_eqep_probe()
[all …]
H A Dstm32-lptimer-cnt.c413 struct counter_device *counter; in stm32_lptim_cnt_probe() local
421 if (!counter) in stm32_lptim_cnt_probe()
423 priv = counter_priv(counter); in stm32_lptim_cnt_probe()
431 counter->name = dev_name(&pdev->dev); in stm32_lptim_cnt_probe()
432 counter->parent = &pdev->dev; in stm32_lptim_cnt_probe()
433 counter->ops = &stm32_lptim_cnt_ops; in stm32_lptim_cnt_probe()
435 counter->counts = &stm32_lptim_enc_counts; in stm32_lptim_cnt_probe()
438 counter->counts = &stm32_lptim_in1_counts; in stm32_lptim_cnt_probe()
439 counter->num_signals = 1; in stm32_lptim_cnt_probe()
441 counter->num_counts = 1; in stm32_lptim_cnt_probe()
[all …]
H A Dcounter-sysfs.c882 counter->signals + i); in counter_sysfs_signals_add()
984 count = counter->counts + i; in counter_sysfs_counts_add()
1008 *val = counter->num_signals; in counter_num_signals_read()
1014 *val = counter->num_counts; in counter_num_counts_read()
1021 *val = kfifo_size(&counter->events); in counter_events_queue_size_read()
1038 mutex_lock(&counter->events_out_lock); in counter_events_queue_size_write()
1040 kfifo_free(&counter->events); in counter_events_queue_size_write()
1041 counter->events.kfifo = events.kfifo; in counter_events_queue_size_write()
1070 cattr_group += counter->num_signals; in counter_sysfs_attr_add()
1076 cattr_group += counter->num_counts; in counter_sysfs_attr_add()
[all …]
H A Dstm32-timer-cnt.c325 struct counter_device *counter; in stm32_timer_cnt_probe() local
331 counter = devm_counter_alloc(dev, sizeof(*priv)); in stm32_timer_cnt_probe()
332 if (!counter) in stm32_timer_cnt_probe()
335 priv = counter_priv(counter); in stm32_timer_cnt_probe()
341 counter->name = dev_name(dev); in stm32_timer_cnt_probe()
342 counter->parent = dev; in stm32_timer_cnt_probe()
343 counter->ops = &stm32_timer_cnt_ops; in stm32_timer_cnt_probe()
344 counter->counts = &stm32_counts; in stm32_timer_cnt_probe()
345 counter->num_counts = 1; in stm32_timer_cnt_probe()
346 counter->signals = stm32_signals; in stm32_timer_cnt_probe()
[all …]
/openbmc/linux/drivers/comedi/drivers/
H A Dni_tiocmd.c78 struct ni_gpct *counter = s->private; in ni_tio_input_inttrig() local
87 if (counter->mite_chan) in ni_tio_input_inttrig()
88 mite_dma_arm(counter->mite_chan); in ni_tio_input_inttrig()
130 mite_dma_arm(counter->mite_chan); in ni_tio_input_cmd()
213 if (!counter->mite_chan) { in ni_tio_cmd()
337 ni_tio_arm(counter, false, 0); in ni_tio_cancel()
339 if (counter->mite_chan) in ni_tio_cancel()
372 if (!counter->mite_chan || in should_ack_gate()
424 if (should_ack_gate(counter)) in ni_tio_acknowledge_and_confirm()
480 if (counter->mite_chan) in ni_tio_handle_interrupt()
[all …]
H A Dni_tio.c153 counter->counter_dev->write(counter, value, reg); in ni_tio_write()
165 return counter->counter_dev->read(counter, reg); in ni_tio_read()
541 ni_tio_set_sync_mode(counter); in ni_tio_set_counter_mode()
804 ni_tio_set_sync_mode(counter); in ni_tio_set_clock_src()
829 ni_tio_set_bits(counter, NITIO_INPUT_SEL_REG(counter->counter_index), in ni_tio_set_gate_raw()
836 ni_tio_set_bits(counter, NITIO_GATE2_REG(counter->counter_index), in ni_tio_set_gate2_raw()
860 ni_tio_set_bits(counter, NITIO_MODE_REG(counter->counter_index), in ni_tio_set_gate_mode()
892 ni_tio_set_bits(counter, NITIO_GATE2_REG(counter->counter_index), in ni_tio_set_gate2_mode()
1035 ni_tio_set_gate_raw(counter, src); in ni_tio_set_gate_src_raw()
1775 struct ni_gpct *counter; in ni_gpct_device_construct() local
[all …]
/openbmc/linux/tools/testing/selftests/netfilter/
H A Dnft_meta.sh30 counter iifcount {}
31 counter iifnamecount {}
32 counter iifgroupcount {}
33 counter iiftypecount {}
36 counter imarkcounter {}
37 counter icpu0counter {}
41 counter oifcount {}
42 counter oifnamecount {}
44 counter oiftypecount {}
68 meta oif lo counter name "oifcount" counter
[all …]
/openbmc/linux/drivers/infiniband/core/
H A Dcounters.c96 if (qp->counter) in __rdma_counter_bind_qp()
152 counter = kzalloc(sizeof(*counter), GFP_KERNEL); in alloc_and_bind()
153 if (!counter) in alloc_and_bind()
160 counter->stats = dev->ops.counter_alloc_stats(counter); in alloc_and_bind()
243 struct rdma_counter *counter = qp->counter; in __rdma_counter_unbind_qp() local
302 if (counter && !kref_get_unless_zero(&counter->kref)) in rdma_get_counter_auto_mode()
315 counter->device->ops.counter_dealloc(counter); in counter_release()
341 if (counter) { in rdma_counter_bind_qp_auto()
363 struct rdma_counter *counter = qp->counter; in rdma_counter_unbind_qp() local
366 if (!counter) in rdma_counter_unbind_qp()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Dfs_counters.c126 return counter ? &counter->list : &fc_stats->counters; in mlx5_fc_counters_lookup_next()
223 kfree(counter); in mlx5_fc_free()
311 if (counter) in mlx5_fc_stats_work()
322 counter = kzalloc(sizeof(*counter), GFP_KERNEL); in mlx5_fc_single_alloc()
323 if (!counter) in mlx5_fc_single_alloc()
332 return counter; in mlx5_fc_single_alloc()
365 counter->lastbytes = counter->cache.bytes; in mlx5_fc_create_ex()
366 counter->lastpackets = counter->cache.packets; in mlx5_fc_create_ex()
382 return counter; in mlx5_fc_create_ex()
396 return counter; in mlx5_fc_create()
[all …]
/openbmc/linux/arch/arm/include/asm/
H A Datomic.h134 prefetchw(&v->counter); in arch_atomic_fetch_add_unless()
180 val = v->counter; \
193 val = v->counter; \
216 ret = v->counter; in arch_atomic_cmpxchg()
218 v->counter = new; in arch_atomic_cmpxchg()
254 s64 counter; member
267 : "r" (&v->counter), "Qo" (v->counter) in arch_atomic64_read()
277 : "=Qo" (v->counter) in arch_atomic64_set()
289 : "r" (&v->counter), "Qo" (v->counter) in arch_atomic64_read()
299 prefetchw(&v->counter); in arch_atomic64_set()
[all …]
/openbmc/linux/include/linux/
H A Dpage_counter.h47 static inline void page_counter_init(struct page_counter *counter, in page_counter_init() argument
50 atomic_long_set(&counter->usage, 0); in page_counter_init()
51 counter->max = PAGE_COUNTER_MAX; in page_counter_init()
52 counter->parent = parent; in page_counter_init()
55 static inline unsigned long page_counter_read(struct page_counter *counter) in page_counter_read() argument
57 return atomic_long_read(&counter->usage); in page_counter_read()
62 bool page_counter_try_charge(struct page_counter *counter,
69 static inline void page_counter_set_high(struct page_counter *counter, in page_counter_set_high() argument
72 WRITE_ONCE(counter->high, nr_pages); in page_counter_set_high()
79 static inline void page_counter_reset_watermark(struct page_counter *counter) in page_counter_reset_watermark() argument
[all …]
H A Dcounter.h157 int (*action_read)(struct counter_device *counter,
162 int (*count_u8_read)(struct counter_device *counter,
164 int (*signal_u8_read)(struct counter_device *counter,
191 int (*action_write)(struct counter_device *counter,
325 int (*signal_read)(struct counter_device *counter,
328 int (*count_read)(struct counter_device *counter,
330 int (*count_write)(struct counter_device *counter,
332 int (*function_read)(struct counter_device *counter,
338 int (*action_read)(struct counter_device *counter,
342 int (*action_write)(struct counter_device *counter,
[all …]
/openbmc/linux/arch/x86/kernel/cpu/
H A Dperfctr-watchdog.c110 unsigned int counter; in reserve_perfctr_nmi() local
112 counter = nmi_perfctr_msr_to_bit(msr); in reserve_perfctr_nmi()
114 if (counter > NMI_MAX_COUNTER_BITS) in reserve_perfctr_nmi()
125 unsigned int counter; in release_perfctr_nmi() local
127 counter = nmi_perfctr_msr_to_bit(msr); in release_perfctr_nmi()
129 if (counter > NMI_MAX_COUNTER_BITS) in release_perfctr_nmi()
132 clear_bit(counter, perfctr_nmi_owner); in release_perfctr_nmi()
138 unsigned int counter; in reserve_evntsel_nmi() local
142 if (counter > NMI_MAX_COUNTER_BITS) in reserve_evntsel_nmi()
153 unsigned int counter; in release_evntsel_nmi() local
[all …]
/openbmc/u-boot/include/asm-generic/
H A Datomic.h25 v->counter += i; in atomic_add()
34 v->counter -= i; in atomic_sub()
43 ++v->counter; in atomic_inc()
52 --v->counter; in atomic_dec()
62 val = v->counter; in atomic_dec_and_test()
75 val = v->counter; in atomic_add_negative()
98 v->counter += i; in atomic64_add()
107 v->counter -= i; in atomic64_sub()
118 v->counter += i; in atomic64_add()
127 v->counter -= i; in atomic64_sub()
[all …]
/openbmc/linux/arch/arm64/include/asm/
H A Darm_dsu_pmu.h53 static inline void __dsu_pmu_select_counter(int counter) in __dsu_pmu_select_counter() argument
55 write_sysreg_s(counter, CLUSTERPMSELR_EL1); in __dsu_pmu_select_counter()
59 static inline u64 __dsu_pmu_read_counter(int counter) in __dsu_pmu_read_counter() argument
61 __dsu_pmu_select_counter(counter); in __dsu_pmu_read_counter()
67 __dsu_pmu_select_counter(counter); in __dsu_pmu_write_counter()
74 __dsu_pmu_select_counter(counter); in __dsu_pmu_set_event()
92 write_sysreg_s(BIT(counter), CLUSTERPMCNTENCLR_EL1); in __dsu_pmu_disable_counter()
96 static inline void __dsu_pmu_enable_counter(int counter) in __dsu_pmu_enable_counter() argument
98 write_sysreg_s(BIT(counter), CLUSTERPMCNTENSET_EL1); in __dsu_pmu_enable_counter()
104 write_sysreg_s(BIT(counter), CLUSTERPMINTENSET_EL1); in __dsu_pmu_counter_interrupt_enable()
[all …]
/openbmc/linux/arch/x86/include/asm/
H A Datomic64_64.h15 return __READ_ONCE((v)->counter); in arch_atomic64_read()
20 __WRITE_ONCE(v->counter, i); in arch_atomic64_set()
26 : "=m" (v->counter) in arch_atomic64_add()
33 : "=m" (v->counter) in arch_atomic64_sub()
46 : "=m" (v->counter) in arch_atomic64_inc()
54 : "=m" (v->counter) in arch_atomic64_dec()
91 return xadd(&v->counter, i); in arch_atomic64_fetch_add()
97 return xadd(&v->counter, -i); in arch_atomic64_fetch_sub()
122 : "+m" (v->counter) in arch_atomic64_and()
140 : "+m" (v->counter) in arch_atomic64_or()
[all …]
H A Datomic.h23 return __READ_ONCE((v)->counter); in arch_atomic_read()
28 __WRITE_ONCE(v->counter, i); in arch_atomic_set()
34 : "+m" (v->counter) in arch_atomic_add()
41 : "+m" (v->counter) in arch_atomic_sub()
85 return i + xadd(&v->counter, i); in arch_atomic_add_return()
97 return xadd(&v->counter, i); in arch_atomic_fetch_add()
103 return xadd(&v->counter, -i); in arch_atomic_fetch_sub()
121 return arch_xchg(&v->counter, new); in arch_atomic_xchg()
128 : "+m" (v->counter) in arch_atomic_and()
146 : "+m" (v->counter) in arch_atomic_or()
[all …]
/openbmc/linux/mm/
H A Dpage_counter.c58 atomic_long_set(&counter->usage, new); in page_counter_cancel()
74 for (c = counter; c; c = c->parent) { in page_counter_charge()
103 for (c = counter; c; c = c->parent) { in page_counter_try_charge()
157 for (c = counter; c; c = c->parent) in page_counter_uncharge()
188 usage = page_counter_read(counter); in page_counter_set_max()
193 old = xchg(&counter->max, nr_pages); in page_counter_set_max()
198 counter->max = old; in page_counter_set_max()
214 WRITE_ONCE(counter->min, nr_pages); in page_counter_set_min()
216 for (c = counter; c; c = c->parent) in page_counter_set_min()
231 WRITE_ONCE(counter->low, nr_pages); in page_counter_set_low()
[all …]
/openbmc/linux/arch/powerpc/include/asm/
H A Datomic.h44 __asm__ __volatile__("stw %1,0(%2)" : "=m"(v->counter) : "r"(i), "b"(&v->counter)); in arch_atomic_set()
182 : "r" (&v->counter) in arch_atomic_dec_if_positive()
210 __asm__ __volatile__("std %1,0(%2)" : "=m"(v->counter) : "r"(i), "b"(&v->counter)); in arch_atomic64_set()
307 : "=&r" (t), "+m" (v->counter) in ATOMIC64_OPS()
308 : "r" (&v->counter) in ATOMIC64_OPS()
322 : "=&r" (t), "+m" (v->counter) in arch_atomic64_inc_return_relaxed()
323 : "r" (&v->counter) in arch_atomic64_inc_return_relaxed()
339 : "r" (&v->counter) in arch_atomic64_dec()
354 : "r" (&v->counter) in arch_atomic64_dec_return_relaxed()
381 : "r" (&v->counter) in arch_atomic64_dec_if_positive()
[all …]

12345678910>>...50