Home
last modified time | relevance | path

Searched refs:cons (Results 1 – 25 of 149) sorted by relevance

123456

/Linux-v5.4/virt/lib/
Dirqbypass.c31 struct irq_bypass_consumer *cons) in __connect() argument
37 if (cons->stop) in __connect()
38 cons->stop(cons); in __connect()
41 ret = prod->add_consumer(prod, cons); in __connect()
44 ret = cons->add_producer(cons, prod); in __connect()
46 prod->del_consumer(prod, cons); in __connect()
49 if (cons->start) in __connect()
50 cons->start(cons); in __connect()
59 struct irq_bypass_consumer *cons) in __disconnect() argument
63 if (cons->stop) in __disconnect()
[all …]
/Linux-v5.4/net/smc/
Dsmc_rx.c54 union smc_host_cursor cons, size_t len) in smc_rx_update_consumer() argument
61 smc_curs_add(conn->rmb_desc->len, &cons, len); in smc_rx_update_consumer()
65 diff = smc_curs_comp(conn->rmb_desc->len, &cons, in smc_rx_update_consumer()
77 smc_curs_add(conn->rmb_desc->len, &cons, 1); in smc_rx_update_consumer()
85 smc_curs_copy(&conn->local_tx_ctrl.cons, &cons, conn); in smc_rx_update_consumer()
97 union smc_host_cursor cons; in smc_rx_update_cons() local
99 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_update_cons()
100 smc_rx_update_consumer(smc, cons, len); in smc_rx_update_cons()
225 union smc_host_cursor cons; in smc_rx_recv_urg() local
242 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_recv_urg()
[all …]
Dsmc_cdc.h47 union smc_cdc_cursor cons; /* piggy backed "ack" */ member
73 union smcd_cdc_cursor cons; member
234 smc_host_cursor_to_cdc(&peer->cons, &local->cons, save, conn); in smc_host_msg_to_cdc()
267 smc_cdc_cursor_to_host(&local->cons, &peer->cons, conn); in smcr_cdc_msg_to_host()
282 temp.wrap = peer->cons.wrap; in smcd_cdc_msg_to_host()
283 temp.count = peer->cons.count; in smcd_cdc_msg_to_host()
284 smc_curs_copy(&local->cons, &temp, conn); in smcd_cdc_msg_to_host()
285 local->prod_flags = peer->cons.prod_flags; in smcd_cdc_msg_to_host()
286 local->conn_state_flags = peer->cons.conn_state_flags; in smcd_cdc_msg_to_host()
Dsmc_cdc.c188 curs.acurs.counter = atomic64_read(&conn->local_tx_ctrl.cons.acurs); in smcd_cdc_msg_send()
189 cdc.cons.wrap = curs.wrap; in smcd_cdc_msg_send()
190 cdc.cons.count = curs.count; in smcd_cdc_msg_send()
191 cdc.cons.prod_flags = conn->local_tx_ctrl.prod_flags; in smcd_cdc_msg_send()
192 cdc.cons.conn_state_flags = conn->local_tx_ctrl.conn_state_flags; in smcd_cdc_msg_send()
247 smc_curs_copy(&cons_old, &conn->local_rx_ctrl.cons, conn); in smc_cdc_msg_recv_action()
251 &conn->local_rx_ctrl.cons); in smc_cdc_msg_recv_action()
336 smcd_curs_copy(&cdc.cons, &data_cdc->cons, conn); in smcd_cdc_rx_tsklet()
Dsmc_tx.c406 union smc_host_cursor sent, prep, prod, cons; in smc_tx_rdma_writes() local
425 smc_curs_copy(&cons, &conn->local_rx_ctrl.cons, conn); in smc_tx_rdma_writes()
435 if (prod.wrap == cons.wrap) { in smc_tx_rdma_writes()
592 union smc_host_cursor cfed, cons, prod; in smc_tx_consumer_update() local
596 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_tx_consumer_update()
598 to_confirm = smc_curs_diff(conn->rmb_desc->len, &cfed, &cons); in smc_tx_consumer_update()
/Linux-v5.4/drivers/xen/xenbus/
Dxenbus_comms.c74 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 …]
/Linux-v5.4/drivers/tty/serial/
Dkgdboc.c149 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()
Dtegra-tcu.c147 static void tegra_tcu_console_write(struct console *cons, const char *s, in tegra_tcu_console_write() argument
150 struct tegra_tcu *tcu = container_of(cons, struct tegra_tcu, console); in tegra_tcu_console_write()
155 static int tegra_tcu_console_setup(struct console *cons, char *options) in tegra_tcu_console_setup() argument
221 tcu->driver.cons = &tcu->console; in tegra_tcu_probe()
/Linux-v5.4/net/9p/
Dtrans_xen.c129 RING_IDX cons, prod; in p9_xen_write_todo() local
131 cons = ring->intf->out_cons; in p9_xen_write_todo()
136 xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE) >= size; in p9_xen_write_todo()
142 RING_IDX cons, prod, masked_cons, masked_prod; in p9_xen_request() local
166 cons = ring->intf->out_cons; in p9_xen_request()
170 if (XEN_9PFS_RING_SIZE - xen_9pfs_queued(prod, cons, in p9_xen_request()
177 masked_cons = xen_9pfs_mask(cons, XEN_9PFS_RING_SIZE); in p9_xen_request()
197 RING_IDX cons, prod, masked_cons, masked_prod; in p9_xen_response() local
206 cons = ring->intf->in_cons; in p9_xen_response()
210 if (xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE) < in p9_xen_response()
[all …]
/Linux-v5.4/drivers/platform/mellanox/
Dmlxbf-tmfifo.c121 struct virtio_console_config cons; member
411 static void mlxbf_tmfifo_console_output_one(struct mlxbf_tmfifo_vdev *cons, in mlxbf_tmfifo_console_output_one() argument
416 struct virtio_device *vdev = &cons->vdev; in mlxbf_tmfifo_console_output_one()
424 seg = CIRC_SPACE_TO_END(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_output_one()
427 memcpy(cons->tx_buf.buf + cons->tx_buf.head, addr, len); in mlxbf_tmfifo_console_output_one()
429 memcpy(cons->tx_buf.buf + cons->tx_buf.head, addr, seg); in mlxbf_tmfifo_console_output_one()
431 memcpy(cons->tx_buf.buf, addr, len - seg); in mlxbf_tmfifo_console_output_one()
433 cons->tx_buf.head = (cons->tx_buf.head + len) % in mlxbf_tmfifo_console_output_one()
444 static void mlxbf_tmfifo_console_output(struct mlxbf_tmfifo_vdev *cons, in mlxbf_tmfifo_console_output() argument
454 avail = CIRC_SPACE(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_output()
[all …]
/Linux-v5.4/drivers/tty/hvc/
Dhvc_xen.c73 static inline void notify_daemon(struct xencons_info *cons) in notify_daemon() argument
76 notify_remote_via_evtchn(cons->evtchn); in notify_daemon()
82 XENCONS_RING_IDX cons, prod; in __write_console() local
86 cons = intf->out_cons; in __write_console()
89 BUG_ON((prod - cons) > sizeof(intf->out)); in __write_console()
91 while ((sent < len) && ((prod - cons) < sizeof(intf->out))) in __write_console()
105 struct xencons_info *cons = vtermno_to_xencons(vtermno); in domU_write_console() local
106 if (cons == NULL) in domU_write_console()
116 int sent = __write_console(cons, data, len); in domU_write_console()
131 XENCONS_RING_IDX cons, prod; in domU_read_console() local
[all …]
/Linux-v5.4/tools/lib/bpf/
Dxsk.h138 static inline size_t xsk_ring_cons__peek(struct xsk_ring_cons *cons, in xsk_ring_cons__peek() argument
141 size_t entries = xsk_cons_nb_avail(cons, nb); in xsk_ring_cons__peek()
149 *idx = cons->cached_cons; in xsk_ring_cons__peek()
150 cons->cached_cons += entries; in xsk_ring_cons__peek()
156 static inline void xsk_ring_cons__release(struct xsk_ring_cons *cons, size_t nb) in xsk_ring_cons__release() argument
163 *cons->consumer += nb; in xsk_ring_cons__release()
/Linux-v5.4/include/xen/interface/io/
Dring.h391 RING_IDX cons, \
396 if (prod == cons) \
400 cons = name##_mask(cons, ring_size); \
402 if (prod == cons) \
405 if (prod > cons) \
406 size = prod - cons; \
408 size = ring_size - (cons - prod); \
/Linux-v5.4/drivers/char/
Dvirtio_console.c209 struct console cons; member
245 struct console *cons; in find_port_by_vtermno() local
249 list_for_each_entry(cons, &pdrvdata.consoles, list) { in find_port_by_vtermno()
250 if (cons->vtermno == vtermno) { in find_port_by_vtermno()
251 port = container_of(cons, struct port, cons); in find_port_by_vtermno()
333 if (port->cons.hvc) in is_console_port()
1180 hvc_resize(port->cons.hvc, port->cons.ws); in resize_console()
1248 port->cons.vtermno = pdrvdata.next_vtermno; in init_port_console()
1250 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console()
1251 if (IS_ERR(port->cons.hvc)) { in init_port_console()
[all …]
/Linux-v5.4/drivers/iommu/
Darm-smmu-v3.c494 u32 cons; member
498 atomic_t cons; member
714 u32 space, prod, cons; in queue_has_space() local
717 cons = Q_IDX(q, q->cons); in queue_has_space()
719 if (Q_WRP(q, q->prod) == Q_WRP(q, q->cons)) in queue_has_space()
720 space = (1 << q->max_n_shift) - (prod - cons); in queue_has_space()
722 space = cons - prod; in queue_has_space()
729 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_full()
730 Q_WRP(q, q->prod) != Q_WRP(q, q->cons); in queue_full()
735 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_empty()
[all …]
/Linux-v5.4/drivers/net/xen-netback/
Drx.c38 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()
/Linux-v5.4/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_xdp.c111 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, in bnxt_rx_xdp() argument
129 rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_rx_xdp()
166 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
175 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
189 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
208 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
/Linux-v5.4/drivers/gpu/drm/xen/
Dxen_drm_front_evtchnl.c86 u32 cons, prod; in evtchnl_interrupt_evt() local
100 for (cons = page->in_cons; cons != prod; cons++) { in evtchnl_interrupt_evt()
103 event = &XENDISPL_IN_RING_REF(page, cons); in evtchnl_interrupt_evt()
114 page->in_cons = cons; in evtchnl_interrupt_evt()
/Linux-v5.4/drivers/gpu/drm/qxl/
Dqxl_cmd.c93 ret = header->prod - header->cons < header->num_items; in qxl_check_header()
95 header->notify_on_cons = header->cons + 1; in qxl_check_header()
107 ret = header->prod == header->cons; in qxl_check_idle()
121 if (header->prod - header->cons == header->num_items) { in qxl_ring_push()
122 header->notify_on_cons = header->cons + 1; in qxl_ring_push()
168 if (header->cons == header->prod) { in qxl_ring_pop()
169 header->notify_on_prod = header->cons + 1; in qxl_ring_pop()
174 idx = header->cons & (ring->n_elements - 1); in qxl_ring_pop()
179 header->cons++; in qxl_ring_pop()
/Linux-v5.4/arch/mips/sibyte/common/
Dcfe_console.c13 static void cfe_console_write(struct console *cons, const char *str, in cfe_console_write() argument
44 static int cfe_console_setup(struct console *cons, char *str) in cfe_console_setup() argument
/Linux-v5.4/drivers/tty/
Dmips_ejtag_fdc.c292 struct console cons; member
303 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_write() local
304 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_write()
317 regs = cons->regs[cpu]; in mips_ejtag_fdc_console_write()
321 cons->regs[cpu] = regs; in mips_ejtag_fdc_console_write()
358 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_device() local
359 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_device()
362 return cons->tty_drv; in mips_ejtag_fdc_console_device()
385 register_console(&c->cons); in mips_ejtag_fdc_console_init()
392 .cons = {
[all …]
/Linux-v5.4/drivers/net/
Dxen-netfront.c376 RING_IDX cons, prod; in xennet_tx_buf_gc() local
387 for (cons = queue->tx.rsp_cons; cons != prod; cons++) { in xennet_tx_buf_gc()
390 txrsp = RING_GET_RESPONSE(&queue->tx, cons); in xennet_tx_buf_gc()
744 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_extras() local
751 if (unlikely(cons + 1 == rp)) { in xennet_get_extras()
759 RING_GET_RESPONSE(&queue->rx, ++cons); in xennet_get_extras()
772 skb = xennet_get_rx_skb(queue, cons); in xennet_get_extras()
773 ref = xennet_get_rx_ref(queue, cons); in xennet_get_extras()
777 queue->rx.rsp_cons = cons; in xennet_get_extras()
788 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_responses() local
[all …]
/Linux-v5.4/drivers/infiniband/hw/qedr/
Dqedr_roce_cm.c683 while (i < num_entries && qp->rq.cons != qp->rq.gsi_cons) { in qedr_gsi_poll_cq()
687 wc[i].wr_id = qp->rqe_wr_id[qp->rq.cons].wr_id; in qedr_gsi_poll_cq()
690 wc[i].status = (qp->rqe_wr_id[qp->rq.cons].rc) ? in qedr_gsi_poll_cq()
693 wc[i].byte_len = qp->rqe_wr_id[qp->rq.cons].sg_list[0].length; in qedr_gsi_poll_cq()
695 ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac); in qedr_gsi_poll_cq()
698 vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq()
703 wc[i].sl = (qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq()
711 while (i < num_entries && qp->sq.cons != qp->sq.gsi_cons) { in qedr_gsi_poll_cq()
715 wc[i].wr_id = qp->wqe_wr_id[qp->sq.cons].wr_id; in qedr_gsi_poll_cq()
727 num_entries, i, qp->rq.cons, qp->rq.gsi_cons, qp->sq.cons, in qedr_gsi_poll_cq()
/Linux-v5.4/drivers/s390/cio/
Ddevice_status.c184 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->dma_area->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_basic_sense()
389 cdev->private->dma_area->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_and_sense()
/Linux-v5.4/include/linux/
Dserial_core.h24 ((port)->cons && (port)->cons->index == (port)->line)
163 struct console *cons; /* struct console, if any */ member
310 struct console *cons; member
526 if (port->cons && port->cons->index == port->line) { in uart_handle_break()

123456