/linux/net/rxrpc/ |
A D | call_accept.c | 63 tmp = CIRC_CNT(call_head, call_tail, size); in rxrpc_service_prealloc_one() 72 if (CIRC_CNT(head, tail, size) < max) { in rxrpc_service_prealloc_one() 83 if (CIRC_CNT(head, tail, size) < max) { in rxrpc_service_prealloc_one() 198 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 207 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 221 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 276 call_count = CIRC_CNT(call_head, call_tail, RXRPC_BACKLOG_MAX); in rxrpc_alloc_incoming_call() 279 conn_count = CIRC_CNT(conn_head, conn_tail, RXRPC_BACKLOG_MAX); in rxrpc_alloc_incoming_call() 283 ASSERTCMP(CIRC_CNT(peer_head, peer_tail, RXRPC_BACKLOG_MAX), >=, in rxrpc_alloc_incoming_call()
|
/linux/include/linux/ |
A D | circ_buf.h | 16 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) macro 21 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
|
A D | serial_core.h | 424 (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE))
|
/linux/drivers/platform/chrome/ |
A D | cros_ec_debugfs.c | 136 while (!CIRC_CNT(cb->head, cb->tail, LOG_SIZE)) { in cros_ec_console_log_read() 145 CIRC_CNT(cb->head, cb->tail, LOG_SIZE)); in cros_ec_console_log_read() 179 if (CIRC_CNT(debug_info->log_buffer.head, in cros_ec_console_log_poll()
|
/linux/drivers/crypto/caam/ |
A D | jr.c | 222 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) { in caam_jr_dequeue() 230 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); in caam_jr_dequeue() 270 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 && in caam_jr_dequeue()
|
/linux/drivers/dma/ioat/ |
A D | dma.h | 316 return CIRC_CNT(ioat_chan->head, ioat_chan->tail, in ioat_ring_active() 323 return CIRC_CNT(ioat_chan->head, ioat_chan->issued, in ioat_ring_pending()
|
/linux/drivers/net/wireless/quantenna/qtnfmac/pcie/ |
A D | topaz_pcie.c | 407 if (CIRC_CNT(priv->tx_bd_w_index, tx_done_index, priv->tx_bd_num)) in qtnf_topaz_data_tx_reclaim() 411 while (CIRC_CNT(tx_done_index, i, priv->tx_bd_num)) { in qtnf_topaz_data_tx_reclaim() 782 CIRC_CNT(priv->tx_bd_w_index, priv->tx_bd_r_index, in qtnf_dbg_pkt_stats() 785 CIRC_CNT(tx_done_index, priv->tx_bd_r_index, in qtnf_dbg_pkt_stats() 788 CIRC_CNT(priv->tx_bd_w_index, tx_done_index, in qtnf_dbg_pkt_stats()
|
A D | pearl_pcie.c | 482 while (CIRC_CNT(tx_done_index, i, priv->tx_bd_num)) { in qtnf_pearl_data_tx_reclaim() 892 CIRC_CNT(priv->tx_bd_w_index, priv->tx_bd_r_index, in qtnf_dbg_hdp_stats()
|
/linux/Documentation/core-api/ |
A D | circular-buffers.rst | 97 CIRC_CNT(head_index, tail_index, buffer_size); 121 (2) CIRC_CNT*() are intended to be used in the consumer. To the consumer they 203 if (CIRC_CNT(head, tail, buffer->size) >= 1) {
|
/linux/drivers/tty/ |
A D | ehv_bytechan.c | 425 count = CIRC_CNT(bc->head, bc->tail, BUF_SIZE); in ehv_bc_tx_dequeue() 430 if (CIRC_CNT(bc->head, bc->tail, BUF_SIZE)) in ehv_bc_tx_dequeue()
|
A D | amiserial.c | 289 if (CIRC_CNT(info->xmit.head, in transmit_chars() 802 return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); in rs_chars_in_buffer()
|
/linux/drivers/infiniband/hw/hfi1/ |
A D | tid_rdma.c | 1480 CIRC_CNT(req->setup_head, clear_tail, MAX_FLOWS) >= in hfi1_kern_exp_rcv_setup() 1564 if (!CIRC_CNT(req->setup_head, req->clear_tail, MAX_FLOWS)) in hfi1_kern_exp_rcv_clear() 1689 for ( ; CIRC_CNT(head, tail, MAX_FLOWS); in find_flow_ib() 2129 CIRC_CNT(req->flow_idx, req->clear_tail, in tid_rdma_rcv_error() 2144 if (CIRC_CNT(req->setup_head, req->flow_idx, in tid_rdma_rcv_error() 2173 CIRC_CNT(req->flow_idx, in tid_rdma_rcv_error() 3140 for (; CIRC_CNT(req->setup_head, fidx, MAX_FLOWS); in hfi1_tid_rdma_restart_req() 4669 CIRC_CNT(rptr->setup_head, fidx, in hfi1_rc_rcv_tid_rdma_ack() 4941 CIRC_CNT(req->setup_head, flow_idx, in hfi1_rc_rcv_tid_rdma_resync() 5118 if (!CIRC_CNT(req->setup_head, req->clear_tail, in hfi1_make_tid_rdma_pkt() [all …]
|
A D | ipoib_tx.c | 368 CIRC_CNT(head, tail, tx_ring->max_items)); in hfi1_ipoib_send_dma_common()
|
/linux/drivers/gpu/drm/ |
A D | drm_debugfs_crc.c | 181 return CIRC_CNT(crc->head, crc->tail, DRM_CRC_ENTRIES_NR); in crtc_crc_data_count()
|
/linux/drivers/gpu/drm/msm/ |
A D | msm_rd.c | 71 (CIRC_CNT((circ)->head, (circ)->tail, BUF_SZ))
|
/linux/drivers/edac/ |
A D | thunderx_edac.c | 593 while (CIRC_CNT(lmc->ring_head, lmc->ring_tail, in thunderx_lmc_threaded_isr() 1124 while (CIRC_CNT(ocx->com_ring_head, ocx->com_ring_tail, in thunderx_ocx_com_threaded_isr() 1205 while (CIRC_CNT(ocx->link_ring_head, ocx->link_ring_tail, in thunderx_ocx_lnk_threaded_isr() 1890 while (CIRC_CNT(l2c->ring_head, l2c->ring_tail, in thunderx_l2c_threaded_isr()
|
/linux/drivers/scsi/arcmsr/ |
A D | arcmsr_attr.c | 85 allxfer_len = CIRC_CNT(head, tail, ARCMSR_MAX_QBUFFER); in arcmsr_sysfs_iop_message_read()
|
/linux/tools/power/acpi/tools/acpidbg/ |
A D | acpidbg.c | 42 (CIRC_CNT((circ)->head, (circ)->tail, ACPI_AML_BUF_SIZE))
|
/linux/drivers/net/ethernet/cadence/ |
A D | macb_ptp.c | 351 while (CIRC_CNT(head, tail, PTP_TS_BUFFER_SIZE)) { in gem_tx_timestamp_flush()
|
/linux/drivers/hwtracing/coresight/ |
A D | coresight-tmc-etf.c | 487 to_read = CIRC_CNT(write_ptr, read_ptr, drvdata->size); in tmc_update_etf_buffer()
|
A D | coresight-etb10.c | 485 to_read = CIRC_CNT(write_ptr, read_ptr, drvdata->buffer_depth); in etb_update_buffer()
|
/linux/drivers/acpi/ |
A D | acpi_dbg.c | 28 (CIRC_CNT((circ)->head, (circ)->tail, ACPI_AML_BUF_SIZE))
|
/linux/drivers/char/hw_random/ |
A D | cctrng.c | 238 cnt_w = CIRC_CNT(drvdata->circ.head, in cctrng_read()
|
/linux/drivers/net/ethernet/hisilicon/ |
A D | hix5hd2_gmac.c | 520 num = CIRC_CNT(end, start, RX_DESC_NUM); in hix5hd2_rx() 602 num = CIRC_CNT(end, start, TX_DESC_NUM); in hix5hd2_xmit_reclaim()
|
/linux/drivers/net/ethernet/marvell/prestera/ |
A D | prestera_pci.c | 241 return CIRC_CNT(wr_idx, rd_idx, prestera_fw_evtq_len(fw, qid)); in prestera_fw_evtq_avail()
|