Home
last modified time | relevance | path

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

12345678910>>...17

/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/infiniband/sw/rdmavt/
Dcq.c84 if (unlikely(next == wc->tail)) { in rvt_cq_enter()
338 cq->queue->head != cq->queue->tail) in rvt_req_notify_cq()
357 u32 head, tail, n; in rvt_resize_cq() local
397 tail = old_wc->tail; in rvt_resize_cq()
398 if (tail > (u32)cq->ibcq.cqe) in rvt_resize_cq()
399 tail = (u32)cq->ibcq.cqe; in rvt_resize_cq()
400 if (head < tail) in rvt_resize_cq()
401 n = cq->ibcq.cqe + 1 + head - tail; in rvt_resize_cq()
403 n = head - tail; in rvt_resize_cq()
408 for (n = 0; tail != head; n++) { in rvt_resize_cq()
[all …]
Dsrq.c141 srq->rq.wq->tail = 0; in rvt_create_srq()
192 u32 sz, size, n, head, tail; in rvt_modify_srq() local
231 tail = owq->tail; in rvt_modify_srq()
232 if (head >= srq->rq.size || tail >= srq->rq.size) { in rvt_modify_srq()
237 if (n < tail) in rvt_modify_srq()
238 n += srq->rq.size - tail; in rvt_modify_srq()
240 n -= tail; in rvt_modify_srq()
247 while (tail != head) { in rvt_modify_srq()
251 wqe = rvt_get_rwqe_ptr(&srq->rq, tail); in rvt_modify_srq()
258 if (++tail >= srq->rq.size) in rvt_modify_srq()
[all …]
/drivers/net/ethernet/amazon/ena/
Dena_eth_com.h99 u16 tail, next_to_comp, cnt; in ena_com_sq_empty_space() local
102 tail = io_sq->tail; in ena_com_sq_empty_space()
103 cnt = tail - next_to_comp; in ena_com_sq_empty_space()
110 u16 tail; in ena_com_write_sq_doorbell() local
112 tail = io_sq->tail; in ena_com_write_sq_doorbell()
115 io_sq->qid, tail); in ena_com_write_sq_doorbell()
117 writel(tail, io_sq->db_addr); in ena_com_write_sq_doorbell()
/drivers/staging/android/fiq_debugger/
Dfiq_debugger_arm.c179 struct frame_tail *tail) in user_backtrace() argument
184 if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) { in user_backtrace()
186 tail); in user_backtrace()
189 if (__copy_from_user_inatomic(buftail, tail, sizeof(buftail))) { in user_backtrace()
191 " failed to copy frame pointer %p\n", tail); in user_backtrace()
199 if (tail >= buftail[0].fp) in user_backtrace()
208 struct frame_tail *tail; in fiq_debugger_dump_stacktrace() local
237 tail = ((struct frame_tail *) regs->ARM_fp) - 1; in fiq_debugger_dump_stacktrace()
238 while (depth-- && tail && !((unsigned long) tail & 3)) in fiq_debugger_dump_stacktrace()
239 tail = user_backtrace(output, tail); in fiq_debugger_dump_stacktrace()
Dfiq_debugger_ringbuf.h24 int tail; member
39 rbuf->tail = 0; in fiq_debugger_ringbuf_alloc()
52 int level = rbuf->head - rbuf->tail; in fiq_debugger_ringbuf_level()
68 return rbuf->buf[(rbuf->tail + i) % rbuf->len]; in fiq_debugger_ringbuf_peek()
76 rbuf->tail = (rbuf->tail + count) % rbuf->len; in fiq_debugger_ringbuf_consume()
/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/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.c155 size_t tail, size_t n) in tty_copy_to_user() argument
158 size_t size = N_TTY_BUF_SIZE - tail; in tty_copy_to_user()
159 const void *from = read_buf_addr(ldata, tail); in tty_copy_to_user()
616 size_t tail; in __process_echoes() local
621 tail = ldata->echo_tail; in __process_echoes()
622 while (ldata->echo_commit != tail) { in __process_echoes()
623 c = echo_buf(ldata, tail); in __process_echoes()
633 op = echo_buf(ldata, tail + 1); in __process_echoes()
639 num_chars = echo_buf(ldata, tail + 2); in __process_echoes()
665 tail += 3; 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/broadcom/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/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()
Diforce-usb.c37 if (iforce->xmit.head == iforce->xmit.tail) { in iforce_usb_xmit()
43 ((char *)iforce->out->transfer_buffer)[0] = iforce->xmit.buf[iforce->xmit.tail]; in iforce_usb_xmit()
44 XMIT_INC(iforce->xmit.tail, 1); in iforce_usb_xmit()
45 n = iforce->xmit.buf[iforce->xmit.tail]; in iforce_usb_xmit()
46 XMIT_INC(iforce->xmit.tail, 1); in iforce_usb_xmit()
52 c = CIRC_CNT_TO_END(iforce->xmit.head, iforce->xmit.tail, XMIT_SIZE); in iforce_usb_xmit()
56 &iforce->xmit.buf[iforce->xmit.tail], in iforce_usb_xmit()
63 XMIT_INC(iforce->xmit.tail, n); in iforce_usb_xmit()
/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/rpmsg/
Dqcom_smd.c235 __le32 tail; member
257 __le32 tail; member
383 SET_RX_CHANNEL_INFO(channel, tail, 0); in qcom_smd_channel_reset()
411 unsigned tail; in qcom_smd_channel_get_rx_avail() local
414 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_get_rx_avail()
416 return (head - tail) & (channel->fifo_size - 1); in qcom_smd_channel_get_rx_avail()
482 unsigned tail; in qcom_smd_channel_peek() local
486 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_peek()
488 len = min_t(size_t, count, channel->fifo_size - tail); in qcom_smd_channel_peek()
491 channel->rx_fifo + tail, in qcom_smd_channel_peek()
[all …]
/drivers/staging/lustre/lustre/obdclass/
Dllog_swab.c124 struct llog_rec_tail *tail = NULL; in lustre_swab_llog_rec() local
139 tail = &lsc->lsc_tail; in lustre_swab_llog_rec()
149 tail = &lur->lur_tail; in lustre_swab_llog_rec()
159 tail = &lur->lur_tail; in lustre_swab_llog_rec()
186 tail = (struct llog_rec_tail *)((char *)&cr->cr + in lustre_swab_llog_rec()
199 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()
255 tail = &lid->lid_tail; in lustre_swab_llog_rec()
264 tail = &lgr->lgr_tail; in lustre_swab_llog_rec()
[all …]
/drivers/soc/qcom/
Dsmd.c218 __le32 tail; member
240 __le32 tail; member
366 SET_RX_CHANNEL_INFO(channel, tail, 0); in qcom_smd_channel_reset()
393 unsigned tail; in qcom_smd_channel_get_rx_avail() local
396 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_get_rx_avail()
398 return (head - tail) & (channel->fifo_size - 1); in qcom_smd_channel_get_rx_avail()
464 unsigned tail; in qcom_smd_channel_peek() local
468 tail = GET_RX_CHANNEL_INFO(channel, tail); in qcom_smd_channel_peek()
470 len = min_t(size_t, count, channel->fifo_size - tail); in qcom_smd_channel_peek()
473 channel->rx_fifo + tail, in qcom_smd_channel_peek()
[all …]
/drivers/tty/serial/jsm/
Djsm_tty.c528 u16 tail; in jsm_input() local
557 tail = ch->ch_r_tail & rmask; in jsm_input()
559 data_len = (head - tail) & rmask; in jsm_input()
576 ch->ch_r_head = tail; in jsm_input()
592 ch->ch_portnum, head, tail); in jsm_input()
606 s = ((head >= tail) ? head : RQUEUESIZE) - tail; in jsm_input()
625 if (*(ch->ch_equeue +tail +i) & UART_LSR_BI) in jsm_input()
626 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK); in jsm_input()
627 else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE) in jsm_input()
628 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/acpi/
Dutils.c64 u8 *tail = NULL; in acpi_extract_package() local
194 tail = buffer->pointer + tail_offset; in acpi_extract_package()
215 *pointer = tail; in acpi_extract_package()
216 *((u64 *) tail) = in acpi_extract_package()
219 tail += sizeof(u64); in acpi_extract_package()
221 *tail = (char)0; in acpi_extract_package()
222 tail += sizeof(char); in acpi_extract_package()
235 *pointer = tail; in acpi_extract_package()
236 memcpy(tail, element->string.pointer, in acpi_extract_package()
239 tail += element->string.length * sizeof(char); in acpi_extract_package()
[all …]
/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 …]
Dcommon.c299 unsigned head, tail; in clear_events() local
305 tail = cs->ev_tail; in clear_events()
307 while (tail != head) { in clear_events()
313 cs->ev_head = tail; in clear_events()
337 unsigned next, tail; in gigaset_add_event() local
344 tail = cs->ev_tail; in gigaset_add_event()
345 next = (tail + 1) % MAX_EVENTS; in gigaset_add_event()
349 event = cs->events + tail; in gigaset_add_event()
553 inbuf->tail = 0; in gigaset_inbuf_init()
569 unsigned n, head, tail, bytesleft; in gigaset_fill_inbuf() local
[all …]
/drivers/infiniband/hw/qib/
Dqib_sdma.c543 u16 tail; in qib_sdma_verbs_send() local
575 tail = ppd->sdma_descq_tail; in qib_sdma_verbs_send()
576 descqp = &ppd->sdma_descq[tail].qw[0]; in qib_sdma_verbs_send()
581 if (++tail == ppd->sdma_descq_cnt) { in qib_sdma_verbs_send()
582 tail = 0; in qib_sdma_verbs_send()
587 tx->txreq.start_idx = tail; in qib_sdma_verbs_send()
615 if (++tail == ppd->sdma_descq_cnt) { in qib_sdma_verbs_send()
616 tail = 0; in qib_sdma_verbs_send()
642 if (!tail) in qib_sdma_verbs_send()
652 tx->txreq.next_descq_idx = tail; in qib_sdma_verbs_send()
[all …]

12345678910>>...17