Home
last modified time | relevance | path

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

12345678910>>...37

/linux/drivers/counter/
A Dcounter-chrdev.c64 if (!counter->ops) in counter_chrdev_read()
77 !counter->ops); in counter_chrdev_read()
80 if (!counter->ops) in counter_chrdev_read()
101 if (!counter->ops) in counter_chrdev_poll()
197 &counter->events_list); in counter_enable_events()
200 err = counter->ops->events_configure(counter); in counter_enable_events()
218 err = counter->ops->events_configure(counter); in counter_disable_events()
253 ext = counter->ext; in counter_add_watch()
333 err = counter->ops->watch_validate(counter, &watch); in counter_add_watch()
356 if (!counter->ops) in counter_chrdev_ioctl()
[all …]
A Dcounter-core.c31 counter_chrdev_remove(counter); in counter_device_release()
76 if (counter->parent) { in counter_register()
77 dev->parent = counter->parent; in counter_register()
81 dev_set_drvdata(dev, counter); in counter_register()
98 counter_chrdev_remove(counter); in counter_register()
113 if (!counter) in counter_unregister()
116 cdev_device_del(&counter->chrdev, &counter->dev); in counter_unregister()
120 counter->ops = NULL; in counter_unregister()
121 wake_up(&counter->events_wait); in counter_unregister()
125 put_device(&counter->dev); in counter_unregister()
[all …]
A Dcounter-sysfs.c639 counter->signals + i); in counter_sysfs_signals_add()
755 count = counter->counts + i; in counter_sysfs_counts_add()
779 *val = counter->num_signals; in counter_num_signals_read()
785 *val = counter->num_counts; in counter_num_counts_read()
792 *val = kfifo_size(&counter->events); in counter_events_queue_size_read()
811 kfifo_free(&counter->events); in counter_events_queue_size_write()
812 counter->events.kfifo = events.kfifo; in counter_events_queue_size_write()
843 cattr_group += counter->num_signals; in counter_sysfs_attr_add()
849 cattr_group += counter->num_counts; in counter_sysfs_attr_add()
876 ext = &counter->ext[i]; in counter_sysfs_attr_add()
[all …]
A D104-quad-8.c55 struct counter_device counter; member
134 struct quad8 *const priv = counter->priv; in quad8_count_read()
166 struct quad8 *const priv = counter->priv; in quad8_count_write()
216 struct quad8 *const priv = counter->priv; in quad8_function_read()
1146 priv->counter.name = dev_name(dev); in quad8_probe()
1147 priv->counter.parent = dev; in quad8_probe()
1148 priv->counter.ops = &quad8_ops; in quad8_probe()
1149 priv->counter.counts = quad8_counts; in quad8_probe()
1151 priv->counter.signals = quad8_signals; in quad8_probe()
1153 priv->counter.priv = priv; in quad8_probe()
[all …]
A Dti-eqep.c85 struct counter_device counter; member
93 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_count_read()
105 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_count_write()
119 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_function_read()
146 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_function_write()
393 priv->counter.name = dev_name(dev); in ti_eqep_probe()
394 priv->counter.parent = dev; in ti_eqep_probe()
396 priv->counter.counts = ti_eqep_counts; in ti_eqep_probe()
400 priv->counter.priv = priv; in ti_eqep_probe()
412 err = counter_register(&priv->counter); in ti_eqep_probe()
[all …]
A Dinterrupt-cnt.c19 struct counter_device counter; member
40 struct interrupt_cnt_priv *priv = counter->priv; in interrupt_cnt_enable_read()
100 if (val != (typeof(priv->count.counter))val) in interrupt_cnt_write()
187 priv->counter.signals = &priv->signals; in interrupt_cnt_probe()
188 priv->counter.num_signals = 1; in interrupt_cnt_probe()
202 priv->counter.priv = priv; in interrupt_cnt_probe()
203 priv->counter.name = dev_name(dev); in interrupt_cnt_probe()
204 priv->counter.parent = dev; in interrupt_cnt_probe()
205 priv->counter.ops = &interrupt_cnt_ops; in interrupt_cnt_probe()
206 priv->counter.counts = &priv->cnts; in interrupt_cnt_probe()
[all …]
A Dstm32-lptimer-cnt.c23 struct counter_device counter; member
144 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_read()
429 priv->counter.name = dev_name(&pdev->dev); in stm32_lptim_cnt_probe()
430 priv->counter.parent = &pdev->dev; in stm32_lptim_cnt_probe()
431 priv->counter.ops = &stm32_lptim_cnt_ops; in stm32_lptim_cnt_probe()
433 priv->counter.counts = &stm32_lptim_enc_counts; in stm32_lptim_cnt_probe()
436 priv->counter.counts = &stm32_lptim_in1_counts; in stm32_lptim_cnt_probe()
437 priv->counter.num_signals = 1; in stm32_lptim_cnt_probe()
439 priv->counter.num_counts = 1; in stm32_lptim_cnt_probe()
440 priv->counter.signals = stm32_lptim_cnt_signals; in stm32_lptim_cnt_probe()
[all …]
A Dstm32-timer-cnt.c32 struct counter_device counter; member
50 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_read()
62 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_write()
76 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_function_read()
332 priv->counter.name = dev_name(dev); in stm32_timer_cnt_probe()
333 priv->counter.parent = dev; in stm32_timer_cnt_probe()
334 priv->counter.ops = &stm32_timer_cnt_ops; in stm32_timer_cnt_probe()
335 priv->counter.counts = &stm32_counts; in stm32_timer_cnt_probe()
336 priv->counter.num_counts = 1; in stm32_timer_cnt_probe()
337 priv->counter.signals = stm32_signals; in stm32_timer_cnt_probe()
[all …]
/linux/drivers/comedi/drivers/
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 …]
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 …]
/linux/drivers/infiniband/core/
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 …]
/linux/tools/testing/selftests/netfilter/
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 …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/
A Dfs_counters.c125 return counter ? &counter->list : &fc_stats->counters; in mlx5_fc_counters_lookup_next()
220 kfree(counter); in mlx5_fc_free()
266 if (counter) in mlx5_fc_stats_work()
277 counter = kzalloc(sizeof(*counter), GFP_KERNEL); in mlx5_fc_single_alloc()
278 if (!counter) in mlx5_fc_single_alloc()
287 return counter; in mlx5_fc_single_alloc()
320 counter->lastbytes = counter->cache.bytes; in mlx5_fc_create_ex()
321 counter->lastpackets = counter->cache.packets; in mlx5_fc_create_ex()
337 return counter; in mlx5_fc_create_ex()
351 return counter; in mlx5_fc_create()
[all …]
/linux/arch/arm/include/asm/
A Datomic.h134 prefetchw(&v->counter); in arch_atomic_fetch_add_unless()
180 val = v->counter; \
193 val = v->counter; \
206 ret = v->counter; in arch_atomic_cmpxchg()
208 v->counter = new; in arch_atomic_cmpxchg()
247 s64 counter; member
260 : "r" (&v->counter), "Qo" (v->counter) in arch_atomic64_read()
270 : "=Qo" (v->counter) in arch_atomic64_set()
282 : "r" (&v->counter), "Qo" (v->counter) in arch_atomic64_read()
292 prefetchw(&v->counter); in arch_atomic64_set()
[all …]
/linux/arch/powerpc/include/asm/
A Datomic.h131 : "r" (&v->counter) in ATOMIC_OPS()
146 : "r" (&v->counter) in arch_atomic_inc_return_relaxed()
162 : "r" (&v->counter) in arch_atomic_dec()
177 : "r" (&v->counter) in arch_atomic_dec_return_relaxed()
281 : "r" (&v->counter) in arch_atomic_inc_not_zero()
308 : "r" (&v->counter) in arch_atomic_dec_if_positive()
426 : "r" (&v->counter) in ATOMIC64_OPS()
441 : "r" (&v->counter) in arch_atomic64_inc_return_relaxed()
457 : "r" (&v->counter) in arch_atomic64_dec()
472 : "r" (&v->counter) in arch_atomic64_dec_return_relaxed()
[all …]
/linux/tools/perf/util/
A Dstat-display.c419 .evsel = counter, in printout()
447 if (counter->cgrp) in printout()
522 struct evsel *counter; in aggr_update_shadow() local
547 if (counter->uniquified_name || counter->use_config_name || in uniquify_event_name()
548 !counter->pmu_name || !strncmp(counter->name, counter->pmu_name, in uniquify_event_name()
556 free(counter->name); in uniquify_event_name()
562 counter->pmu_name, counter->name); in uniquify_event_name()
565 counter->name, counter->pmu_name); in uniquify_event_name()
569 free(counter->name); in uniquify_event_name()
780 buf[i].counter = counter; in sort_aggr_thread()
[all …]
/linux/include/linux/
A Dpage_counter.h45 static inline void page_counter_init(struct page_counter *counter, in page_counter_init() argument
48 atomic_long_set(&counter->usage, 0); in page_counter_init()
49 counter->max = PAGE_COUNTER_MAX; in page_counter_init()
50 counter->parent = parent; in page_counter_init()
53 static inline unsigned long page_counter_read(struct page_counter *counter) in page_counter_read() argument
55 return atomic_long_read(&counter->usage); in page_counter_read()
60 bool page_counter_try_charge(struct page_counter *counter,
67 static inline void page_counter_set_high(struct page_counter *counter, in page_counter_set_high() argument
70 WRITE_ONCE(counter->high, nr_pages); in page_counter_set_high()
77 static inline void page_counter_reset_watermark(struct page_counter *counter) in page_counter_reset_watermark() argument
[all …]
A Dcounter.h107 int (*action_read)(struct counter_device *counter,
112 int (*count_u8_read)(struct counter_device *counter,
114 int (*signal_u8_read)(struct counter_device *counter,
130 int (*action_write)(struct counter_device *counter,
253 int (*signal_read)(struct counter_device *counter,
256 int (*count_read)(struct counter_device *counter,
258 int (*count_write)(struct counter_device *counter,
260 int (*function_read)(struct counter_device *counter,
266 int (*action_read)(struct counter_device *counter,
270 int (*action_write)(struct counter_device *counter,
[all …]
/linux/arch/x86/include/asm/
A Datomic64_64.h22 return __READ_ONCE((v)->counter); in arch_atomic64_read()
34 __WRITE_ONCE(v->counter, i); in arch_atomic64_set()
47 : "=m" (v->counter) in arch_atomic64_add()
61 : "=m" (v->counter) in arch_atomic64_sub()
89 : "=m" (v->counter) in arch_atomic64_inc()
103 : "=m" (v->counter) in arch_atomic64_dec()
172 return xadd(&v->counter, i); in arch_atomic64_fetch_add()
178 return xadd(&v->counter, -i); in arch_atomic64_fetch_sub()
203 : "+m" (v->counter) in arch_atomic64_and()
221 : "+m" (v->counter) in arch_atomic64_or()
[all …]
A Datomic.h29 return __READ_ONCE((v)->counter); in arch_atomic_read()
41 __WRITE_ONCE(v->counter, i); in arch_atomic_set()
54 : "+m" (v->counter) in arch_atomic_add()
68 : "+m" (v->counter) in arch_atomic_sub()
165 return i + xadd(&v->counter, i); in arch_atomic_add_return()
184 return xadd(&v->counter, i); in arch_atomic_fetch_add()
190 return xadd(&v->counter, -i); in arch_atomic_fetch_sub()
208 return arch_xchg(&v->counter, new); in arch_atomic_xchg()
215 : "+m" (v->counter) in arch_atomic_and()
233 : "+m" (v->counter) in arch_atomic_or()
[all …]
/linux/arch/x86/kernel/cpu/
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 …]
/linux/mm/
A Dpage_counter.c59 atomic_long_set(&counter->usage, new); in page_counter_cancel()
75 for (c = counter; c; c = c->parent) { in page_counter_charge()
104 for (c = counter; c; c = c->parent) { in page_counter_try_charge()
159 for (c = counter; c; c = c->parent) in page_counter_uncharge()
190 usage = page_counter_read(counter); in page_counter_set_max()
195 old = xchg(&counter->max, nr_pages); in page_counter_set_max()
200 counter->max = old; in page_counter_set_max()
216 WRITE_ONCE(counter->min, nr_pages); in page_counter_set_min()
218 for (c = counter; c; c = c->parent) in page_counter_set_min()
233 WRITE_ONCE(counter->low, nr_pages); in page_counter_set_low()
[all …]
/linux/arch/arm64/include/asm/
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 …]
/linux/Documentation/ABI/testing/
A Dsysfs-bus-counter1 What: /sys/bus/counter/devices/counterX/countY/count
7 What: /sys/bus/counter/devices/counterX/countY/ceiling
12 respective counter.
14 What: /sys/bus/counter/devices/counterX/countY/floor
19 respective counter.
36 to the Count Y floor value. The counter freezes at
43 The counter is disabled whenever a counter overflow or
50 value and the Count Y ceiling value. The counter is
54 counter does not freeze at the boundary points, but
101 present at the channel Y counter inputs.
[all …]
/linux/include/asm-generic/
A Datomic.h24 c = v->counter; \
25 while ((old = arch_cmpxchg(&v->counter, c, c c_op i)) != c) \
34 c = v->counter; \
35 while ((old = arch_cmpxchg(&v->counter, c, c c_op i)) != c) \
46 c = v->counter; \
47 while ((old = arch_cmpxchg(&v->counter, c, c c_op i)) != c) \
63 v->counter = v->counter c_op i; \
74 ret = (v->counter = v->counter c_op i); \
87 ret = v->counter; \
88 v->counter = v->counter c_op i; \
[all …]

Completed in 55 milliseconds

12345678910>>...37