Home
last modified time | relevance | path

Searched refs:tail (Results 1 – 25 of 397) sorted by relevance

12345678910>>...16

/drivers/net/ethernet/intel/fm10k/
Dfm10k_mbx.c34 fifo->tail = 0; in fm10k_fifo_init()
45 return fifo->tail - fifo->head; in fm10k_fifo_used()
56 return fifo->size + fifo->head - fifo->tail; in fm10k_fifo_unused()
67 return fifo->head == fifo->tail; in fm10k_fifo_empty()
91 return (fifo->tail + offset) & (fifo->size - 1); in fm10k_fifo_tail_offset()
137 fifo->head = fifo->tail; in fm10k_fifo_drop_all()
149 static u16 fm10k_mbx_index_len(struct fm10k_mbx_info *mbx, u16 head, u16 tail) in fm10k_mbx_index_len() argument
151 u16 len = tail - head; in fm10k_mbx_index_len()
154 if (len > tail) in fm10k_mbx_index_len()
170 u16 tail = (mbx->tail + offset + 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_tail_add() local
[all …]
/drivers/staging/rdma/ipath/
Dipath_cq.c68 if (unlikely(next == wc->tail)) { in ipath_cq_enter()
135 u32 tail; in ipath_poll_cq() local
146 tail = wc->tail; in ipath_poll_cq()
147 if (tail > (u32) cq->ibcq.cqe) in ipath_poll_cq()
148 tail = (u32) cq->ibcq.cqe; in ipath_poll_cq()
150 if (tail == wc->head) in ipath_poll_cq()
153 *entry = wc->kqueue[tail]; in ipath_poll_cq()
154 if (tail >= cq->ibcq.cqe) in ipath_poll_cq()
155 tail = 0; in ipath_poll_cq()
157 tail++; in ipath_poll_cq()
[all …]
Dipath_srq.c72 if (next == wq->tail) { in ipath_post_srq_receive()
176 srq->rq.wq->tail = 0; in ipath_create_srq()
226 u32 sz, size, n, head, tail; in ipath_modify_srq() local
271 tail = owq->tail; in ipath_modify_srq()
272 if (tail >= srq->rq.size) in ipath_modify_srq()
273 tail = 0; in ipath_modify_srq()
275 if (n < tail) in ipath_modify_srq()
276 n += srq->rq.size - tail; in ipath_modify_srq()
278 n -= tail; in ipath_modify_srq()
285 while (tail != head) { in ipath_modify_srq()
[all …]
/drivers/staging/rdma/hfi1/
Dcq.c87 if (unlikely(next == wc->tail)) { in hfi1_cq_enter()
158 u32 tail; in hfi1_poll_cq() local
169 tail = wc->tail; in hfi1_poll_cq()
170 if (tail > (u32) cq->ibcq.cqe) in hfi1_poll_cq()
171 tail = (u32) cq->ibcq.cqe; in hfi1_poll_cq()
173 if (tail == wc->head) in hfi1_poll_cq()
176 *entry = wc->kqueue[tail]; in hfi1_poll_cq()
177 if (tail >= cq->ibcq.cqe) in hfi1_poll_cq()
178 tail = 0; in hfi1_poll_cq()
180 tail++; in hfi1_poll_cq()
[all …]
Dsrq.c89 if (next == wq->tail) { in hfi1_post_srq_receive()
189 srq->rq.wq->tail = 0; in hfi1_create_srq()
239 u32 sz, size, n, head, tail; in hfi1_modify_srq() local
282 tail = owq->tail; in hfi1_modify_srq()
283 if (head >= srq->rq.size || tail >= srq->rq.size) { in hfi1_modify_srq()
288 if (n < tail) in hfi1_modify_srq()
289 n += srq->rq.size - tail; in hfi1_modify_srq()
291 n -= tail; in hfi1_modify_srq()
298 while (tail != head) { in hfi1_modify_srq()
302 wqe = get_rwqe_ptr(&srq->rq, tail); in hfi1_modify_srq()
[all …]
/drivers/infiniband/hw/qib/
Dqib_cq.c71 if (unlikely(next == wc->tail)) { in qib_cq_enter()
142 u32 tail; in qib_poll_cq() local
153 tail = wc->tail; in qib_poll_cq()
154 if (tail > (u32) cq->ibcq.cqe) in qib_poll_cq()
155 tail = (u32) cq->ibcq.cqe; in qib_poll_cq()
157 if (tail == wc->head) in qib_poll_cq()
160 *entry = wc->kqueue[tail]; in qib_poll_cq()
161 if (tail >= cq->ibcq.cqe) in qib_poll_cq()
162 tail = 0; in qib_poll_cq()
164 tail++; in qib_poll_cq()
[all …]
Dqib_srq.c72 if (next == wq->tail) { in qib_post_srq_receive()
172 srq->rq.wq->tail = 0; in qib_create_srq()
222 u32 sz, size, n, head, tail; in qib_modify_srq() local
265 tail = owq->tail; in qib_modify_srq()
266 if (head >= srq->rq.size || tail >= srq->rq.size) { in qib_modify_srq()
271 if (n < tail) in qib_modify_srq()
272 n += srq->rq.size - tail; in qib_modify_srq()
274 n -= tail; in qib_modify_srq()
281 while (tail != head) { in qib_modify_srq()
285 wqe = get_rwqe_ptr(&srq->rq, tail); in qib_modify_srq()
[all …]
/drivers/s390/block/
Ddasd_eer.c91 int tail; member
105 if (eerb->head < eerb->tail) in dasd_eer_get_free_bytes()
106 return eerb->tail - eerb->head - 1; in dasd_eer_get_free_bytes()
107 return eerb->buffersize - eerb->head + eerb->tail -1; in dasd_eer_get_free_bytes()
117 if (eerb->head >= eerb->tail) in dasd_eer_get_filled_bytes()
118 return eerb->head - eerb->tail; in dasd_eer_get_filled_bytes()
119 return eerb->buffersize - eerb->tail + eerb->head; in dasd_eer_get_filled_bytes()
166 tailindex = eerb->tail / PAGE_SIZE; in dasd_eer_read_buffer()
167 localtail = eerb->tail % PAGE_SIZE; in dasd_eer_read_buffer()
172 eerb->tail += len; in dasd_eer_read_buffer()
[all …]
/drivers/scsi/bfa/
Dbfa_cs.h67 u32 tail; member
100 trcm->head = trcm->tail = trcm->stopped = 0; in bfa_trc_init()
113 int tail = trcm->tail; in __bfa_trc() local
114 struct bfa_trc_s *trc = &trcm->trc[tail]; in __bfa_trc()
124 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); in __bfa_trc()
125 if (trcm->tail == trcm->head) in __bfa_trc()
133 int tail = trcm->tail; in __bfa_trc32() local
134 struct bfa_trc_s *trc = &trcm->trc[tail]; in __bfa_trc32()
144 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); in __bfa_trc32()
145 if (trcm->tail == trcm->head) in __bfa_trc32()
/drivers/staging/lustre/lustre/obdclass/
Dllog_swab.c128 struct llog_rec_tail *tail = NULL; in lustre_swab_llog_rec() local
143 tail = &lsc->lsc_tail; in lustre_swab_llog_rec()
153 tail = &lur->lur_tail; in lustre_swab_llog_rec()
163 tail = &lur->lur_tail; in lustre_swab_llog_rec()
185 tail = &ext->cr_tail; in lustre_swab_llog_rec()
187 tail = &cr->cr_tail; in lustre_swab_llog_rec()
189 tail = (struct llog_rec_tail *)((char *)tail + in lustre_swab_llog_rec()
200 tail = &cur->cur_tail; in lustre_swab_llog_rec()
231 tail = &lsr->lsr_tail; in lustre_swab_llog_rec()
247 tail = &llh->llh_tail; in lustre_swab_llog_rec()
[all …]
/drivers/crypto/caam/
Djr.c165 int hw_idx, sw_idx, i, head, tail; in caam_jr_dequeue() local
178 sw_idx = tail = jrp->tail; in caam_jr_dequeue()
181 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) { in caam_jr_dequeue()
182 sw_idx = (tail + i) & (JOBR_DEPTH - 1); in caam_jr_dequeue()
189 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); in caam_jr_dequeue()
223 if (sw_idx == tail) { in caam_jr_dequeue()
225 tail = (tail + 1) & (JOBR_DEPTH - 1); in caam_jr_dequeue()
226 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 && in caam_jr_dequeue()
227 jrp->entinfo[tail].desc_addr_dma == 0); in caam_jr_dequeue()
229 jrp->tail = tail; in caam_jr_dequeue()
[all …]
/drivers/tty/
Dn_tty.c657 size_t tail; in __process_echoes() local
662 tail = ldata->echo_tail; in __process_echoes()
663 while (MASK(ldata->echo_commit) != MASK(tail)) { in __process_echoes()
664 c = echo_buf(ldata, tail); in __process_echoes()
674 if (MASK(ldata->echo_commit) == MASK(tail + 1)) in __process_echoes()
681 op = echo_buf(ldata, tail + 1); in __process_echoes()
687 if (MASK(ldata->echo_commit) == MASK(tail + 2)) in __process_echoes()
689 num_chars = echo_buf(ldata, tail + 2); in __process_echoes()
715 tail += 3; in __process_echoes()
720 tail += 2; in __process_echoes()
[all …]
Dbfin_jtag_comm.c58 #define circ_empty(circ) ((circ)->head == (circ)->tail)
59 #define circ_free(circ) CIRC_SPACE((circ)->head, (circ)->tail, CIRC_SIZE)
60 #define circ_cnt(circ) CIRC_CNT((circ)->head, (circ)->tail, CIRC_SIZE)
86 inbound_len, bfin_jc_write_buf.tail, bfin_jc_write_buf.head); in bfin_jc_emudat_manager()
117 int tail = bfin_jc_write_buf.tail; in bfin_jc_emudat_manager() local
121 circ_byte(&bfin_jc_write_buf, tail + 0), in bfin_jc_emudat_manager()
122 circ_byte(&bfin_jc_write_buf, tail + 1), in bfin_jc_emudat_manager()
123 circ_byte(&bfin_jc_write_buf, tail + 2), in bfin_jc_emudat_manager()
124 circ_byte(&bfin_jc_write_buf, tail + 3) in bfin_jc_emudat_manager()
126 bfin_jc_write_buf.tail += ate; in bfin_jc_emudat_manager()
[all …]
/drivers/gpu/drm/mga/
Dmga_dma.c84 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/b43/
Dpio.c346 u8 *tail = wl->pio_tailspace; in tx_write_2byte_queue() local
352 tail[0] = data[data_len - 1]; in tx_write_2byte_queue()
353 tail[1] = 0; in tx_write_2byte_queue()
354 b43_block_write(dev, tail, 2, in tx_write_2byte_queue()
400 u8 *tail = wl->pio_tailspace; in tx_write_4byte_queue() local
403 memset(tail, 0, 4); in tx_write_4byte_queue()
410 tail[0] = data[data_len - 3]; in tx_write_4byte_queue()
411 tail[1] = data[data_len - 2]; in tx_write_4byte_queue()
412 tail[2] = data[data_len - 1]; in tx_write_4byte_queue()
416 tail[0] = data[data_len - 2]; in tx_write_4byte_queue()
[all …]
/drivers/of/
Dpdt.c139 struct property *head, *tail; in of_pdt_build_prop_list() local
141 head = tail = of_pdt_build_one_prop(node, NULL, in of_pdt_build_prop_list()
144 tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0); in of_pdt_build_prop_list()
145 tail = tail->next; in of_pdt_build_prop_list()
146 while(tail) { in of_pdt_build_prop_list()
147 tail->next = of_pdt_build_one_prop(node, tail->name, in of_pdt_build_prop_list()
149 tail = tail->next; in of_pdt_build_prop_list()
/drivers/staging/android/
Dlowmemorykiller.c102 int tail; in handle_lmk_event() local
109 tail = READ_ONCE(event_buffer.tail); in handle_lmk_event()
112 if (CIRC_SPACE(head, tail, MAX_BUFFERED_EVENTS) < 1) { in handle_lmk_event()
146 int tail; in lmk_event_show() local
152 tail = event_buffer.tail; in lmk_event_show()
154 if (head == tail) { in lmk_event_show()
159 event = &events[tail]; in lmk_event_show()
167 event_buffer.tail = (tail + 1) & (MAX_BUFFERED_EVENTS - 1); in lmk_event_show()
179 if (event_buffer.head != event_buffer.tail) in lmk_event_poll()
201 event_buffer.tail = 0; in lmk_event_init()
/drivers/input/joystick/iforce/
Diforce-serio.c44 if (iforce->xmit.head == iforce->xmit.tail) { in iforce_serial_xmit()
54 serio_write(iforce->serio, iforce->xmit.buf[iforce->xmit.tail]); in iforce_serial_xmit()
55 cs ^= iforce->xmit.buf[iforce->xmit.tail]; in iforce_serial_xmit()
56 XMIT_INC(iforce->xmit.tail, 1); in iforce_serial_xmit()
58 for (i=iforce->xmit.buf[iforce->xmit.tail]; i >= 0; --i) { in iforce_serial_xmit()
59 serio_write(iforce->serio, iforce->xmit.buf[iforce->xmit.tail]); in iforce_serial_xmit()
60 cs ^= iforce->xmit.buf[iforce->xmit.tail]; in iforce_serial_xmit()
61 XMIT_INC(iforce->xmit.tail, 1); in iforce_serial_xmit()
/drivers/soc/qcom/
Dsmd.c224 __le32 tail; member
246 __le32 tail; member
372 SET_TX_CHANNEL_INFO(channel, tail, 0); in qcom_smd_channel_reset()
386 unsigned tail; in qcom_smd_channel_get_rx_avail() local
389 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_get_rx_avail()
391 return (head - tail) & (channel->fifo_size - 1); in qcom_smd_channel_get_rx_avail()
462 unsigned tail; in qcom_smd_channel_peek() local
466 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_peek()
468 len = min_t(size_t, count, channel->fifo_size - tail); in qcom_smd_channel_peek()
471 channel->rx_fifo + tail, in qcom_smd_channel_peek()
[all …]
/drivers/tty/serial/
Dsn_console.c530 int xmit_count, tail, head, loops, ii; in sn_transmit_chars() local
558 tail = xmit->tail; in sn_transmit_chars()
559 start = &xmit->buf[tail]; in sn_transmit_chars()
563 loops = (head < tail) ? 2 : 1; in sn_transmit_chars()
566 xmit_count = (head < tail) ? in sn_transmit_chars()
567 (UART_XMIT_SIZE - tail) : (head - tail); in sn_transmit_chars()
584 tail += result; in sn_transmit_chars()
585 tail &= UART_XMIT_SIZE - 1; in sn_transmit_chars()
586 xmit->tail = tail; in sn_transmit_chars()
587 start = &xmit->buf[tail]; in sn_transmit_chars()
[all …]
/drivers/acpi/
Dutils.c63 u8 *tail = NULL; in acpi_extract_package() local
193 tail = buffer->pointer + tail_offset; in acpi_extract_package()
218 *pointer = tail; in acpi_extract_package()
219 *((u64 *) tail) = in acpi_extract_package()
222 tail += sizeof(u64); in acpi_extract_package()
224 *tail = (char)0; in acpi_extract_package()
225 tail += sizeof(char); in acpi_extract_package()
238 *pointer = tail; in acpi_extract_package()
239 memcpy(tail, element->string.pointer, in acpi_extract_package()
242 tail += element->string.length * sizeof(char); in acpi_extract_package()
[all …]
/drivers/tty/serial/jsm/
Djsm_tty.c531 u16 tail; in jsm_input() local
561 tail = ch->ch_r_tail & rmask; in jsm_input()
563 data_len = (head - tail) & rmask; in jsm_input()
581 ch->ch_r_head = tail; in jsm_input()
597 ch->ch_portnum, head, tail); in jsm_input()
612 s = ((head >= tail) ? head : RQUEUESIZE) - tail; in jsm_input()
631 if (*(ch->ch_equeue +tail +i) & UART_LSR_BI) in jsm_input()
632 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK); in jsm_input()
633 else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE) in jsm_input()
634 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY); in jsm_input()
[all …]
/drivers/input/serio/
Duserio.c42 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/isdn/gigaset/
Dser-gigaset.c664 unsigned tail, head, n; in gigaset_tty_receive() local
676 tail = inbuf->tail; in gigaset_tty_receive()
679 head, tail, count); in gigaset_tty_receive()
681 if (head <= tail) { in gigaset_tty_receive()
683 n = min_t(unsigned, count, RBUFSIZE - tail); in gigaset_tty_receive()
684 memcpy(inbuf->data + tail, buf, n); in gigaset_tty_receive()
685 tail = (tail + n) % RBUFSIZE; in gigaset_tty_receive()
692 n = head - tail - 1; in gigaset_tty_receive()
699 memcpy(inbuf->data + tail, buf, count); in gigaset_tty_receive()
700 tail += count; in gigaset_tty_receive()
[all …]
/drivers/dma/ioat/
Ddma.c135 __func__, ioat_chan->head, ioat_chan->tail, in __ioat_issue_pending()
176 __func__, ioat_chan->head, ioat_chan->tail, ioat_chan->issued); in __ioat_start_null_desc()
208 ioat_chan->issued = ioat_chan->tail; in __ioat_restart_chan()
214 __func__, ioat_chan->head, ioat_chan->tail, in __ioat_restart_chan()
220 desc = ioat_get_ring_ent(ioat_chan, ioat_chan->tail); in __ioat_restart_chan()
400 u16 curr_idx = (ioat_chan->tail+i) & (curr_size-1); in reshape_ring()
401 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); in reshape_ring()
409 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); in reshape_ring()
414 u16 new_idx = (ioat_chan->tail+i) & in reshape_ring()
427 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); in reshape_ring()
[all …]

12345678910>>...16