Home
last modified time | relevance | path

Searched full:counter (Results 1 – 25 of 6342) sorted by relevance

12345678910>>...254

/kernel/linux/linux-6.6/drivers/counter/
Dcounter-core.c3 * Generic Counter interface
7 #include <linux/counter.h>
22 #include "counter-chrdev.h"
23 #include "counter-sysfs.h"
25 #define COUNTER_NAME "counter"
27 /* Provides a unique ID for each counter device */
31 struct counter_device counter; member
42 struct counter_device *const counter = in counter_device_release() local
45 counter_chrdev_remove(counter); in counter_device_release()
48 kfree(container_of(counter, struct counter_device_allochelper, counter)); in counter_device_release()
[all …]
Dcounter-chrdev.c3 * Generic Counter character device interface
7 #include <linux/counter.h>
24 #include "counter-chrdev.h"
68 struct counter_device *const counter = filp->private_data; in counter_chrdev_read() local
72 if (!counter->ops) in counter_chrdev_read()
79 if (kfifo_is_empty(&counter->events)) { in counter_chrdev_read()
83 err = wait_event_interruptible(counter->events_wait, in counter_chrdev_read()
84 !kfifo_is_empty(&counter->events) || in counter_chrdev_read()
85 !counter->ops); in counter_chrdev_read()
88 if (!counter->ops) in counter_chrdev_read()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/prestera/
Dprestera_counter.c50 static void prestera_counter_lock(struct prestera_counter *counter) in prestera_counter_lock() argument
52 mutex_lock(&counter->mtx); in prestera_counter_lock()
55 static void prestera_counter_unlock(struct prestera_counter *counter) in prestera_counter_unlock() argument
57 mutex_unlock(&counter->mtx); in prestera_counter_unlock()
89 prestera_counter_block_lookup_not_full(struct prestera_counter *counter, in prestera_counter_block_lookup_not_full() argument
94 prestera_counter_lock(counter); in prestera_counter_block_lookup_not_full()
95 for (i = 0; i < counter->block_list_len; i++) { in prestera_counter_block_lookup_not_full()
96 if (counter->block_list[i] && in prestera_counter_block_lookup_not_full()
97 counter->block_list[i]->client == client && in prestera_counter_block_lookup_not_full()
98 !counter->block_list[i]->full && in prestera_counter_block_lookup_not_full()
[all …]
/kernel/linux/linux-6.6/tools/testing/selftests/netfilter/
Dnft_meta.sh30 counter iifcount {}
31 counter iifnamecount {}
32 counter iifgroupcount {}
33 counter iiftypecount {}
34 counter infproto4count {}
35 counter il4protocounter {}
36 counter imarkcounter {}
37 counter icpu0counter {}
38 counter ilastyearcounter {}
39 counter icurrentyearcounter {}
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/netfilter/
Dnft_meta.sh30 counter iifcount {}
31 counter iifnamecount {}
32 counter iifgroupcount {}
33 counter iiftypecount {}
34 counter infproto4count {}
35 counter il4protocounter {}
36 counter imarkcounter {}
37 counter icpu0counter {}
38 counter ilastyearcounter {}
39 counter icurrentyearcounter {}
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/core/
Dcounters.c31 * into manual mode if there's any counter, so that the user is able to
71 struct rdma_counter *counter; in rdma_counter_alloc() local
77 counter = kzalloc(sizeof(*counter), GFP_KERNEL); in rdma_counter_alloc()
78 if (!counter) in rdma_counter_alloc()
81 counter->device = dev; in rdma_counter_alloc()
82 counter->port = port; in rdma_counter_alloc()
84 rdma_restrack_new(&counter->res, RDMA_RESTRACK_COUNTER); in rdma_counter_alloc()
85 counter->stats = dev->ops.counter_alloc_stats(counter); in rdma_counter_alloc()
86 if (!counter->stats) in rdma_counter_alloc()
101 counter->mode.mode = mode; in rdma_counter_alloc()
[all …]
/kernel/linux/linux-6.6/drivers/infiniband/core/
Dcounters.c37 * Return 0 on success. If counter mode wasn't changed then it is considered
78 static void auto_mode_init_counter(struct rdma_counter *counter, in auto_mode_init_counter() argument
82 struct auto_mode_param *param = &counter->mode.param; in auto_mode_init_counter()
84 counter->mode.mode = RDMA_COUNTER_MODE_AUTO; in auto_mode_init_counter()
85 counter->mode.mask = new_mask; in auto_mode_init_counter()
91 static int __rdma_counter_bind_qp(struct rdma_counter *counter, in __rdma_counter_bind_qp() argument
96 if (qp->counter) in __rdma_counter_bind_qp()
102 mutex_lock(&counter->lock); in __rdma_counter_bind_qp()
103 ret = qp->device->ops.counter_bind_qp(counter, qp); in __rdma_counter_bind_qp()
104 mutex_unlock(&counter->lock); in __rdma_counter_bind_qp()
[all …]
/kernel/linux/linux-6.6/Documentation/ABI/testing/
Dsysfs-bus-counter1 What: /sys/bus/counter/devices/counterX/cascade_counts_enable
5 Indicates the cascading of Counts on Counter X.
9 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select
14 Counter X.
24 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_available
31 What: /sys/bus/counter/devices/counterX/countY/count
37 What: /sys/bus/counter/devices/counterX/countY/capture
43 What: /sys/bus/counter/devices/counterX/countY/ceiling
48 respective counter.
50 What: /sys/bus/counter/devices/counterX/countY/floor
[all …]
/kernel/linux/linux-5.10/drivers/staging/comedi/drivers/
Dni_tio.c22 * originally based on the counter code from ni_660x.c and
145 * @counter: struct ni_gpct counter.
149 void ni_tio_write(struct ni_gpct *counter, unsigned int value, in ni_tio_write() argument
153 counter->counter_dev->write(counter, value, reg); in ni_tio_write()
159 * @counter: struct ni_gpct counter.
162 unsigned int ni_tio_read(struct ni_gpct *counter, enum ni_gpct_register reg) in ni_tio_read() argument
165 return counter->counter_dev->read(counter, reg); in ni_tio_read()
170 static void ni_tio_reset_count_and_disarm(struct ni_gpct *counter) in ni_tio_reset_count_and_disarm() argument
172 unsigned int cidx = counter->counter_index; in ni_tio_reset_count_and_disarm()
174 ni_tio_write(counter, GI_RESET(cidx), NITIO_RESET_REG(cidx)); in ni_tio_reset_count_and_disarm()
[all …]
Dni_tiocmd.c38 static void ni_tio_configure_dma(struct ni_gpct *counter, in ni_tio_configure_dma() argument
41 struct ni_gpct_device *counter_dev = counter->counter_dev; in ni_tio_configure_dma()
42 unsigned int cidx = counter->counter_index; in ni_tio_configure_dma()
55 ni_tio_set_bits(counter, NITIO_INPUT_SEL_REG(cidx), mask, bits); in ni_tio_configure_dma()
69 ni_tio_set_bits(counter, NITIO_DMA_CFG_REG(cidx), mask, bits); in ni_tio_configure_dma()
78 struct ni_gpct *counter = s->private; in ni_tio_input_inttrig() local
86 spin_lock_irqsave(&counter->lock, flags); in ni_tio_input_inttrig()
87 if (counter->mite_chan) in ni_tio_input_inttrig()
88 mite_dma_arm(counter->mite_chan); in ni_tio_input_inttrig()
91 spin_unlock_irqrestore(&counter->lock, flags); in ni_tio_input_inttrig()
[all …]
/kernel/linux/linux-6.6/drivers/comedi/drivers/
Dni_tio.c22 * originally based on the counter code from ni_660x.c and
145 * @counter: struct ni_gpct counter.
149 void ni_tio_write(struct ni_gpct *counter, unsigned int value, in ni_tio_write() argument
153 counter->counter_dev->write(counter, value, reg); in ni_tio_write()
159 * @counter: struct ni_gpct counter.
162 unsigned int ni_tio_read(struct ni_gpct *counter, enum ni_gpct_register reg) in ni_tio_read() argument
165 return counter->counter_dev->read(counter, reg); in ni_tio_read()
170 static void ni_tio_reset_count_and_disarm(struct ni_gpct *counter) in ni_tio_reset_count_and_disarm() argument
172 unsigned int cidx = counter->counter_index; in ni_tio_reset_count_and_disarm()
174 ni_tio_write(counter, GI_RESET(cidx), NITIO_RESET_REG(cidx)); in ni_tio_reset_count_and_disarm()
[all …]
Dni_tiocmd.c38 static void ni_tio_configure_dma(struct ni_gpct *counter, in ni_tio_configure_dma() argument
41 struct ni_gpct_device *counter_dev = counter->counter_dev; in ni_tio_configure_dma()
42 unsigned int cidx = counter->counter_index; in ni_tio_configure_dma()
55 ni_tio_set_bits(counter, NITIO_INPUT_SEL_REG(cidx), mask, bits); in ni_tio_configure_dma()
69 ni_tio_set_bits(counter, NITIO_DMA_CFG_REG(cidx), mask, bits); in ni_tio_configure_dma()
78 struct ni_gpct *counter = s->private; in ni_tio_input_inttrig() local
86 spin_lock_irqsave(&counter->lock, flags); in ni_tio_input_inttrig()
87 if (counter->mite_chan) in ni_tio_input_inttrig()
88 mite_dma_arm(counter->mite_chan); in ni_tio_input_inttrig()
91 spin_unlock_irqrestore(&counter->lock, flags); in ni_tio_input_inttrig()
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/westmereex/
Dpipeline.json4 "Counter": "0,1,2,3", string
13 "Counter": "0,1,2,3", string
23 "Counter": "0,1,2,3", string
31 "Counter": "0,1,2,3", string
39 "Counter": "0,1,2,3", string
47 "Counter": "0,1,2,3", string
55 "Counter": "0,1,2,3", string
63 "Counter": "0,1,2,3", string
71 "Counter": "0,1,2,3", string
79 "Counter": "0,1,2,3", string
[all …]
Dcache.json4 "Counter": "0,1", string
12 "Counter": "0,1", string
20 "Counter": "0,1", string
28 "Counter": "0,1", string
36 "Counter": "0,1", string
44 "Counter": "0,1", string
52 "Counter": "0,1", string
60 "Counter": "0,1", string
68 "Counter": "0,1", string
76 "Counter": "0,1", string
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/westmereep-dp/
Dpipeline.json4 "Counter": "0,1,2,3", string
13 "Counter": "0,1,2,3", string
23 "Counter": "0,1,2,3", string
31 "Counter": "0,1,2,3", string
39 "Counter": "0,1,2,3", string
47 "Counter": "0,1,2,3", string
55 "Counter": "0,1,2,3", string
63 "Counter": "0,1,2,3", string
71 "Counter": "0,1,2,3", string
79 "Counter": "0,1,2,3", string
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/westmereep-sp/
Dpipeline.json4 "Counter": "0,1,2,3", string
13 "Counter": "0,1,2,3", string
23 "Counter": "0,1,2,3", string
31 "Counter": "0,1,2,3", string
39 "Counter": "0,1,2,3", string
47 "Counter": "0,1,2,3", string
55 "Counter": "0,1,2,3", string
63 "Counter": "0,1,2,3", string
71 "Counter": "0,1,2,3", string
79 "Counter": "0,1,2,3", string
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/nehalemex/
Dpipeline.json4 "Counter": "0,1,2,3", string
13 "Counter": "0,1,2,3", string
23 "Counter": "0,1,2,3", string
31 "Counter": "0,1,2,3", string
39 "Counter": "0,1,2,3", string
47 "Counter": "0,1,2,3", string
55 "Counter": "0,1,2,3", string
63 "Counter": "0,1,2,3", string
71 "Counter": "0,1,2,3", string
79 "Counter": "0,1,2,3", string
[all …]
Dcache.json4 "Counter": "0,1", string
12 "Counter": "0,1", string
20 "Counter": "0,1", string
28 "Counter": "0,1", string
36 "Counter": "0,1", string
44 "Counter": "0,1", string
52 "Counter": "0,1", string
60 "Counter": "0,1", string
68 "Counter": "0,1", string
76 "Counter": "0,1", string
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/nehalemep/
Dpipeline.json4 "Counter": "0,1,2,3", string
13 "Counter": "0,1,2,3", string
23 "Counter": "0,1,2,3", string
31 "Counter": "0,1,2,3", string
39 "Counter": "0,1,2,3", string
47 "Counter": "0,1,2,3", string
55 "Counter": "0,1,2,3", string
63 "Counter": "0,1,2,3", string
71 "Counter": "0,1,2,3", string
79 "Counter": "0,1,2,3", string
[all …]
Dcache.json4 "Counter": "0,1", string
12 "Counter": "0,1", string
20 "Counter": "0,1", string
28 "Counter": "0,1", string
36 "Counter": "0,1", string
44 "Counter": "0,1", string
52 "Counter": "0,1", string
60 "Counter": "0,1", string
68 "Counter": "0,1", string
76 "Counter": "0,1", string
[all …]
/kernel/linux/linux-5.10/tools/perf/pmu-events/arch/x86/bonnell/
Dcache.json4 "Counter": "0,1", string
12 "Counter": "0,1", string
20 "Counter": "0,1", string
28 "Counter": "0,1", string
36 "Counter": "0,1", string
44 "Counter": "0,1", string
52 "Counter": "0,1", string
60 "Counter": "0,1", string
68 "Counter": "0,1", string
76 "Counter": "0,1", string
[all …]
Dother.json4 "Counter": "0,1", string
12 "Counter": "0,1", string
20 "Counter": "0,1", string
28 "Counter": "0,1", string
36 "Counter": "0,1", string
44 "Counter": "0,1", string
52 "Counter": "0,1", string
60 "Counter": "0,1", string
68 "Counter": "0,1", string
76 "Counter": "0,1", string
[all …]
/kernel/linux/linux-6.6/Documentation/driver-api/
Dgeneric-counter.rst4 Generic Counter Interface
10 Counter devices are prevalent among a diverse spectrum of industries.
13 resolve the issue of duplicate code found among existing counter device
14 drivers by introducing a generic counter interface for consumption. The
15 Generic Counter interface enables drivers to support and expose a common
16 set of components and functionality present in counter devices.
21 Counter devices can vary greatly in design, but regardless of whether
23 counter devices consist of a core set of components. This core set of
24 components, shared by all counter devices, is what forms the essence of
25 the Generic Counter interface.
[all …]
/kernel/linux/linux-6.6/mm/
Dpage_counter.c45 * page_counter_cancel - take pages out of the local counter
46 * @counter: counter
49 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages) in page_counter_cancel() argument
53 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel()
58 atomic_long_set(&counter->usage, new); in page_counter_cancel()
60 propagate_protected_usage(counter, new); in page_counter_cancel()
65 * @counter: counter
68 * NOTE: This does not consider any configured counter limits.
70 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages) in page_counter_charge() argument
74 for (c = counter; c; c = c->parent) { in page_counter_charge()
[all …]
/kernel/linux/linux-5.10/mm/
Dpage_counter.c46 * page_counter_cancel - take pages out of the local counter
47 * @counter: counter
50 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages) in page_counter_cancel() argument
54 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel()
55 propagate_protected_usage(counter, new); in page_counter_cancel()
62 * @counter: counter
65 * NOTE: This does not consider any configured counter limits.
67 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages) in page_counter_charge() argument
71 for (c = counter; c; c = c->parent) { in page_counter_charge()
87 * @counter: counter
[all …]

12345678910>>...254