/Linux-v5.10/drivers/misc/mei/ |
D | dma-ring.c | 171 u32 rd_idx, rem, slots; in mei_dma_ring_read() local 182 rd_idx = READ_ONCE(ctrl->dbuf_rd_idx) & (dbuf_depth - 1); in mei_dma_ring_read() 189 if (rd_idx + slots > dbuf_depth) { in mei_dma_ring_read() 190 buf += mei_dma_copy_from(dev, buf, rd_idx, dbuf_depth - rd_idx); in mei_dma_ring_read() 191 rem = slots - (dbuf_depth - rd_idx); in mei_dma_ring_read() 192 rd_idx = 0; in mei_dma_ring_read() 197 mei_dma_copy_from(dev, buf, rd_idx, rem); in mei_dma_ring_read() 216 u32 wr_idx, rd_idx, hbuf_depth, empty; in mei_dma_ring_empty_slots() local 226 rd_idx = READ_ONCE(ctrl->hbuf_rd_idx); in mei_dma_ring_empty_slots() 229 if (rd_idx > wr_idx) in mei_dma_ring_empty_slots() [all …]
|
/Linux-v5.10/drivers/scsi/snic/ |
D | snic_trc.c | 43 if (trc->wr_idx != trc->rd_idx) { in snic_get_trc_buf() 49 trc->rd_idx++; in snic_get_trc_buf() 50 if (trc->rd_idx == trc->max_idx) in snic_get_trc_buf() 51 trc->rd_idx = 0; in snic_get_trc_buf() 96 if (trc->rd_idx == trc->wr_idx) { in snic_get_trc_data() 101 td = &trc->buf[trc->rd_idx]; in snic_get_trc_data() 110 trc->rd_idx++; in snic_get_trc_data() 111 if (trc->rd_idx == trc->max_idx) in snic_get_trc_data() 112 trc->rd_idx = 0; in snic_get_trc_data() 144 trc->rd_idx = trc->wr_idx = 0; in snic_trc_init()
|
D | snic_trc.h | 46 u32 rd_idx; member
|
/Linux-v5.10/drivers/scsi/fnic/ |
D | fnic_trace.c | 85 if (fnic_trace_entries.wr_idx == fnic_trace_entries.rd_idx) { in fnic_trace_get_buf() 86 fnic_trace_entries.rd_idx++; in fnic_trace_get_buf() 87 if (fnic_trace_entries.rd_idx >= fnic_max_trace_entries) in fnic_trace_get_buf() 88 fnic_trace_entries.rd_idx = 0; in fnic_trace_get_buf() 109 int rd_idx; in fnic_get_trace_data() local 118 rd_idx = fnic_trace_entries.rd_idx; in fnic_get_trace_data() 120 if (wr_idx < rd_idx) { in fnic_get_trace_data() 124 fnic_trace_entries.page_offset[rd_idx]; in fnic_get_trace_data() 148 rd_idx++; in fnic_get_trace_data() 153 if (rd_idx > (fnic_max_trace_entries-1)) in fnic_get_trace_data() [all …]
|
D | fnic_trace.h | 50 int rd_idx; member
|
/Linux-v5.10/drivers/net/ethernet/cavium/liquidio/ |
D | octeon_console.c | 739 u32 rd_idx) in octeon_console_free_bytes() argument 741 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_free_bytes() 744 return ((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size; in octeon_console_free_bytes() 749 u32 rd_idx) in octeon_console_avail_bytes() argument 751 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_avail_bytes() 755 octeon_console_free_bytes(buffer_size, wr_idx, rd_idx); in octeon_console_avail_bytes() 762 u32 rd_idx, wr_idx; in octeon_console_read() local 776 rd_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read() 782 wr_idx, rd_idx); in octeon_console_read() 791 if (rd_idx + bytes_to_read >= console->buffer_size) in octeon_console_read() [all …]
|
/Linux-v5.10/drivers/net/ethernet/marvell/prestera/ |
D | prestera_pci.c | 93 u32 rd_idx; member 152 #define PRESTERA_EVTQ_RD_IDX_REG(q) PRESTERA_EVTQ_REG_OFFSET(q, rd_idx) 205 u32 rd_idx = prestera_fw_read(fw, PRESTERA_EVTQ_RD_IDX_REG(qid)); in prestera_fw_evtq_avail() local 207 return CIRC_CNT(wr_idx, rd_idx, prestera_fw_evtq_len(fw, qid)); in prestera_fw_evtq_avail() 213 u32 rd_idx = idx & (prestera_fw_evtq_len(fw, qid) - 1); in prestera_fw_evtq_rd_set() local 215 prestera_fw_write(fw, PRESTERA_EVTQ_RD_IDX_REG(qid), rd_idx); in prestera_fw_evtq_rd_set() 225 u32 rd_idx = prestera_fw_read(fw, PRESTERA_EVTQ_RD_IDX_REG(qid)); in prestera_fw_evtq_read32() local 228 val = readl(prestera_fw_evtq_buf(fw, qid) + rd_idx); in prestera_fw_evtq_read32() 229 prestera_fw_evtq_rd_set(fw, qid, rd_idx + 4); in prestera_fw_evtq_read32() 458 u32 rd_idx; in prestera_ldr_wait_buf() local [all …]
|
/Linux-v5.10/drivers/media/platform/qcom/venus/ |
D | hfi_venus.c | 169 u32 empty_space, rd_idx, wr_idx, qsize; in venus_write_queue() local 185 rd_idx = qhdr->read_idx; in venus_write_queue() 191 if (wr_idx >= rd_idx) in venus_write_queue() 192 empty_space = qsize - (wr_idx - rd_idx); in venus_write_queue() 194 empty_space = rd_idx - wr_idx; in venus_write_queue() 237 u32 rd_idx, wr_idx, type, qsize; in venus_read_queue() local 250 rd_idx = qhdr->read_idx; in venus_read_queue() 267 if (rd_idx == wr_idx) { in venus_read_queue() 275 rd_ptr = (u32 *)(queue->qmem.kva + (rd_idx << 2)); in venus_read_queue() 280 new_rd_idx = rd_idx + dwords; in venus_read_queue() [all …]
|
/Linux-v5.10/drivers/media/radio/wl128x/ |
D | fmdrv_common.c | 798 if (rds->wr_idx == rds->rd_idx) { in fm_irq_handle_rdsdata_getcmd_resp() 801 rds->rd_idx = 0; in fm_irq_handle_rdsdata_getcmd_resp() 810 if (rds->wr_idx != rds->rd_idx) in fm_irq_handle_rdsdata_getcmd_resp() 1053 if (fmdev->rx.rds.rd_idx != fmdev->rx.rds.wr_idx) in fmc_is_rds_data_available() 1068 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff() 1073 (fmdev->rx.rds.wr_idx != fmdev->rx.rds.rd_idx)); in fmc_transfer_rds_from_internal_buff() 1086 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff() 1090 memcpy(tmpbuf, &fmdev->rx.rds.buff[fmdev->rx.rds.rd_idx], in fmc_transfer_rds_from_internal_buff() 1092 fmdev->rx.rds.rd_idx += FM_RDS_BLK_SIZE; in fmc_transfer_rds_from_internal_buff() 1093 if (fmdev->rx.rds.rd_idx >= fmdev->rx.rds.buf_size) in fmc_transfer_rds_from_internal_buff() [all …]
|
D | fmdrv.h | 118 u32 rd_idx; member
|
D | fmdrv_rx.c | 20 fmdev->rx.rds.rd_idx = 0; in fm_rx_reset_rds_cache() 723 fmdev->rx.rds.rd_idx = 0; in fm_rx_set_rds_mode()
|
/Linux-v5.10/drivers/rapidio/devices/ |
D | tsi721_dma.c | 421 u32 idx, rd_idx; in tsi721_submit_sg() local 440 rd_idx = ioread32(bdma_chan->regs + TSI721_DMAC_DRDCNT); in tsi721_submit_sg() 441 rd_idx %= (bdma_chan->bd_num + 1); in tsi721_submit_sg() 451 bdma_chan->id, rd_idx, idx); in tsi721_submit_sg() 484 if (i && idx == rd_idx) { in tsi721_submit_sg()
|
/Linux-v5.10/drivers/irqchip/ |
D | irq-gic-v3-its.c | 1042 u64 rd_idx, to_idx, linear_idx; in its_wait_for_range_completion() local 1055 rd_idx = readl_relaxed(its->base + GITS_CREADR); in its_wait_for_range_completion() 1061 delta = rd_idx - prev_idx; in its_wait_for_range_completion() 1062 if (rd_idx < prev_idx) in its_wait_for_range_completion() 1075 prev_idx = rd_idx; in its_wait_for_range_completion() 1092 u64 rd_idx; \ 1114 rd_idx = readl_relaxed(its->base + GITS_CREADR); \ 1118 if (its_wait_for_range_completion(its, rd_idx, next_cmd)) \
|