/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/ |
D | debug_private.h | 30 return (debug_data_ptr->head == debug_data_ptr->tail); in is_debug_buffer_empty() 56 if (remote_tail > debug_data_ptr->tail) { in debug_synch_queue() 57 size_t delta = remote_tail - debug_data_ptr->tail; in debug_synch_queue() 60 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 61 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 62 } else if (remote_tail < debug_data_ptr->tail) { in debug_synch_queue() 63 size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail; in debug_synch_queue() 66 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 67 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 72 debug_data_ptr->tail = remote_tail; in debug_synch_queue() [all …]
|
/drivers/rpmsg/ |
D | qcom_glink_smem.c | 39 __le32 *tail; member 55 u32 tail; in glink_smem_rx_avail() local 71 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_avail() 73 if (head < tail) in glink_smem_rx_avail() 74 return pipe->native.length - tail + head; in glink_smem_rx_avail() 76 return head - tail; in glink_smem_rx_avail() 84 u32 tail; in glink_smem_rx_peak() local 86 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_peak() 87 tail += offset; in glink_smem_rx_peak() 88 if (tail >= pipe->native.length) in glink_smem_rx_peak() [all …]
|
D | qcom_glink_rpm.c | 50 void __iomem *tail; member 60 unsigned int tail; in glink_rpm_rx_avail() local 63 tail = readl(pipe->tail); in glink_rpm_rx_avail() 65 if (head < tail) in glink_rpm_rx_avail() 66 return pipe->native.length - tail + head; in glink_rpm_rx_avail() 68 return head - tail; in glink_rpm_rx_avail() 75 unsigned int tail; in glink_rpm_rx_peak() local 78 tail = readl(pipe->tail); in glink_rpm_rx_peak() 79 tail += offset; in glink_rpm_rx_peak() 80 if (tail >= pipe->native.length) in glink_rpm_rx_peak() [all …]
|
/drivers/net/ethernet/intel/fm10k/ |
D | fm10k_mbx.c | 17 fifo->tail = 0; in fm10k_fifo_init() 28 return fifo->tail - fifo->head; in fm10k_fifo_used() 39 return fifo->size + fifo->head - fifo->tail; in fm10k_fifo_unused() 50 return fifo->head == fifo->tail; in fm10k_fifo_empty() 74 return (fifo->tail + offset) & (fifo->size - 1); in fm10k_fifo_tail_offset() 120 fifo->head = fifo->tail; in fm10k_fifo_drop_all() 132 static u16 fm10k_mbx_index_len(struct fm10k_mbx_info *mbx, u16 head, u16 tail) in fm10k_mbx_index_len() argument 134 u16 len = tail - head; in fm10k_mbx_index_len() 137 if (len > tail) in fm10k_mbx_index_len() 153 u16 tail = (mbx->tail + offset + 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_tail_add() local [all …]
|
/drivers/infiniband/sw/rdmavt/ |
D | cq.c | 34 u32 tail; in rvt_cq_enter() local 42 tail = RDMA_READ_UAPI_ATOMIC(u_wc->tail); in rvt_cq_enter() 47 tail = k_wc->tail; in rvt_cq_enter() 61 if (unlikely(next == tail || cq->cq_full)) { in rvt_cq_enter() 319 RDMA_READ_UAPI_ATOMIC(cq->queue->tail)) in rvt_req_notify_cq() 322 if (cq->kqueue->head != cq->kqueue->tail) in rvt_req_notify_cq() 341 u32 head, tail, n; in rvt_resize_cq() local 386 tail = RDMA_READ_UAPI_ATOMIC(old_u_wc->tail); in rvt_resize_cq() 390 tail = old_k_wc->tail; in rvt_resize_cq() 395 if (tail > (u32)cq->ibcq.cqe) in rvt_resize_cq() [all …]
|
D | srq.c | 137 u32 sz, size, n, head, tail; in rvt_modify_srq() local 175 tail = RDMA_READ_UAPI_ATOMIC(owq->tail); in rvt_modify_srq() 179 tail = okwq->tail; in rvt_modify_srq() 181 if (head >= srq->rq.size || tail >= srq->rq.size) { in rvt_modify_srq() 186 if (n < tail) in rvt_modify_srq() 187 n += srq->rq.size - tail; in rvt_modify_srq() 189 n -= tail; in rvt_modify_srq() 196 while (tail != head) { in rvt_modify_srq() 200 wqe = rvt_get_rwqe_ptr(&srq->rq, tail); in rvt_modify_srq() 207 if (++tail >= srq->rq.size) in rvt_modify_srq() [all …]
|
D | rc.c | 66 u32 tail; in rvt_compute_aeth() local 73 tail = RDMA_READ_UAPI_ATOMIC(qp->r_rq.wq->tail); in rvt_compute_aeth() 76 tail = READ_ONCE(qp->r_rq.kwq->tail); in rvt_compute_aeth() 80 if (tail >= qp->r_rq.size) in rvt_compute_aeth() 81 tail = 0; in rvt_compute_aeth() 88 credits = rvt_get_rq_count(&qp->r_rq, head, tail); in rvt_compute_aeth()
|
/drivers/net/wireguard/ |
D | queueing.c | 56 queue->head = queue->tail = STUB(queue); in wg_prev_queue_init() 82 struct sk_buff *tail = queue->tail, *next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() local 84 if (tail == STUB(queue)) { in wg_prev_queue_dequeue() 87 queue->tail = next; in wg_prev_queue_dequeue() 88 tail = next; in wg_prev_queue_dequeue() 92 queue->tail = next; in wg_prev_queue_dequeue() 94 return tail; in wg_prev_queue_dequeue() 96 if (tail != READ_ONCE(queue->head)) in wg_prev_queue_dequeue() 99 next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() 101 queue->tail = next; in wg_prev_queue_dequeue() [all …]
|
/drivers/gpu/drm/i915/gt/ |
D | intel_ring.h | 26 void intel_ring_reset(struct intel_ring *ring, u32 tail); 91 assert_ring_tail_valid(const struct intel_ring *ring, unsigned int tail) in assert_ring_tail_valid() argument 95 GEM_BUG_ON(!intel_ring_offset_valid(ring, tail)); in assert_ring_tail_valid() 112 GEM_BUG_ON(cacheline(tail) == cacheline(head) && tail < head); in assert_ring_tail_valid() 117 intel_ring_set_tail(struct intel_ring *ring, unsigned int tail) in intel_ring_set_tail() argument 125 assert_ring_tail_valid(ring, tail); in intel_ring_set_tail() 126 ring->tail = tail; in intel_ring_set_tail() 127 return tail; in intel_ring_set_tail() 131 __intel_ring_space(unsigned int head, unsigned int tail, unsigned int size) in __intel_ring_space() argument 139 return (head - tail - CACHELINE_BYTES) & (size - 1); in __intel_ring_space()
|
/drivers/media/test-drivers/vidtv/ |
D | vidtv_channel.c | 165 struct vidtv_psi_table_eit_event *tail = NULL; in vidtv_channel_eit_event_cat_into_new() local 182 tail = vidtv_psi_eit_event_init(tail, event_id); in vidtv_channel_eit_event_cat_into_new() 183 if (!tail) { in vidtv_channel_eit_event_cat_into_new() 189 vidtv_psi_desc_assign(&tail->descriptor, desc); in vidtv_channel_eit_event_cat_into_new() 192 head = tail; in vidtv_channel_eit_event_cat_into_new() 211 struct vidtv_psi_table_sdt_service *tail = NULL; in vidtv_channel_sdt_serv_cat_into_new() local 229 tail = vidtv_psi_sdt_service_init(tail, in vidtv_channel_sdt_serv_cat_into_new() 233 if (!tail) in vidtv_channel_sdt_serv_cat_into_new() 239 vidtv_psi_desc_assign(&tail->descriptor, desc); in vidtv_channel_sdt_serv_cat_into_new() 242 head = tail; in vidtv_channel_sdt_serv_cat_into_new() [all …]
|
/drivers/tty/ |
D | n_tty.c | 168 static void tty_copy(struct tty_struct *tty, void *to, size_t tail, size_t n) in tty_copy() argument 171 size_t size = N_TTY_BUF_SIZE - tail; in tty_copy() 172 void *from = read_buf_addr(ldata, tail); in tty_copy() 627 size_t tail; in __process_echoes() local 632 tail = ldata->echo_tail; in __process_echoes() 633 while (MASK(ldata->echo_commit) != MASK(tail)) { in __process_echoes() 634 c = echo_buf(ldata, tail); in __process_echoes() 644 if (MASK(ldata->echo_commit) == MASK(tail + 1)) in __process_echoes() 651 op = echo_buf(ldata, tail + 1); in __process_echoes() 657 if (MASK(ldata->echo_commit) == MASK(tail + 2)) in __process_echoes() [all …]
|
D | tty_buffer.c | 137 buf->tail = &buf->sentinel; in tty_buffer_free_all() 267 b = buf->tail; in __tty_buffer_request_room() 279 buf->tail = n; in __tty_buffer_request_room() 323 struct tty_buffer *tb = port->buf.tail; in tty_insert_flip_string_fixed_flag() 361 struct tty_buffer *tb = port->buf.tail; in tty_insert_flip_string_flags() 396 tb = port->buf.tail; in __tty_insert_flip_char() 424 struct tty_buffer *tb = port->buf.tail; in tty_prepare_flip_string() 536 static inline void tty_flip_buffer_commit(struct tty_buffer *tail) in tty_flip_buffer_commit() argument 542 smp_store_release(&tail->commit, tail->used); in tty_flip_buffer_commit() 560 tty_flip_buffer_commit(buf->tail); in tty_flip_buffer_push() [all …]
|
/drivers/infiniband/hw/vmw_pvrdma/ |
D | pvrdma_ring.h | 89 const __u32 tail = atomic_read(&r->prod_tail); in pvrdma_idx_ring_has_space() local 92 if (pvrdma_idx_valid(tail, max_elems) && in pvrdma_idx_ring_has_space() 94 *out_tail = tail & (max_elems - 1); in pvrdma_idx_ring_has_space() 95 return tail != (head ^ max_elems); in pvrdma_idx_ring_has_space() 103 const __u32 tail = atomic_read(&r->prod_tail); in pvrdma_idx_ring_has_data() local 106 if (pvrdma_idx_valid(tail, max_elems) && in pvrdma_idx_ring_has_data() 109 return tail != head; in pvrdma_idx_ring_has_data()
|
/drivers/of/ |
D | pdt.c | 114 struct property *head, *tail; in of_pdt_build_prop_list() local 116 head = tail = of_pdt_build_one_prop(node, NULL, in of_pdt_build_prop_list() 119 tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0); in of_pdt_build_prop_list() 120 tail = tail->next; in of_pdt_build_prop_list() 121 while(tail) { in of_pdt_build_prop_list() 122 tail->next = of_pdt_build_one_prop(node, tail->name, in of_pdt_build_prop_list() 124 tail = tail->next; in of_pdt_build_prop_list()
|
/drivers/s390/block/ |
D | dasd_eer.c | 92 int tail; member 106 if (eerb->head < eerb->tail) in dasd_eer_get_free_bytes() 107 return eerb->tail - eerb->head - 1; in dasd_eer_get_free_bytes() 108 return eerb->buffersize - eerb->head + eerb->tail -1; in dasd_eer_get_free_bytes() 118 if (eerb->head >= eerb->tail) in dasd_eer_get_filled_bytes() 119 return eerb->head - eerb->tail; in dasd_eer_get_filled_bytes() 120 return eerb->buffersize - eerb->tail + eerb->head; in dasd_eer_get_filled_bytes() 167 tailindex = eerb->tail / PAGE_SIZE; in dasd_eer_read_buffer() 168 localtail = eerb->tail % PAGE_SIZE; in dasd_eer_read_buffer() 173 eerb->tail += len; in dasd_eer_read_buffer() [all …]
|
/drivers/crypto/caam/ |
D | jr.c | 206 int hw_idx, sw_idx, i, head, tail; in caam_jr_dequeue() local 219 sw_idx = tail = jrp->tail; in caam_jr_dequeue() 222 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) { in caam_jr_dequeue() 223 sw_idx = (tail + i) & (JOBR_DEPTH - 1); in caam_jr_dequeue() 230 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); in caam_jr_dequeue() 267 if (sw_idx == tail) { in caam_jr_dequeue() 269 tail = (tail + 1) & (JOBR_DEPTH - 1); in caam_jr_dequeue() 270 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 && in caam_jr_dequeue() 271 jrp->entinfo[tail].desc_addr_dma == 0); in caam_jr_dequeue() 273 jrp->tail = tail; in caam_jr_dequeue() [all …]
|
/drivers/net/wwan/iosm/ |
D | iosm_ipc_protocol_ops.c | 227 u32 tail; in ipc_protocol_ul_td_send() local 238 tail = pipe->old_tail; in ipc_protocol_ul_td_send() 241 if (head < tail) in ipc_protocol_ul_td_send() 242 free_elements = tail - head - 1; in ipc_protocol_ul_td_send() 245 pipe->nr_of_entries - head + ((s32)tail - 1); in ipc_protocol_ul_td_send() 330 u32 tail; in ipc_protocol_dl_td_prepare() local 336 tail = le32_to_cpu(ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]); in ipc_protocol_dl_td_prepare() 342 if (new_head == tail) in ipc_protocol_dl_td_prepare() 435 u32 *tail) in ipc_protocol_get_head_tail_index() argument 442 if (tail) in ipc_protocol_get_head_tail_index() [all …]
|
/drivers/gpu/drm/mga/ |
D | mga_dma.c | 84 primary->tail = 0; in mga_do_dma_reset() 106 u32 head, tail; in mga_do_dma_flush() local 120 if (primary->tail == primary->last_flush) { in mga_do_dma_flush() 125 tail = primary->tail + dev_priv->primary->offset; in mga_do_dma_flush() 139 primary->last_flush = primary->tail; in mga_do_dma_flush() 143 if (head <= tail) in mga_do_dma_flush() 144 primary->space = primary->size - primary->tail; in mga_do_dma_flush() 146 primary->space = head - tail; in mga_do_dma_flush() 149 DRM_DEBUG(" tail = 0x%06lx\n", (unsigned long)(tail - dev_priv->primary->offset)); in mga_do_dma_flush() 153 MGA_WRITE(MGA_PRIMEND, tail | dev_priv->dma_access); in mga_do_dma_flush() [all …]
|
/drivers/net/wireless/broadcom/b43/ |
D | pio.c | 333 u8 *tail = wl->pio_tailspace; in tx_write_2byte_queue() local 339 tail[0] = data[data_len - 1]; in tx_write_2byte_queue() 340 tail[1] = 0; in tx_write_2byte_queue() 341 b43_block_write(dev, tail, 2, in tx_write_2byte_queue() 387 u8 *tail = wl->pio_tailspace; in tx_write_4byte_queue() local 390 memset(tail, 0, 4); in tx_write_4byte_queue() 397 tail[0] = data[data_len - 3]; in tx_write_4byte_queue() 398 tail[1] = data[data_len - 2]; in tx_write_4byte_queue() 399 tail[2] = data[data_len - 1]; in tx_write_4byte_queue() 403 tail[0] = data[data_len - 2]; in tx_write_4byte_queue() [all …]
|
/drivers/gpu/drm/i915/gt/uc/ |
D | intel_guc_ct.c | 137 ctb->tail = 0; in guc_ct_buffer_reset() 139 space = CIRC_SPACE(ctb->tail, ctb->head, ctb->size) - ctb->resv_space; in guc_ct_buffer_reset() 409 u32 tail = ctb->tail; in ct_write() local 420 GEM_BUG_ON(tail > size); in ct_write() 423 if (unlikely(tail != READ_ONCE(desc->tail))) { in ct_write() 425 desc->tail, tail); in ct_write() 453 tail, 4, &header, 4, &hxg, 4 * (len - 1), &action[1]); in ct_write() 455 cmds[tail] = header; in ct_write() 456 tail = (tail + 1) % size; in ct_write() 458 cmds[tail] = hxg; in ct_write() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/falcon/ |
D | msgq.c | 47 u32 tail = nvkm_falcon_rd32(msgq->qmgr->falcon, msgq->tail_reg); in nvkm_falcon_msgq_empty() local 48 return head == tail; in nvkm_falcon_msgq_empty() 55 u32 head, tail, available; in nvkm_falcon_msgq_pop() local 62 tail = msgq->position; in nvkm_falcon_msgq_pop() 64 available = head - tail; in nvkm_falcon_msgq_pop() 71 nvkm_falcon_read_dmem(falcon, tail, size, 0, data); in nvkm_falcon_msgq_pop() 162 msgq->tail_reg = falcon->func->msgq.tail; in nvkm_falcon_msgq_recv_initmsg() 163 msgq->offset = nvkm_falcon_rd32(falcon, falcon->func->msgq.tail); in nvkm_falcon_msgq_recv_initmsg() 183 msgq->tail_reg = func->msgq.tail + index * func->msgq.stride; in nvkm_falcon_msgq_init()
|
/drivers/net/ethernet/amazon/ena/ |
D | ena_eth_com.h | 74 u16 tail, next_to_comp, cnt; in ena_com_free_q_entries() local 77 tail = io_sq->tail; in ena_com_free_q_entries() 78 cnt = tail - next_to_comp; in ena_com_free_q_entries() 153 u16 tail = io_sq->tail; in ena_com_write_sq_doorbell() local 157 io_sq->qid, tail); in ena_com_write_sq_doorbell() 159 writel(tail, io_sq->db_addr); in ena_com_write_sq_doorbell()
|
/drivers/input/serio/ |
D | userio.c | 42 u8 tail; member 65 if (userio->head == userio->tail) in userio_device_write() 141 userio->tail, in userio_char_read() 145 memcpy(buf, &userio->buf[userio->tail], copylen); in userio_char_read() 146 userio->tail = (userio->tail + copylen) % in userio_char_read() 167 userio->head != userio->tail); in userio_char_read() 257 if (userio->head != userio->tail) in userio_char_poll()
|
/drivers/infiniband/hw/qib/ |
D | qib_sdma.c | 519 u16 tail; in qib_sdma_verbs_send() local 551 tail = ppd->sdma_descq_tail; in qib_sdma_verbs_send() 552 descqp = &ppd->sdma_descq[tail].qw[0]; in qib_sdma_verbs_send() 557 if (++tail == ppd->sdma_descq_cnt) { in qib_sdma_verbs_send() 558 tail = 0; in qib_sdma_verbs_send() 563 tx->txreq.start_idx = tail; in qib_sdma_verbs_send() 587 if (++tail == ppd->sdma_descq_cnt) { in qib_sdma_verbs_send() 588 tail = 0; in qib_sdma_verbs_send() 597 if (!tail) in qib_sdma_verbs_send() 607 tx->txreq.next_descq_idx = tail; in qib_sdma_verbs_send() [all …]
|
/drivers/net/ethernet/apm/xgene-v2/ |
D | main.c | 72 u8 tail = ring->tail; in xge_refill_buffers() local 79 raw_desc = &ring->raw_desc[tail]; in xge_refill_buffers() 93 ring->pkt_info[tail].skb = skb; in xge_refill_buffers() 94 ring->pkt_info[tail].dma_addr = dma_addr; in xge_refill_buffers() 106 tail = (tail + 1) & slots; in xge_refill_buffers() 109 ring->tail = tail; in xge_refill_buffers() 181 u8 tail; in xge_start_xmit() local 185 tail = tx_ring->tail; in xge_start_xmit() 187 raw_desc = &tx_ring->raw_desc[tail]; in xge_start_xmit() 210 tx_ring->pkt_info[tail].skb = skb; in xge_start_xmit() [all …]
|