/Linux-v4.19/include/linux/ |
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))
|
D | serial_core.h | 434 (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE))
|
/Linux-v4.19/net/rxrpc/ |
D | call_accept.c | 61 tmp = CIRC_CNT(call_head, call_tail, size); in rxrpc_service_prealloc_one() 70 if (CIRC_CNT(head, tail, size) < max) { in rxrpc_service_prealloc_one() 81 if (CIRC_CNT(head, tail, size) < max) { in rxrpc_service_prealloc_one() 207 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 215 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 229 while (CIRC_CNT(head, tail, size) > 0) { in rxrpc_discard_prealloc() 265 call_count = CIRC_CNT(call_head, call_tail, RXRPC_BACKLOG_MAX); in rxrpc_alloc_incoming_call() 268 conn_count = CIRC_CNT(conn_head, conn_tail, RXRPC_BACKLOG_MAX); in rxrpc_alloc_incoming_call() 272 ASSERTCMP(CIRC_CNT(peer_head, peer_tail, RXRPC_BACKLOG_MAX), >=, in rxrpc_alloc_incoming_call()
|
/Linux-v4.19/arch/ia64/hp/sim/ |
D | simserial.c | 162 count = min(CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE), in transmit_chars() 171 count = CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); in transmit_chars() 220 if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) && in rs_write() 238 return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); in rs_chars_in_buffer()
|
/Linux-v4.19/drivers/platform/chrome/ |
D | cros_ec_debugfs.c | 157 while (!CIRC_CNT(cb->head, cb->tail, LOG_SIZE)) { in cros_ec_console_log_read() 166 CIRC_CNT(cb->head, cb->tail, LOG_SIZE)); in cros_ec_console_log_read() 200 if (CIRC_CNT(debug_info->log_buffer.head, in cros_ec_console_log_poll()
|
/Linux-v4.19/drivers/crypto/caam/ |
D | jr.c | 182 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) { in caam_jr_dequeue() 190 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); in caam_jr_dequeue() 228 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 && in caam_jr_dequeue()
|
/Linux-v4.19/drivers/dma/ioat/ |
D | dma.h | 328 return CIRC_CNT(ioat_chan->head, ioat_chan->tail, in ioat_ring_active() 335 return CIRC_CNT(ioat_chan->head, ioat_chan->issued, in ioat_ring_pending()
|
/Linux-v4.19/Documentation/core-api/ |
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-v4.19/drivers/tty/ |
D | ehv_bytechan.c | 410 count = CIRC_CNT(bc->head, bc->tail, BUF_SIZE); in ehv_bc_tx_dequeue() 415 if (CIRC_CNT(bc->head, bc->tail, BUF_SIZE)) in ehv_bc_tx_dequeue()
|
D | amiserial.c | 363 if (CIRC_CNT(info->xmit.head, in transmit_chars() 892 return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); in rs_chars_in_buffer()
|
/Linux-v4.19/drivers/misc/mic/scif/ |
D | scif_rb.c | 25 #define scif_rb_ring_cnt(head, tail, size) CIRC_CNT(head, tail, size)
|
/Linux-v4.19/drivers/gpu/drm/msm/ |
D | msm_rd.c | 79 (CIRC_CNT((circ)->head, (circ)->tail, BUF_SZ))
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_debugfs_crc.c | 136 return CIRC_CNT(crc->head, crc->tail, DRM_CRC_ENTRIES_NR); in crtc_crc_data_count()
|
/Linux-v4.19/drivers/scsi/arcmsr/ |
D | arcmsr_attr.c | 87 allxfer_len = CIRC_CNT(head, tail, ARCMSR_MAX_QBUFFER); in arcmsr_sysfs_iop_message_read()
|
/Linux-v4.19/tools/power/acpi/tools/acpidbg/ |
D | acpidbg.c | 45 (CIRC_CNT((circ)->head, (circ)->tail, ACPI_AML_BUF_SIZE))
|
/Linux-v4.19/drivers/edac/ |
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-v4.19/drivers/hwtracing/coresight/ |
D | coresight-tmc-etf.c | 418 to_read = CIRC_CNT(write_ptr, read_ptr, drvdata->size); in tmc_update_etf_buffer()
|
D | coresight-etb10.c | 400 to_read = CIRC_CNT(write_ptr, read_ptr, drvdata->buffer_depth); in etb_update_buffer()
|
/Linux-v4.19/drivers/net/ethernet/cadence/ |
D | macb_ptp.c | 343 while (CIRC_CNT(head, tail, PTP_TS_BUFFER_SIZE)) { in gem_tx_timestamp_flush()
|
/Linux-v4.19/drivers/acpi/ |
D | acpi_dbg.c | 31 (CIRC_CNT((circ)->head, (circ)->tail, ACPI_AML_BUF_SIZE))
|
/Linux-v4.19/drivers/net/ethernet/hisilicon/ |
D | hix5hd2_gmac.c | 524 num = CIRC_CNT(end, start, RX_DESC_NUM); in hix5hd2_rx() 606 num = CIRC_CNT(end, start, TX_DESC_NUM); in hix5hd2_xmit_reclaim()
|
/Linux-v4.19/drivers/net/wireless/quantenna/qtnfmac/pearl/ |
D | pcie.c | 625 while (CIRC_CNT(tx_done_index, i, priv->tx_bd_num)) { in qtnf_pcie_data_tx_reclaim() 1025 CIRC_CNT(priv->tx_bd_w_index, priv->tx_bd_r_index, in qtnf_dbg_hdp_stats()
|
/Linux-v4.19/drivers/lightnvm/ |
D | pblk-rb.c | 155 #define pblk_rb_ring_count(head, tail, size) CIRC_CNT(head, tail, size)
|
/Linux-v4.19/drivers/dma/qcom/ |
D | bam_dma.c | 809 avail = CIRC_CNT(offset, bchan->head, MAX_DESCRIPTORS + 1); in process_channel_irqs()
|
/Linux-v4.19/drivers/net/ethernet/calxeda/ |
D | xgmac.c | 409 #define dma_ring_cnt(h, t, s) CIRC_CNT(h, t, s)
|