/drivers/xen/xenbus/ |
D | xenbus_comms.c | 62 static int check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument 64 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes() 67 static void *get_output_chunk(XENSTORE_RING_IDX cons, in get_output_chunk() argument 72 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk() 73 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk() 77 static const void *get_input_chunk(XENSTORE_RING_IDX cons, in get_input_chunk() argument 81 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in get_input_chunk() 82 if ((prod - cons) < *len) in get_input_chunk() 83 *len = prod - cons; in get_input_chunk() 84 return buf + MASK_XENSTORE_IDX(cons); in get_input_chunk() [all …]
|
D | xenbus_dev_frontend.c | 80 unsigned int cons; member 145 unsigned sz = min((unsigned)len - i, rb->len - rb->cons); in xenbus_file_read() 147 ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz); in xenbus_file_read() 150 rb->cons += sz - ret; in xenbus_file_read() 159 if (rb->cons == rb->len) { in xenbus_file_read() 196 rb->cons = 0; in queue_reply()
|
/drivers/tty/serial/ |
D | kgdboc.c | 162 struct console *cons; in configure_kgdboc() local 185 cons = console_drivers; in configure_kgdboc() 186 while (cons) { in configure_kgdboc() 188 if (cons->device && cons->device(cons, &idx) == p && in configure_kgdboc() 193 cons = cons->next; in configure_kgdboc()
|
D | serial_core.c | 204 if (uart_console(uport) && uport->cons->cflag) { in uart_port_startup() 205 tty->termios.c_cflag = uport->cons->cflag; in uart_port_startup() 206 uport->cons->cflag = 0; in uart_port_startup() 273 uport->cons->cflag = tty->termios.c_cflag; in uart_shutdown() 1997 if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) { in uart_set_options() 2133 console_stop(uport->cons); in uart_suspend_port() 2173 termios.c_cflag = uport->cons->cflag; in uart_resume_port() 2185 console_start(uport->cons); in uart_resume_port() 2310 if (port->cons && !(port->cons->flags & CON_ENABLED)) in uart_configure_port() 2311 register_console(port->cons); in uart_configure_port() [all …]
|
D | sccnxp.c | 932 s->uart.cons = &s->console; in sccnxp_probe() 933 s->uart.cons->device = uart_console_device; in sccnxp_probe() 934 s->uart.cons->write = sccnxp_console_write; in sccnxp_probe() 935 s->uart.cons->setup = sccnxp_console_setup; in sccnxp_probe() 936 s->uart.cons->flags = CON_PRINTBUFFER; in sccnxp_probe() 937 s->uart.cons->index = -1; in sccnxp_probe() 938 s->uart.cons->data = s; in sccnxp_probe() 939 strcpy(s->uart.cons->name, "ttySC"); in sccnxp_probe()
|
/drivers/tty/hvc/ |
D | hvc_xen.c | 86 static inline void notify_daemon(struct xencons_info *cons) in notify_daemon() argument 89 notify_remote_via_evtchn(cons->evtchn); in notify_daemon() 95 XENCONS_RING_IDX cons, prod; in __write_console() local 99 cons = intf->out_cons; in __write_console() 102 BUG_ON((prod - cons) > sizeof(intf->out)); in __write_console() 104 while ((sent < len) && ((prod - cons) < sizeof(intf->out))) in __write_console() 118 struct xencons_info *cons = vtermno_to_xencons(vtermno); in domU_write_console() local 119 if (cons == NULL) in domU_write_console() 129 int sent = __write_console(cons, data, len); in domU_write_console() 144 XENCONS_RING_IDX cons, prod; in domU_read_console() local [all …]
|
/drivers/char/ |
D | virtio_console.c | 222 struct console cons; member 258 struct console *cons; in find_port_by_vtermno() local 262 list_for_each_entry(cons, &pdrvdata.consoles, list) { in find_port_by_vtermno() 263 if (cons->vtermno == vtermno) { in find_port_by_vtermno() 264 port = container_of(cons, struct port, cons); in find_port_by_vtermno() 346 if (port->cons.hvc) in is_console_port() 1197 hvc_resize(port->cons.hvc, port->cons.ws); in resize_console() 1265 port->cons.vtermno = pdrvdata.next_vtermno; in init_port_console() 1267 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console() 1268 if (IS_ERR(port->cons.hvc)) { in init_port_console() [all …]
|
/drivers/infiniband/hw/qedr/ |
D | qedr_cm.c | 579 while (i < num_entries && qp->rq.cons != qp->rq.gsi_cons) { in qedr_gsi_poll_cq() 583 wc[i].wr_id = qp->rqe_wr_id[qp->rq.cons].wr_id; in qedr_gsi_poll_cq() 586 wc[i].status = (qp->rqe_wr_id[qp->rq.cons].rc) ? in qedr_gsi_poll_cq() 589 wc[i].byte_len = qp->rqe_wr_id[qp->rq.cons].sg_list[0].length; in qedr_gsi_poll_cq() 591 ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac); in qedr_gsi_poll_cq() 593 if (qp->rqe_wr_id[qp->rq.cons].vlan_id) { in qedr_gsi_poll_cq() 595 wc[i].vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan_id; in qedr_gsi_poll_cq() 602 while (i < num_entries && qp->sq.cons != qp->sq.gsi_cons) { in qedr_gsi_poll_cq() 606 wc[i].wr_id = qp->wqe_wr_id[qp->sq.cons].wr_id; in qedr_gsi_poll_cq() 618 num_entries, i, qp->rq.cons, qp->rq.gsi_cons, qp->sq.cons, in qedr_gsi_poll_cq()
|
D | qedr.h | 306 u16 cons; member 438 info->cons = (info->cons + 1) % info->max_wr; in qedr_inc_sw_cons()
|
D | verbs.c | 804 static void doorbell_cq(struct qedr_cq *cq, u32 cons, u8 flags) in doorbell_cq() argument 809 cq->db.data.value = cpu_to_le32(cons); in doorbell_cq() 1644 qph->cons = 0; in qedr_reset_qp_hwq_info() 1732 if ((qp->rq.prod != qp->rq.cons) || in qedr_update_qp_state() 1733 (qp->sq.prod != qp->sq.cons)) { in qedr_update_qp_state() 1736 qp->rq.prod, qp->rq.cons, qp->sq.prod, in qedr_update_qp_state() 1737 qp->sq.cons); in qedr_update_qp_state() 2503 return (((wq->prod + 1) % wq->max_wr) == wq->cons); in qedr_wq_is_full() 3174 if (qp->wqe_wr_id[qp->sq.cons].opcode == IB_WC_REG_MR) in qedr_chk_if_fmr() 3175 qp->wqe_wr_id[qp->sq.cons].mr->info.completed++; in qedr_chk_if_fmr() [all …]
|
/drivers/net/xen-netback/ |
D | rx.c | 38 RING_IDX prod, cons; in xenvif_rx_ring_slots_available() local 54 cons = queue->rx.req_cons; in xenvif_rx_ring_slots_available() 56 if (prod - cons >= needed) in xenvif_rx_ring_slots_available() 472 RING_IDX prod, cons; in xenvif_rx_queue_stalled() local 475 cons = queue->rx.req_cons; in xenvif_rx_queue_stalled() 478 prod - cons < 1 && in xenvif_rx_queue_stalled() 485 RING_IDX prod, cons; in xenvif_rx_queue_ready() local 488 cons = queue->rx.req_cons; in xenvif_rx_queue_ready() 490 return queue->stalled && prod - cons >= 1; in xenvif_rx_queue_ready()
|
D | netback.c | 197 RING_IDX cons = queue->tx.req_cons; in xenvif_tx_err() local 205 if (cons == end) in xenvif_tx_err() 207 RING_COPY_REQUEST(&queue->tx, cons++, txp); in xenvif_tx_err() 210 queue->tx.req_cons = cons; in xenvif_tx_err() 228 RING_IDX cons = queue->tx.req_cons; in xenvif_count_requests() local 276 RING_COPY_REQUEST(&queue->tx, cons + slots, txp); in xenvif_count_requests() 313 xenvif_tx_err(queue, first, extra_count, cons + slots); in xenvif_count_requests() 604 RING_IDX cons = queue->tx.req_cons; in xenvif_get_extras() local 613 RING_COPY_REQUEST(&queue->tx, cons, &extra); in xenvif_get_extras() 615 queue->tx.req_cons = ++cons; in xenvif_get_extras()
|
/drivers/iommu/ |
D | arm-smmu-v3.c | 508 u32 cons; member 680 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_full() 681 Q_WRP(q, q->prod) != Q_WRP(q, q->cons); in queue_full() 686 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_empty() 687 Q_WRP(q, q->prod) == Q_WRP(q, q->cons); in queue_empty() 692 q->cons = readl_relaxed(q->cons_reg); in queue_sync_cons() 697 u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1; in queue_inc_cons() local 699 q->cons = Q_OVF(q, q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons); in queue_inc_cons() 700 writel(q->cons, q->cons_reg); in queue_inc_cons() 777 queue_read(ent, Q_ENT(q, q->cons), q->ent_dwords); in queue_remove_raw() [all …]
|
/drivers/input/misc/ |
D | xen-kbdfront.c | 57 __u32 cons, prod; in input_handler() local 63 for (cons = page->in_cons; cons != prod; cons++) { in input_handler() 66 event = &XENKBD_IN_RING_REF(page, cons); in input_handler() 102 page->in_cons = cons; in input_handler()
|
/drivers/tty/ |
D | mips_ejtag_fdc.c | 295 struct console cons; member 306 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_write() local 307 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_write() 320 regs = cons->regs[cpu]; in mips_ejtag_fdc_console_write() 324 cons->regs[cpu] = regs; in mips_ejtag_fdc_console_write() 361 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_device() local 362 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_device() 365 return cons->tty_drv; in mips_ejtag_fdc_console_device() 388 register_console(&c->cons); in mips_ejtag_fdc_console_init() 395 .cons = { [all …]
|
/drivers/net/ |
D | xen-netfront.c | 374 RING_IDX cons, prod; in xennet_tx_buf_gc() local 385 for (cons = queue->tx.rsp_cons; cons != prod; cons++) { in xennet_tx_buf_gc() 388 txrsp = RING_GET_RESPONSE(&queue->tx, cons); in xennet_tx_buf_gc() 742 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_extras() local 749 if (unlikely(cons + 1 == rp)) { in xennet_get_extras() 757 RING_GET_RESPONSE(&queue->rx, ++cons); in xennet_get_extras() 770 skb = xennet_get_rx_skb(queue, cons); in xennet_get_extras() 771 ref = xennet_get_rx_ref(queue, cons); in xennet_get_extras() 775 queue->rx.rsp_cons = cons; in xennet_get_extras() 786 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_responses() local [all …]
|
/drivers/gpu/drm/qxl/ |
D | qxl_cmd.c | 88 ret = header->prod - header->cons < header->num_items; in qxl_check_header() 90 header->notify_on_cons = header->cons + 1; in qxl_check_header() 101 ret = header->prod == header->cons; in qxl_check_idle() 114 if (header->prod - header->cons == header->num_items) { in qxl_ring_push() 115 header->notify_on_cons = header->cons + 1; in qxl_ring_push() 160 if (header->cons == header->prod) { in qxl_ring_pop() 161 header->notify_on_prod = header->cons + 1; in qxl_ring_pop() 166 idx = header->cons & (ring->n_elements - 1); in qxl_ring_pop() 171 header->cons++; in qxl_ring_pop()
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_tx.c | 195 ring->cons = 0xffffffff; in mlx4_en_activate_tx_ring() 232 return ring->prod - ring->cons > ring->full_size; in mlx4_en_is_tx_ring_full() 376 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf() 378 ring->cons, ring->prod); in mlx4_en_free_tx_buf() 380 if ((u32) (ring->prod - ring->cons) > ring->size) { in mlx4_en_free_tx_buf() 386 while (ring->cons != ring->prod) { in mlx4_en_free_tx_buf() 388 ring->cons & ring->size_mask, in mlx4_en_free_tx_buf() 389 !!(ring->cons & ring->size), 0, in mlx4_en_free_tx_buf() 391 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf() 434 ring_cons = ACCESS_ONCE(ring->cons); in mlx4_en_process_tx_cq() [all …]
|
D | en_rx.c | 262 return ring->prod == ring->cons; in mlx4_en_is_ring_empty() 333 ring->cons, ring->prod); in mlx4_en_free_rx_buf() 337 index = ring->cons & ring->size_mask; in mlx4_en_free_rx_buf() 340 ++ring->cons; in mlx4_en_free_rx_buf() 384 ring->cons = 0; in mlx4_en_create_rx_ring() 442 ring->cons = 0; in mlx4_en_activate_rx_rings() 705 while ((u32) (ring->prod - ring->cons) < ring->actual_size) { in mlx4_en_refill_rx_buffers() 1106 ring->cons = cq->mcq.cons_index; in mlx4_en_process_rx_cq()
|
/drivers/s390/cio/ |
D | device_status.c | 183 cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons; in ccw_device_accumulate_esw() 184 if (irb->esw.esw0.erw.cons) in ccw_device_accumulate_esw() 302 !(cdev_irb->esw.esw0.erw.cons)) in ccw_device_accumulate_irb() 366 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_basic_sense() 388 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_and_sense()
|
/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_cmn.h | 742 u16 cons; in bnx2x_tx_avail() local 745 cons = txdata->tx_bd_cons; in bnx2x_tx_avail() 747 used = SUB_S16(prod, cons); in bnx2x_tx_avail() 781 u16 cons; in bnx2x_has_rx_work() local 785 cons = RCQ_BD(fp->rx_comp_cons); in bnx2x_has_rx_work() 786 cqe = &fp->rx_comp_ring[cons]; in bnx2x_has_rx_work() 891 u16 cons, u16 prod) in bnx2x_reuse_rx_data() argument 893 struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons]; in bnx2x_reuse_rx_data() 895 struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons]; in bnx2x_reuse_rx_data()
|
/drivers/net/ethernet/broadcom/bnxt/ |
D | bnxt.c | 521 u16 cons = txr->tx_cons; in bnxt_tx_int() local 531 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int() 532 cons = NEXT_TX(cons); in bnxt_tx_int() 546 cons = NEXT_TX(cons); in bnxt_tx_int() 547 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int() 556 cons = NEXT_TX(cons); in bnxt_tx_int() 563 txr->tx_cons = cons; in bnxt_tx_int() 624 static void bnxt_reuse_rx_data(struct bnxt_rx_ring_info *rxr, u16 cons, in bnxt_reuse_rx_data() argument 632 cons_rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_reuse_rx_data() 640 cons_bd = &rxr->rx_desc_ring[RX_RING(cons)][RX_IDX(cons)]; in bnxt_reuse_rx_data() [all …]
|
/drivers/net/hippi/ |
D | rrunner.c | 1268 u32 index, cons; in rr_dump() local 1285 cons = rrpriv->dirty_tx; in rr_dump() 1287 index, cons); in rr_dump() 1300 if (rrpriv->tx_skbuff[cons]){ in rr_dump() 1301 len = min_t(int, 0x80, rrpriv->tx_skbuff[cons]->len); in rr_dump() 1302 … is valid - dumping data (0x%x bytes - skbuff len 0x%x)\n", cons, len, rrpriv->tx_skbuff[cons]->le… in rr_dump() 1304 rrpriv->tx_ring[cons].mode, in rr_dump() 1305 rrpriv->tx_ring[cons].size, in rr_dump() 1306 (unsigned long long) rrpriv->tx_ring[cons].addr.addrlo, in rr_dump() 1307 (unsigned long)rrpriv->tx_skbuff[cons]->data, in rr_dump() [all …]
|
/drivers/net/ethernet/broadcom/ |
D | b44.c | 619 u32 cur, cons; in b44_tx() local 626 for (cons = bp->tx_cons; cons != cur; cons = NEXT_TX(cons)) { in b44_tx() 627 struct ring_info *rp = &bp->tx_buffers[cons]; in b44_tx() 645 bp->tx_cons = cons; in b44_tx() 782 u32 cons, prod; in b44_rx() local 787 cons = bp->rx_cons; in b44_rx() 789 while (cons != prod && budget > 0) { in b44_rx() 790 struct ring_info *rp = &bp->rx_buffers[cons]; in b44_rx() 804 b44_recycle_rx(bp, cons, bp->rx_prod); in b44_rx() 827 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); in b44_rx() [all …]
|
/drivers/net/ethernet/sun/ |
D | sunvnet_common.c | 623 u32 idx = dr->cons; in idx_is_pending() 661 dr->cons = vio_dring_next(dr, end); in vnet_ack() 662 desc = vio_dring_entry(dr, dr->cons); in vnet_ack() 668 if (__vnet_tx_trigger(port, dr->cons) > 0) in vnet_ack() 1396 port->vio._peer_sid, dr->cons); in sunvnet_start_xmit_common() 1400 err = __vnet_tx_trigger(port, dr->cons); in sunvnet_start_xmit_common() 1678 dr->cons = 0; in vnet_port_alloc_tx_ring()
|