/drivers/xen/xenbus/ |
D | xenbus_comms.c | 74 static int check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument 76 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes() 79 static void *get_output_chunk(XENSTORE_RING_IDX cons, in get_output_chunk() argument 84 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk() 85 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk() 89 static const void *get_input_chunk(XENSTORE_RING_IDX cons, in get_input_chunk() argument 93 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in get_input_chunk() 94 if ((prod - cons) < *len) in get_input_chunk() 95 *len = prod - cons; in get_input_chunk() 96 return buf + MASK_XENSTORE_IDX(cons); in get_input_chunk() [all …]
|
D | xenbus_dev_frontend.c | 80 unsigned int cons; member 148 unsigned sz = min((unsigned)len - i, rb->len - rb->cons); in xenbus_file_read() 150 ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz); in xenbus_file_read() 153 rb->cons += sz - ret; in xenbus_file_read() 162 if (rb->cons == rb->len) { in xenbus_file_read() 199 rb->cons = 0; in queue_reply()
|
/drivers/tty/serial/ |
D | kgdboc.c | 149 struct console *cons; in configure_kgdboc() local 172 cons = console_drivers; in configure_kgdboc() 173 while (cons) { in configure_kgdboc() 175 if (cons->device && cons->device(cons, &idx) == p && in configure_kgdboc() 180 cons = cons->next; in configure_kgdboc()
|
D | serial_core.c | 233 if (uart_console(uport) && uport->cons->cflag) { in uart_port_startup() 234 tty->termios.c_cflag = uport->cons->cflag; in uart_port_startup() 235 uport->cons->cflag = 0; in uart_port_startup() 304 uport->cons->cflag = tty->termios.c_cflag; in uart_shutdown() 2037 if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) { in uart_set_options() 2171 console_stop(uport->cons); in uart_suspend_port() 2209 termios.c_cflag = uport->cons->cflag; in uart_resume_port() 2221 console_start(uport->cons); in uart_resume_port() 2345 if (port->cons && !(port->cons->flags & CON_ENABLED)) in uart_configure_port() 2346 register_console(port->cons); in uart_configure_port() [all …]
|
D | sccnxp.c | 941 s->uart.cons = &s->console; in sccnxp_probe() 942 s->uart.cons->device = uart_console_device; in sccnxp_probe() 943 s->uart.cons->write = sccnxp_console_write; in sccnxp_probe() 944 s->uart.cons->setup = sccnxp_console_setup; in sccnxp_probe() 945 s->uart.cons->flags = CON_PRINTBUFFER; in sccnxp_probe() 946 s->uart.cons->index = -1; in sccnxp_probe() 947 s->uart.cons->data = s; in sccnxp_probe() 948 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() 1194 hvc_resize(port->cons.hvc, port->cons.ws); in resize_console() 1262 port->cons.vtermno = pdrvdata.next_vtermno; in init_port_console() 1264 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console() 1265 if (IS_ERR(port->cons.hvc)) { in init_port_console() [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/net/ethernet/broadcom/bnxt/ |
D | bnxt_xdp.c | 73 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, in bnxt_rx_xdp() argument 92 rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_rx_xdp() 126 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 135 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 144 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
|
D | bnxt.c | 549 u16 cons = txr->tx_cons; in bnxt_tx_int() local 559 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int() 560 cons = NEXT_TX(cons); in bnxt_tx_int() 574 cons = NEXT_TX(cons); in bnxt_tx_int() 575 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int() 584 cons = NEXT_TX(cons); in bnxt_tx_int() 591 txr->tx_cons = cons; in bnxt_tx_int() 682 void bnxt_reuse_rx_data(struct bnxt_rx_ring_info *rxr, u16 cons, void *data) in bnxt_reuse_rx_data() argument 689 cons_rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_reuse_rx_data() 697 cons_bd = &rxr->rx_desc_ring[RX_RING(cons)][RX_IDX(cons)]; in bnxt_reuse_rx_data() [all …]
|
/drivers/iommu/ |
D | arm-smmu-v3.c | 520 u32 cons; member 713 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_full() 714 Q_WRP(q, q->prod) != Q_WRP(q, q->cons); in queue_full() 719 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_empty() 720 Q_WRP(q, q->prod) == Q_WRP(q, q->cons); in queue_empty() 725 q->cons = readl_relaxed(q->cons_reg); in queue_sync_cons() 730 u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1; in queue_inc_cons() local 732 q->cons = Q_OVF(q, q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons); in queue_inc_cons() 739 writel_relaxed(q->cons, q->cons_reg); in queue_inc_cons() 823 queue_read(ent, Q_ENT(q, q->cons), q->ent_dwords); in queue_remove_raw() [all …]
|
/drivers/net/ |
D | xen-netfront.c | 378 RING_IDX cons, prod; in xennet_tx_buf_gc() local 389 for (cons = queue->tx.rsp_cons; cons != prod; cons++) { in xennet_tx_buf_gc() 392 txrsp = RING_GET_RESPONSE(&queue->tx, cons); in xennet_tx_buf_gc() 746 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_extras() local 753 if (unlikely(cons + 1 == rp)) { in xennet_get_extras() 761 RING_GET_RESPONSE(&queue->rx, ++cons); in xennet_get_extras() 774 skb = xennet_get_rx_skb(queue, cons); in xennet_get_extras() 775 ref = xennet_get_rx_ref(queue, cons); in xennet_get_extras() 779 queue->rx.rsp_cons = cons; in xennet_get_extras() 790 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_responses() local [all …]
|
/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/infiniband/hw/qedr/ |
D | qedr_cm.c | 702 while (i < num_entries && qp->rq.cons != qp->rq.gsi_cons) { in qedr_gsi_poll_cq() 706 wc[i].wr_id = qp->rqe_wr_id[qp->rq.cons].wr_id; in qedr_gsi_poll_cq() 709 wc[i].status = (qp->rqe_wr_id[qp->rq.cons].rc) ? in qedr_gsi_poll_cq() 712 wc[i].byte_len = qp->rqe_wr_id[qp->rq.cons].sg_list[0].length; in qedr_gsi_poll_cq() 714 ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac); in qedr_gsi_poll_cq() 717 vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq() 722 wc[i].sl = (qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq() 730 while (i < num_entries && qp->sq.cons != qp->sq.gsi_cons) { in qedr_gsi_poll_cq() 734 wc[i].wr_id = qp->wqe_wr_id[qp->sq.cons].wr_id; in qedr_gsi_poll_cq() 746 num_entries, i, qp->rq.cons, qp->rq.gsi_cons, qp->sq.cons, in qedr_gsi_poll_cq()
|
/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/s390/cio/ |
D | device_status.c | 184 cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons; in ccw_device_accumulate_esw() 185 if (irb->esw.esw0.erw.cons) in ccw_device_accumulate_esw() 303 !(cdev_irb->esw.esw0.erw.cons)) in ccw_device_accumulate_irb() 367 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_basic_sense() 389 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_and_sense()
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_tx.c | 193 ring->cons = 0xffffffff; in mlx4_en_activate_tx_ring() 230 return ring->prod - ring->cons > ring->full_size; in mlx4_en_is_tx_ring_full() 361 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf() 363 ring->cons, ring->prod); in mlx4_en_free_tx_buf() 365 if ((u32) (ring->prod - ring->cons) > ring->size) { in mlx4_en_free_tx_buf() 371 while (ring->cons != ring->prod) { in mlx4_en_free_tx_buf() 373 ring->cons & ring->size_mask, in mlx4_en_free_tx_buf() 375 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf() 418 ring_cons = ACCESS_ONCE(ring->cons); in mlx4_en_process_tx_cq() 483 ACCESS_ONCE(ring->cons) = ring_cons + txbbs_skipped; in mlx4_en_process_tx_cq() [all …]
|
/drivers/infiniband/hw/bnxt_re/ |
D | qplib_fp.c | 187 qp->sq.hwq.cons = 0; in bnxt_qplib_del_flush_qp() 190 qp->rq.hwq.cons = 0; in bnxt_qplib_del_flush_qp() 292 raw_cons = hwq->cons; in bnxt_qplib_service_nq() 332 if (hwq->cons != raw_cons) { in bnxt_qplib_service_nq() 333 hwq->cons = raw_cons; in bnxt_qplib_service_nq() 334 NQ_DB_REARM(nq->bar_reg_iomem, hwq->cons, hwq->max_elements); in bnxt_qplib_service_nq() 346 sw_cons = HWQ_CMP(hwq->cons, hwq); in bnxt_qplib_nq_irq() 438 NQ_DB_REARM(nq->bar_reg_iomem, nq->hwq.cons, nq->hwq.max_elements); in bnxt_qplib_enable_nq() 1294 sq->hwq.prod, sq->hwq.cons, sq->hwq.max_elements, in bnxt_qplib_post_send() 1657 sw_cons = HWQ_CMP(cq_hwq->cons, cq_hwq); in bnxt_qplib_arm_cq() [all …]
|
D | qplib_res.h | 53 - HWQ_CMP(hwq->cons, hwq))\ 102 u32 cons; /* raw */ member
|
/drivers/input/misc/ |
D | xen-kbdfront.c | 176 __u32 cons, prod; in input_handler() local 182 for (cons = page->in_cons; cons != prod; cons++) in input_handler() 183 xenkbd_handle_event(info, &XENKBD_IN_RING_REF(page, cons)); in input_handler() 185 page->in_cons = cons; in input_handler()
|
/drivers/xen/ |
D | pvcalls-back.c | 104 RING_IDX cons, prod, size, wanted, array_size, masked_prod, masked_cons; in pvcalls_conn_back_read() local 112 cons = intf->in_cons; in pvcalls_conn_back_read() 121 size = pvcalls_queued(prod, cons, array_size); in pvcalls_conn_back_read() 134 masked_cons = pvcalls_mask(cons, array_size); in pvcalls_conn_back_read() 185 RING_IDX cons, prod, size, array_size; in pvcalls_conn_back_write() local 188 cons = intf->out_cons; in pvcalls_conn_back_write() 194 size = pvcalls_queued(prod, cons, array_size); in pvcalls_conn_back_write() 202 if (pvcalls_mask(prod, array_size) > pvcalls_mask(cons, array_size)) { in pvcalls_conn_back_write() 203 vec[0].iov_base = data->out + pvcalls_mask(cons, array_size); in pvcalls_conn_back_write() 208 vec[0].iov_base = data->out + pvcalls_mask(cons, array_size); in pvcalls_conn_back_write() [all …]
|
/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_cmn.h | 744 u16 cons; in bnx2x_tx_avail() local 747 cons = txdata->tx_bd_cons; in bnx2x_tx_avail() 749 used = SUB_S16(prod, cons); in bnx2x_tx_avail() 783 u16 cons; in bnx2x_has_rx_work() local 787 cons = RCQ_BD(fp->rx_comp_cons); in bnx2x_has_rx_work() 788 cqe = &fp->rx_comp_ring[cons]; in bnx2x_has_rx_work() 893 u16 cons, u16 prod) in bnx2x_reuse_rx_data() argument 895 struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons]; in bnx2x_reuse_rx_data() 897 struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons]; in bnx2x_reuse_rx_data()
|
/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 …]
|