Lines Matching refs:wr_idx
90 u32 wr_idx, rd_idx; in msgq_occupied() local
92 wr_idx = readl_relaxed(&msgq->wr_idx); in msgq_occupied()
95 return ((wr_idx - rd_idx) & qinfo->q_mask); in msgq_occupied()
488 readl_relaxed(&msgq->wr_idx), in bcm_vk_sync_msgq()
603 u32 wr_idx; /* local copy */ in bcm_to_v_msg_enqueue() local
642 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_v_msg_enqueue()
644 if (wr_idx >= qinfo->q_size) { in bcm_to_v_msg_enqueue()
646 wr_idx, qinfo->q_size); in bcm_to_v_msg_enqueue()
652 dst = msgq_blk_addr(qinfo, wr_idx); in bcm_to_v_msg_enqueue()
657 wr_idx = msgq_inc(qinfo, wr_idx, 1); in bcm_to_v_msg_enqueue()
658 dst = msgq_blk_addr(qinfo, wr_idx); in bcm_to_v_msg_enqueue()
662 writel(wr_idx, &msgq->wr_idx); in bcm_to_v_msg_enqueue()
669 wr_idx, in bcm_to_v_msg_enqueue()
679 bcm_to_v_q_doorbell(vk, q_num, wr_idx + 1); in bcm_to_v_msg_enqueue()
785 u32 rd_idx, wr_idx; in bcm_to_h_msg_dequeue() local
808 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_h_msg_dequeue()
811 while ((rd_idx != wr_idx) && !exit_loop) { in bcm_to_h_msg_dequeue()
867 wr_idx, in bcm_to_h_msg_dequeue()
910 wr_idx = readl(&msgq->wr_idx); in bcm_to_h_msg_dequeue()