/linux/include/asm-generic/ |
A D | qrwlock.h | 42 int cnts; in queued_read_trylock() local 44 cnts = atomic_read(&lock->cnts); in queued_read_trylock() 46 cnts = (u32)atomic_add_return_acquire(_QR_BIAS, &lock->cnts); in queued_read_trylock() 61 int cnts; in queued_write_trylock() local 63 cnts = atomic_read(&lock->cnts); in queued_write_trylock() 64 if (unlikely(cnts)) in queued_write_trylock() 67 return likely(atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, in queued_write_trylock() 76 int cnts; in queued_read_lock() local 78 cnts = atomic_add_return_acquire(_QR_BIAS, &lock->cnts); in queued_read_lock() 92 int cnts = 0; in queued_write_lock() local [all …]
|
A D | qrwlock_types.h | 15 atomic_t cnts; member 30 { .cnts = ATOMIC_INIT(0), }, \
|
/linux/drivers/infiniband/hw/mlx5/ |
A D | counters.c | 177 return cnts->set_id; in mlx5_ib_get_counters_id() 186 num_hw_counters = cnts->num_q_counters + cnts->num_cong_counters + in do_alloc_stats() 205 const struct mlx5_ib_counters *cnts = &dev->port[0].cnts; in mlx5_ib_alloc_hw_device_stats() local 214 const struct mlx5_ib_counters *cnts = &dev->port[port_num - 1].cnts; in mlx5_ib_alloc_hw_port_stats() local 247 int offset = cnts->num_q_counters + cnts->num_cong_counters; in mlx5_ib_query_ext_ppcnt_counters() 291 ret = mlx5_ib_query_q_counters(dev->mdev, cnts, stats, cnts->set_id); in do_get_hw_stats() 366 num_hw_counters = cnts->num_q_counters + cnts->num_cong_counters + in do_get_op_stats() 387 num_hw_counters = cnts->num_q_counters + cnts->num_cong_counters + in mlx5_ib_get_hw_stats() 604 if (!cnts->descs) in __mlx5_ib_alloc_counters() 839 cnts = &dev->port[port - 1].cnts; in mlx5_ib_modify_stat() [all …]
|
A D | mlx5_ib.h | 864 struct mlx5_ib_counters cnts; member
|
/linux/kernel/locking/ |
A D | qrwlock.c | 32 atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); in queued_read_lock_slowpath() 35 atomic_sub(_QR_BIAS, &lock->cnts); in queued_read_lock_slowpath() 41 atomic_add(_QR_BIAS, &lock->cnts); in queued_read_lock_slowpath() 48 atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); in queued_read_lock_slowpath() 63 int cnts; in queued_write_lock_slowpath() local 69 if (!(cnts = atomic_read(&lock->cnts)) && in queued_write_lock_slowpath() 70 atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)) in queued_write_lock_slowpath() 74 atomic_or(_QW_WAITING, &lock->cnts); in queued_write_lock_slowpath() 78 cnts = atomic_cond_read_relaxed(&lock->cnts, VAL == _QW_WAITING); in queued_write_lock_slowpath() 79 } while (!atomic_try_cmpxchg_acquire(&lock->cnts, &cnts, _QW_LOCKED)); in queued_write_lock_slowpath()
|
/linux/arch/s390/include/asm/ |
A D | spinlock.h | 108 old = __atomic_add(1, &rw->cnts); in arch_read_lock() 115 __atomic_add_const_barrier(-1, &rw->cnts); in arch_read_unlock() 120 if (!__atomic_cmpxchg_bool(&rw->cnts, 0, 0x30000)) in arch_write_lock() 126 __atomic_add_barrier(-0x30000, &rw->cnts); in arch_write_unlock() 134 old = READ_ONCE(rw->cnts); in arch_read_trylock() 136 __atomic_cmpxchg_bool(&rw->cnts, old, old + 1)); in arch_read_trylock() 143 old = READ_ONCE(rw->cnts); in arch_write_trylock() 144 return !old && __atomic_cmpxchg_bool(&rw->cnts, 0, 0x30000); in arch_write_trylock()
|
A D | spinlock_types.h | 16 int cnts; member
|
/linux/drivers/counter/ |
A D | interrupt-cnt.c | 25 struct counter_count cnts; member 194 priv->cnts.name = "Channel 0 Count"; in interrupt_cnt_probe() 195 priv->cnts.functions_list = interrupt_cnt_functions; in interrupt_cnt_probe() 196 priv->cnts.num_functions = ARRAY_SIZE(interrupt_cnt_functions); in interrupt_cnt_probe() 197 priv->cnts.synapses = &priv->synapses; in interrupt_cnt_probe() 198 priv->cnts.num_synapses = 1; in interrupt_cnt_probe() 199 priv->cnts.ext = interrupt_cnt_ext; in interrupt_cnt_probe() 200 priv->cnts.num_ext = ARRAY_SIZE(interrupt_cnt_ext); in interrupt_cnt_probe() 206 priv->counter.counts = &priv->cnts; in interrupt_cnt_probe()
|
/linux/drivers/staging/rtl8712/ |
A D | rtl8712_efuse.c | 425 u16 cnts, u8 *data) in r8712_efuse_access() argument 432 if (!bRead && ((start_addr + cnts) > in r8712_efuse_access() 438 for (i = 0; i < cnts; i++) { in r8712_efuse_access() 459 if ((addr + cnts) > EFUSE_MAP_MAX_SIZE) in r8712_efuse_map_read() 462 for (i = 0; i < cnts; i++) in r8712_efuse_map_read() 474 if (idx == cnts) in r8712_efuse_map_read() 485 u8 r8712_efuse_map_write(struct _adapter *adapter, u16 addr, u16 cnts, in r8712_efuse_map_write() argument 492 if ((addr + cnts) > EFUSE_MAP_MAX_SIZE) in r8712_efuse_map_write() 526 if ((cnts - idx) == 1) { in r8712_efuse_map_write() 544 if (idx == cnts) in r8712_efuse_map_write() [all …]
|
A D | rtl871x_mp_ioctl.c | 669 u16 addr = 0, cnts = 0; in oid_rt_pro_read_efuse_hdl() local 678 cnts = pefuse->cnts; in oid_rt_pro_read_efuse_hdl() 680 memset(data, 0xFF, cnts); in oid_rt_pro_read_efuse_hdl() 681 if ((addr > 511) || (cnts < 1) || (cnts > 512) || (addr + cnts) > in oid_rt_pro_read_efuse_hdl() 684 if (!r8712_efuse_access(Adapter, true, addr, cnts, data)) in oid_rt_pro_read_efuse_hdl() 700 u16 addr = 0, cnts = 0; in oid_rt_pro_write_efuse_hdl() local 707 cnts = pefuse->cnts; in oid_rt_pro_write_efuse_hdl() 710 if ((addr > 511) || (cnts < 1) || (cnts > 512) || in oid_rt_pro_write_efuse_hdl() 711 (addr + cnts) > r8712_efuse_get_max_size(Adapter)) in oid_rt_pro_write_efuse_hdl() 713 if (!r8712_efuse_access(Adapter, false, addr, cnts, data)) in oid_rt_pro_write_efuse_hdl()
|
A D | rtl8712_efuse.h | 38 u16 start_addr, u16 cnts, u8 *data); 40 u16 cnts, u8 *data); 42 u16 cnts, u8 *data);
|
A D | rtl871x_mp_ioctl.h | 50 u16 cnts; member
|
/linux/arch/s390/lib/ |
A D | spinlock.c | 272 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait() 278 __atomic_add_const(-1, &rw->cnts); in arch_read_lock_wait() 282 __atomic_add_const(1, &rw->cnts); in arch_read_lock_wait() 284 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait() 295 __atomic_add(0x20000, &rw->cnts); in arch_write_lock_wait() 301 old = READ_ONCE(rw->cnts); in arch_write_lock_wait() 303 __atomic_cmpxchg_bool(&rw->cnts, old, old | 0x10000)) in arch_write_lock_wait()
|
/linux/drivers/bus/ |
A D | moxtet.c | 335 int cnts[TURRIS_MOX_MODULE_LAST]; in moxtet_find_topology() local 338 memset(cnts, 0, sizeof(cnts)); in moxtet_find_topology() 371 if (moxtet_set_irq(moxtet, i-1, id, cnts[id]++) < 0) in moxtet_find_topology()
|
/linux/drivers/net/dsa/ |
A D | vitesse-vsc73xx-core.c | 903 const struct vsc73xx_counter *cnts; in vsc73xx_find_counter() local 908 cnts = vsc73xx_tx_counters; in vsc73xx_find_counter() 911 cnts = vsc73xx_rx_counters; in vsc73xx_find_counter() 918 cnt = &cnts[i]; in vsc73xx_find_counter()
|