/linux-master/drivers/acpi/ |
H A D | acpi_lpit.c | 25 static int lpit_read_residency_counter_us(u64 *counter, bool io_mem) argument 38 *counter = div64_u64(count * 1000000ULL, residency_info_mem.frequency); 42 err = rdmsrl_safe(residency_info_ffh.gaddr.address, counter); 48 *counter &= mask; 49 *counter >>= residency_info_ffh.gaddr.bit_offset; 50 *counter = div64_u64(*counter * 1000000ULL, residency_info_ffh.frequency); 61 u64 counter; local 64 ret = lpit_read_residency_counter_us(&counter, true); 68 return sprintf(buf, "%llu\n", counter); 76 u64 counter; local [all...] |
/linux-master/scripts/ |
H A D | generate_initcall_order.pl | 42 # sort by the counter value to ensure the order of initcalls within 44 foreach my $counter (sort { $a <=> $b } keys(%{$initcalls})) { 45 my $level = $initcalls->{$counter}->{'level'}; 48 my $secname = $initcalls->{$counter}->{'module'} . '__' . 49 $counter . '_' . 50 $initcalls->{$counter}->{'line'} . '_' . 51 $initcalls->{$counter}->{'function'}; 121 my ($module, $counter, $line, $symbol) = $_ =~ 128 if (!defined($counter) || 141 $initcalls->{$counter} [all...] |
/linux-master/drivers/comedi/drivers/ |
H A D | ni_tio.h | 3 * Header file for NI general purpose counter support code (ni_tio.c) 104 void (*write)(struct ni_gpct *counter, unsigned int value, 106 unsigned int (*read)(struct ni_gpct *counter, enum ni_gpct_register); 118 void (*write)(struct ni_gpct *counter, 121 unsigned int (*read)(struct ni_gpct *counter, 128 void ni_tio_init_counter(struct ni_gpct *counter); 138 int ni_tio_cancel(struct ni_gpct *counter); 139 void ni_tio_handle_interrupt(struct ni_gpct *counter, 141 void ni_tio_set_mite_channel(struct ni_gpct *counter, 143 void ni_tio_acknowledge(struct ni_gpct *counter); [all...] |
/linux-master/arch/loongarch/include/asm/ |
H A D | local.h | 36 : "+ZB" (l->a.counter), "=&r" (result) 50 : "+ZB" (l->a.counter), "=&r" (result) 61 return cmpxchg_local(&l->a.counter, old, new); 66 return try_cmpxchg_local(&l->a.counter, 67 (typeof(l->a.counter) *) old, new); 146 #define __local_inc(l) ((l)->a.counter++) 147 #define __local_dec(l) ((l)->a.counter++) 148 #define __local_add(i, l) ((l)->a.counter += (i)) 149 #define __local_sub(i, l) ((l)->a.counter -= (i))
|
/linux-master/drivers/crypto/intel/qat/qat_common/ |
H A D | adf_sysfs_ras_counters.c | 16 unsigned long counter; local 22 counter = ADF_RAS_ERR_CTR_READ(accel_dev->ras_errors, ADF_RAS_CORR); 23 return scnprintf(buf, PAGE_SIZE, "%ld\n", counter); 31 unsigned long counter; local 37 counter = ADF_RAS_ERR_CTR_READ(accel_dev->ras_errors, ADF_RAS_UNCORR); 38 return scnprintf(buf, PAGE_SIZE, "%ld\n", counter); 46 unsigned long counter; local 52 counter = ADF_RAS_ERR_CTR_READ(accel_dev->ras_errors, ADF_RAS_FATAL); 53 return scnprintf(buf, PAGE_SIZE, "%ld\n", counter);
|
/linux-master/tools/testing/selftests/sync/ |
H A D | sync_stress_parallelism.c | 37 int counter; member in struct:__anon15382 61 ASSERT(test_data_two_threads.counter == i * 2 + thread_id, 63 test_data_two_threads.counter++; 85 test_data_two_threads.counter = 0; 90 * hammmering on the same counter. 104 ASSERT(test_data_two_threads.counter ==
|
/linux-master/tools/include/asm-generic/ |
H A D | atomic-gcc.h | 26 return READ_ONCE((v)->counter); 38 v->counter = i; 49 __sync_add_and_fetch(&v->counter, 1); 62 return __sync_sub_and_fetch(&v->counter, 1) == 0; 70 return cmpxchg(&(v)->counter, oldval, newval);
|
/linux-master/arch/sh/include/asm/ |
H A D | atomic-irq.h | 19 v->counter c_op i; \ 29 temp = v->counter; \ 31 v->counter = temp; \ 43 temp = v->counter; \ 44 v->counter c_op i; \
|
/linux-master/drivers/counter/ |
H A D | stm32-lptimer-cnt.c | 14 #include <linux/counter.h> 100 /* Setup LP timer encoder/counter and polarity, without prescaler */ 140 static int stm32_lptim_cnt_read(struct counter_device *counter, argument 143 struct stm32_lptim_cnt *const priv = counter_priv(counter); 156 static int stm32_lptim_cnt_function_read(struct counter_device *counter, argument 160 struct stm32_lptim_cnt *const priv = counter_priv(counter); 175 static int stm32_lptim_cnt_function_write(struct counter_device *counter, argument 179 struct stm32_lptim_cnt *const priv = counter_priv(counter); 198 static int stm32_lptim_cnt_enable_read(struct counter_device *counter, argument 202 struct stm32_lptim_cnt *const priv = counter_priv(counter); 214 stm32_lptim_cnt_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument 239 stm32_lptim_cnt_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) argument 250 stm32_lptim_cnt_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) argument 274 stm32_lptim_cnt_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument 318 stm32_lptim_cnt_action_write(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action action) argument 413 struct counter_device *counter; local [all...] |
H A D | microchip-tcb-capture.c | 8 #include <linux/counter.h> 68 static int mchp_tc_count_function_read(struct counter_device *counter, argument 72 struct mchp_tc_data *const priv = counter_priv(counter); 82 static int mchp_tc_count_function_write(struct counter_device *counter, argument 86 struct mchp_tc_data *const priv = counter_priv(counter); 129 /* Enable clock and trigger counter */ 144 static int mchp_tc_count_signal_read(struct counter_device *counter, argument 148 struct mchp_tc_data *const priv = counter_priv(counter); 164 static int mchp_tc_count_action_read(struct counter_device *counter, argument 169 struct mchp_tc_data *const priv = counter_priv(counter); 203 mchp_tc_count_action_write(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action action) argument 238 mchp_tc_count_read(struct counter_device *counter, struct counter_count *count, u64 *val) argument 307 struct counter_device *counter; local [all...] |
H A D | intel-qep.c | 11 #include <linux/counter.h> 108 static int intel_qep_count_read(struct counter_device *counter, argument 111 struct intel_qep *const qep = counter_priv(counter); 124 static int intel_qep_function_read(struct counter_device *counter, argument 137 static int intel_qep_action_read(struct counter_device *counter, argument 175 static int intel_qep_ceiling_read(struct counter_device *counter, argument 178 struct intel_qep *qep = counter_priv(counter); 187 static int intel_qep_ceiling_write(struct counter_device *counter, argument 190 struct intel_qep *qep = counter_priv(counter); 212 static int intel_qep_enable_read(struct counter_device *counter, argument 222 intel_qep_enable_write(struct counter_device *counter, struct counter_count *count, u8 val) argument 254 intel_qep_spike_filter_ns_read(struct counter_device *counter, struct counter_count *count, u64 *length) argument 275 intel_qep_spike_filter_ns_write(struct counter_device *counter, struct counter_count *count, u64 length) argument 324 intel_qep_preset_enable_read(struct counter_device *counter, struct counter_count *count, u8 *preset_enable) argument 340 intel_qep_preset_enable_write(struct counter_device *counter, struct counter_count *count, u8 val) argument 394 struct counter_device *counter; local [all...] |
H A D | stm32-timer-cnt.c | 10 #include <linux/counter.h> 59 static int stm32_count_read(struct counter_device *counter, argument 62 struct stm32_timer_cnt *const priv = counter_priv(counter); 71 static int stm32_count_write(struct counter_device *counter, argument 74 struct stm32_timer_cnt *const priv = counter_priv(counter); 84 static int stm32_count_function_read(struct counter_device *counter, argument 88 struct stm32_timer_cnt *const priv = counter_priv(counter); 111 static int stm32_count_function_write(struct counter_device *counter, argument 115 struct stm32_timer_cnt *const priv = counter_priv(counter); 157 static int stm32_count_direction_read(struct counter_device *counter, argument 171 stm32_count_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) argument 184 stm32_count_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) argument 199 stm32_count_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) argument 212 stm32_count_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument 238 stm32_count_prescaler_read(struct counter_device *counter, struct counter_count *count, u64 *prescaler) argument 251 stm32_count_prescaler_write(struct counter_device *counter, struct counter_count *count, u64 prescaler) argument 265 stm32_count_cap_read(struct counter_device *counter, struct counter_count *count, size_t ch, u64 *cap) argument 299 stm32_count_nb_ovf_read(struct counter_device *counter, struct counter_count *count, u64 *val) argument 312 stm32_count_nb_ovf_write(struct counter_device *counter, struct counter_count *count, u64 val) argument 347 stm32_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument 411 stm32_count_capture_configure(struct counter_device *counter, unsigned int ch, bool enable) argument 449 stm32_count_events_configure(struct counter_device *counter) argument 491 stm32_count_watch_validate(struct counter_device *counter, const struct counter_watch *watch) argument 524 stm32_count_clk_get_freq(struct counter_device *counter, struct counter_signal *signal, u64 *freq) argument 613 struct counter_device *counter = ptr; local 714 struct counter_device *counter; local [all...] |
H A D | 104-quad-8.c | 10 #include <linux/counter.h> 215 static int quad8_signal_read(struct counter_device *counter, argument 219 const struct quad8 *const priv = counter_priv(counter); 235 static int quad8_count_read(struct counter_device *counter, argument 238 struct quad8 *const priv = counter_priv(counter); 283 static int quad8_count_write(struct counter_device *counter, argument 286 struct quad8 *const priv = counter_priv(counter); 345 static int quad8_function_read(struct counter_device *counter, argument 349 struct quad8 *const priv = counter_priv(counter); 362 static int quad8_function_write(struct counter_device *counter, argument 410 quad8_direction_read(struct counter_device *counter, struct counter_count *count, enum counter_count_direction *direction) argument 439 quad8_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument 504 quad8_events_configure(struct counter_device *counter) argument 557 quad8_watch_validate(struct counter_device *counter, const struct counter_watch *watch) argument 596 quad8_index_polarity_get(struct counter_device *counter, struct counter_signal *signal, u32 *index_polarity) argument 608 quad8_index_polarity_set(struct counter_device *counter, struct counter_signal *signal, u32 index_polarity) argument 627 quad8_polarity_read(struct counter_device *counter, struct counter_signal *signal, enum counter_signal_polarity *polarity) argument 644 quad8_polarity_write(struct counter_device *counter, struct counter_signal *signal, enum counter_signal_polarity polarity) argument 659 quad8_synchronous_mode_get(struct counter_device *counter, struct counter_signal *signal, u32 *synchronous_mode) argument 671 quad8_synchronous_mode_set(struct counter_device *counter, struct counter_signal *signal, u32 synchronous_mode) argument 699 quad8_count_floor_read(struct counter_device *counter, struct counter_count *count, u64 *floor) argument 708 quad8_count_mode_read(struct counter_device *counter, struct counter_count *count, enum counter_count_mode *cnt_mode) argument 732 quad8_count_mode_write(struct counter_device *counter, struct counter_count *count, enum counter_count_mode cnt_mode) argument 769 quad8_count_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) argument 779 quad8_count_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument 800 quad8_error_noise_get(struct counter_device *counter, struct counter_count *count, u32 *noise_error) argument 815 quad8_count_preset_read(struct counter_device *counter, struct counter_count *count, u64 *preset) argument 825 quad8_count_preset_write(struct counter_device *counter, struct counter_count *count, u64 preset) argument 845 quad8_count_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) argument 869 quad8_count_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) argument 898 quad8_count_preset_enable_read(struct counter_device *counter, struct counter_count *count, u8 *preset_enable) argument 910 quad8_count_preset_enable_write(struct counter_device *counter, struct counter_count *count, u8 preset_enable) argument 929 quad8_signal_cable_fault_read(struct counter_device *counter, struct counter_signal *signal, u8 *cable_fault) argument 962 quad8_signal_cable_fault_enable_read(struct counter_device *counter, struct counter_signal *signal, u8 *enable) argument 974 quad8_signal_cable_fault_enable_write(struct counter_device *counter, struct counter_signal *signal, u8 enable) argument 1001 quad8_signal_fck_prescaler_read(struct counter_device *counter, struct counter_signal *signal, u8 *prescaler) argument 1026 quad8_signal_fck_prescaler_write(struct counter_device *counter, struct counter_signal *signal, u8 prescaler) argument 1193 struct counter_device *counter = private; local 1277 struct counter_device *counter; local [all...] |
/linux-master/tools/testing/selftests/kvm/riscv/ |
H A D | sbi_pmu_test.c | 93 static void start_counter(unsigned long counter, unsigned long start_flags, argument 98 ret = sbi_ecall(SBI_EXT_PMU, SBI_EXT_PMU_COUNTER_START, counter, 1, start_flags, 100 __GUEST_ASSERT(ret.error == 0, "Unable to start counter %ld\n", counter); 103 /* This should be invoked only for reset counter use case */ 104 static void stop_reset_counter(unsigned long counter, unsigned long stop_flags) argument 108 ret = sbi_ecall(SBI_EXT_PMU, SBI_EXT_PMU_COUNTER_STOP, counter, 1, 111 "Unable to stop counter %ld\n", counter); 114 static void stop_counter(unsigned long counter, unsigne argument 258 unsigned long counter; local 306 unsigned long counter; local 359 unsigned long counter; local [all...] |
/linux-master/net/dccp/ccids/lib/ |
H A D | loss_interval.h | 38 * @counter: Current count of entries (can be more than %LIH_SIZE) 43 u8 counter; member in struct:tfrc_loss_hist 54 return lh->counter > 0; 59 return min(lh->counter, (u8)LIH_SIZE);
|
/linux-master/arch/arc/include/asm/ |
H A D | spinlock.h | 87 * if (rw->counter > 0) { 88 * rw->counter--; 101 : [rwlock] "r" (&(rw->counter)), 116 " sub %[val], %[val], 1 \n" /* counter-- */ 125 : [rwlock] "r" (&(rw->counter)), 144 * if (rw->counter == __ARCH_RW_LOCK_UNLOCKED__) { 145 * rw->counter = 0; 158 : [rwlock] "r" (&(rw->counter)), 183 : [rwlock] "r" (&(rw->counter)), 200 * rw->counter [all...] |
H A D | atomic-spinlock.h | 25 WRITE_ONCE(v->counter, i); 37 v->counter c_op i; \ 51 temp = v->counter; \ 53 v->counter = temp; \ 69 orig = v->counter; \ 70 v->counter c_op i; \
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | sk_storage_omem_uncharge.c | 31 if (sk->sk_cookie.counter != cookie) 35 omem = sk->sk_omem_alloc.counter; 46 if (!cookie || sk->sk_cookie.counter != cookie)
|
/linux-master/tools/perf/util/bpf_skel/ |
H A D | bpf_prog_profiler.bpf.c | 60 if (before && before->counter) { 63 diff.counter = after->counter - before->counter; 69 accum->counter += diff.counter;
|
/linux-master/arch/openrisc/include/asm/ |
H A D | atomic.h | 14 /* Atomically perform op with v->counter and i */ 27 : "r"(&v->counter), "r"(i) \ 31 /* Atomically perform op with v->counter and i, return the result */ 44 : "r"(&v->counter), "r"(i) \ 50 /* Atomically perform op with v->counter and i, return orig v->counter */ 63 : "r"(&v->counter), "r"(i) \ 102 * Atomically add a to v->counter as long as v is not already u. 103 * Returns the original value at v->counter. 121 : "r"(&v->counter), " [all...] |
/linux-master/arch/parisc/include/asm/ |
H A D | spinlock.h | 74 * The spinlock itself is contained in @counter and access to it is 91 if (rw->counter > 0) { 92 rw->counter--; 117 if (rw->counter == __ARCH_RW_LOCK_UNLOCKED__) { 118 rw->counter = 0; 145 rw->counter++; 156 rw->counter = __ARCH_RW_LOCK_UNLOCKED__;
|
/linux-master/arch/csky/include/asm/ |
H A D | atomic.h | 18 return READ_ONCE(v->counter); 22 WRITE_ONCE(v->counter, i); 36 : "r" (i), "r" (&v->counter) \ 60 : "r" (i), "r"(&v->counter) \ 120 : "r" (a), "r" (&v->counter), "r" (u) 144 : "r" (&v->counter) 169 : "r" (&v->counter) 191 : "r" (&v->counter)
|
/linux-master/arch/riscv/include/asm/ |
H A D | atomic.h | 29 return READ_ONCE(v->counter); 33 WRITE_ONCE(v->counter, i); 40 return READ_ONCE(v->counter); 44 WRITE_ONCE(v->counter, i); 59 : "+A" (v->counter) \ 95 : "+A" (v->counter), "=r" (ret) \ 106 : "+A" (v->counter), "=r" (ret) \ 198 #define _arch_atomic_fetch_add_unless(_prev, _rc, counter, _a, _u, sfx) \ 208 : [p]"=&r" (_prev), [rc]"=&r" (_rc), [c]"+A" (counter) \ 218 _arch_atomic_fetch_add_unless(prev, rc, v->counter, [all...] |
/linux-master/drivers/vdpa/mlx5/net/ |
H A D | debug.c | 55 struct mlx5_vdpa_counter *counter = file->private; local 60 err = mlx5_fc_query(counter->mdev, counter->counter, &packets, &bytes); 70 struct mlx5_vdpa_counter *counter = file->private; local 75 err = mlx5_fc_query(counter->mdev, counter->counter, &packets, &bytes); 86 static void add_counter_node(struct mlx5_vdpa_counter *counter, argument 89 debugfs_create_file("packets", 0444, parent, counter, [all...] |
/linux-master/arch/arm/include/asm/xen/ |
H A D | events.h | 22 counter), (val))
|