Home
last modified time | relevance | path

Searched refs:rd_idx (Results 1 – 22 of 22) sorted by relevance

/linux-6.6.21/drivers/misc/mei/
Ddma-ring.c171 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-6.6.21/drivers/scsi/fnic/
Dfnic_trace.c71 if (fnic_trace_entries.wr_idx == fnic_trace_entries.rd_idx) { in fnic_trace_get_buf()
72 fnic_trace_entries.rd_idx++; in fnic_trace_get_buf()
73 if (fnic_trace_entries.rd_idx >= fnic_max_trace_entries) in fnic_trace_get_buf()
74 fnic_trace_entries.rd_idx = 0; in fnic_trace_get_buf()
95 int rd_idx; in fnic_get_trace_data() local
104 rd_idx = fnic_trace_entries.rd_idx; in fnic_get_trace_data()
106 if (wr_idx < rd_idx) { in fnic_get_trace_data()
110 fnic_trace_entries.page_offset[rd_idx]; in fnic_get_trace_data()
134 rd_idx++; in fnic_get_trace_data()
139 if (rd_idx > (fnic_max_trace_entries-1)) in fnic_get_trace_data()
[all …]
Dfnic_trace.h36 int rd_idx; member
/linux-6.6.21/drivers/scsi/snic/
Dsnic_trc.c29 if (trc->wr_idx != trc->rd_idx) { in snic_get_trc_buf()
35 trc->rd_idx++; in snic_get_trc_buf()
36 if (trc->rd_idx == trc->max_idx) in snic_get_trc_buf()
37 trc->rd_idx = 0; in snic_get_trc_buf()
82 if (trc->rd_idx == trc->wr_idx) { in snic_get_trc_data()
87 td = &trc->buf[trc->rd_idx]; in snic_get_trc_data()
96 trc->rd_idx++; in snic_get_trc_data()
97 if (trc->rd_idx == trc->max_idx) in snic_get_trc_data()
98 trc->rd_idx = 0; in snic_get_trc_data()
130 trc->rd_idx = trc->wr_idx = 0; in snic_trc_init()
Dsnic_trc.h32 u32 rd_idx; member
/linux-6.6.21/drivers/net/ethernet/cavium/liquidio/
Docteon_console.c738 u32 rd_idx) in octeon_console_free_bytes() argument
740 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_free_bytes()
743 return ((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size; in octeon_console_free_bytes()
748 u32 rd_idx) in octeon_console_avail_bytes() argument
750 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_avail_bytes()
754 octeon_console_free_bytes(buffer_size, wr_idx, rd_idx); in octeon_console_avail_bytes()
761 u32 rd_idx, wr_idx; in octeon_console_read() local
775 rd_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read()
781 wr_idx, rd_idx); in octeon_console_read()
790 if (rd_idx + bytes_to_read >= console->buffer_size) in octeon_console_read()
[all …]
/linux-6.6.21/drivers/misc/bcm-vk/
Dbcm_vk_msg.c90 u32 wr_idx, rd_idx; in msgq_occupied() local
93 rd_idx = readl_relaxed(&msgq->rd_idx); in msgq_occupied()
95 return ((wr_idx - rd_idx) & qinfo->q_mask); in msgq_occupied()
487 readl_relaxed(&msgq->rd_idx), in bcm_vk_sync_msgq()
668 readl_relaxed(&msgq->rd_idx), in bcm_to_v_msg_enqueue()
785 u32 rd_idx, wr_idx; in bcm_to_h_msg_dequeue() local
807 rd_idx = readl_relaxed(&msgq->rd_idx); in bcm_to_h_msg_dequeue()
811 while ((rd_idx != wr_idx) && !exit_loop) { in bcm_to_h_msg_dequeue()
822 src = msgq_blk_addr(qinfo, rd_idx & qinfo->q_mask); in bcm_to_h_msg_dequeue()
825 if ((rd_idx >= qinfo->q_size) || in bcm_to_h_msg_dequeue()
[all …]
Dbcm_vk_dev.c254 log.buf_size, log.mask, log.rd_idx, log.wr_idx); in bcm_vk_dump_peer_log()
262 if ((log.rd_idx > log_info->mask) || in bcm_vk_dump_peer_log()
270 log.rd_idx, log.wr_idx); in bcm_vk_dump_peer_log()
277 while (log.rd_idx != log.wr_idx) { in bcm_vk_dump_peer_log()
278 loc_buf[cnt] = vkread8(vk, BAR_2, data_offset + log.rd_idx); in bcm_vk_dump_peer_log()
287 log.rd_idx = (log.rd_idx + 1) & log.mask; in bcm_vk_dump_peer_log()
290 vkwrite32(vk, log.rd_idx, BAR_2, in bcm_vk_dump_peer_log()
291 vk->peerlog_off + offsetof(struct bcm_vk_peer_log, rd_idx)); in bcm_vk_dump_peer_log()
420 (vk->peerlog_info.rd_idx > vk->peerlog_info.mask) || in bcm_vk_get_card_info()
425 vk->peerlog_info.rd_idx, in bcm_vk_get_card_info()
[all …]
Dbcm_vk_msg.h18 u32 rd_idx; /* read idx */ member
Dbcm_vk.h310 u32 rd_idx; member
/linux-6.6.21/drivers/net/ethernet/marvell/prestera/
Dprestera_pci.c98 u32 rd_idx; member
177 #define PRESTERA_EVTQ_RD_IDX_REG(q) PRESTERA_EVTQ_REG_OFFSET(q, rd_idx)
250 u32 rd_idx = prestera_fw_read(fw, PRESTERA_EVTQ_RD_IDX_REG(qid)); in prestera_fw_evtq_avail() local
252 return CIRC_CNT(wr_idx, rd_idx, prestera_fw_evtq_len(fw, qid)); in prestera_fw_evtq_avail()
258 u32 rd_idx = idx & (prestera_fw_evtq_len(fw, qid) - 1); in prestera_fw_evtq_rd_set() local
260 prestera_fw_write(fw, PRESTERA_EVTQ_RD_IDX_REG(qid), rd_idx); in prestera_fw_evtq_rd_set()
270 u32 rd_idx = prestera_fw_read(fw, PRESTERA_EVTQ_RD_IDX_REG(qid)); in prestera_fw_evtq_read32() local
273 val = readl(prestera_fw_evtq_buf(fw, qid) + rd_idx); in prestera_fw_evtq_read32()
274 prestera_fw_evtq_rd_set(fw, qid, rd_idx + 4); in prestera_fw_evtq_read32()
550 u32 rd_idx; in prestera_ldr_wait_buf() local
[all …]
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfdk/
Drings.c20 int nr_frags, rd_idx; in nfp_nfdk_tx_ring_reset() local
23 rd_idx = D_IDX(tx_ring, tx_ring->rd_p); in nfp_nfdk_tx_ring_reset()
24 txbuf = &tx_ring->ktxbufs[rd_idx]; in nfp_nfdk_tx_ring_reset()
/linux-6.6.21/drivers/media/platform/qcom/venus/
Dhfi_venus.c168 u32 empty_space, rd_idx, wr_idx, qsize; in venus_write_queue() local
184 rd_idx = qhdr->read_idx; in venus_write_queue()
190 if (wr_idx >= rd_idx) in venus_write_queue()
191 empty_space = qsize - (wr_idx - rd_idx); in venus_write_queue()
193 empty_space = rd_idx - wr_idx; in venus_write_queue()
241 u32 rd_idx, wr_idx, type, qsize; in venus_read_queue() local
254 rd_idx = qhdr->read_idx; in venus_read_queue()
271 if (rd_idx == wr_idx) { in venus_read_queue()
279 rd_ptr = (u32 *)(queue->qmem.kva + (rd_idx << 2)); in venus_read_queue()
289 new_rd_idx = rd_idx + dwords; in venus_read_queue()
[all …]
/linux-6.6.21/drivers/media/radio/wl128x/
Dfmdrv_common.c799 if (rds->wr_idx == rds->rd_idx) { in fm_irq_handle_rdsdata_getcmd_resp()
802 rds->rd_idx = 0; in fm_irq_handle_rdsdata_getcmd_resp()
811 if (rds->wr_idx != rds->rd_idx) in fm_irq_handle_rdsdata_getcmd_resp()
1054 if (fmdev->rx.rds.rd_idx != fmdev->rx.rds.wr_idx) in fmc_is_rds_data_available()
1069 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff()
1074 (fmdev->rx.rds.wr_idx != fmdev->rx.rds.rd_idx)); in fmc_transfer_rds_from_internal_buff()
1087 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff()
1091 memcpy(tmpbuf, &fmdev->rx.rds.buff[fmdev->rx.rds.rd_idx], in fmc_transfer_rds_from_internal_buff()
1093 fmdev->rx.rds.rd_idx += FM_RDS_BLK_SIZE; in fmc_transfer_rds_from_internal_buff()
1094 if (fmdev->rx.rds.rd_idx >= fmdev->rx.rds.buf_size) in fmc_transfer_rds_from_internal_buff()
[all …]
Dfmdrv.h118 u32 rd_idx; member
Dfmdrv_rx.c20 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-6.6.21/arch/riscv/kernel/probes/
Dsimulate-insn.c110 u32 rd_idx = auipc_rd_idx(opcode); in simulate_auipc() local
113 if (!rv_insn_reg_set_val(regs, rd_idx, rd_val)) in simulate_auipc()
/linux-6.6.21/drivers/net/wwan/t7xx/
Dt7xx_hif_dpmaif.c42 unsigned int t7xx_ring_buf_rd_wr_count(unsigned int total_cnt, unsigned int rd_idx, in t7xx_ring_buf_rd_wr_count() argument
48 pkt_cnt = wr_idx - rd_idx; in t7xx_ring_buf_rd_wr_count()
50 pkt_cnt = rd_idx - wr_idx - 1; in t7xx_ring_buf_rd_wr_count()
Dt7xx_hif_dpmaif.h199 unsigned int t7xx_ring_buf_rd_wr_count(unsigned int total_cnt, unsigned int rd_idx,
Dt7xx_dpmaif.c1189 unsigned int wr_idx, rd_idx; in t7xx_dpmaif_hw_stop_all_rxq() local
1206 rd_idx = ioread32(hw_info->pcie_base + DPMAIF_AO_DL_PIT_RD_IDX); in t7xx_dpmaif_hw_stop_all_rxq()
1207 rd_idx &= DPMAIF_DL_RD_WR_IDX_MSK; in t7xx_dpmaif_hw_stop_all_rxq()
1209 if (wr_idx == rd_idx) in t7xx_dpmaif_hw_stop_all_rxq()
/linux-6.6.21/drivers/rapidio/devices/
Dtsi721_dma.c421 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-6.6.21/drivers/irqchip/
Dirq-gic-v3-its.c1072 u64 rd_idx, to_idx, linear_idx; in its_wait_for_range_completion() local
1085 rd_idx = readl_relaxed(its->base + GITS_CREADR); in its_wait_for_range_completion()
1091 delta = rd_idx - prev_idx; in its_wait_for_range_completion()
1092 if (rd_idx < prev_idx) in its_wait_for_range_completion()
1105 prev_idx = rd_idx; in its_wait_for_range_completion()
1122 u64 rd_idx; \
1144 rd_idx = readl_relaxed(its->base + GITS_CREADR); \
1148 if (its_wait_for_range_completion(its, rd_idx, next_cmd)) \