/linux-6.1.9/drivers/infiniband/sw/rxe/ |
D | rxe_queue.h | 121 u32 cons; in queue_get_consumer() local 125 cons = q->index; in queue_get_consumer() 129 cons = smp_load_acquire(&q->buf->consumer_index); in queue_get_consumer() 132 cons = q->buf->consumer_index; in queue_get_consumer() 136 cons = smp_load_acquire(&q->buf->consumer_index); in queue_get_consumer() 140 return cons; in queue_get_consumer() 146 u32 cons = queue_get_consumer(q, type); in queue_empty() local 148 return ((prod - cons) & q->index_mask) == 0; in queue_empty() 154 u32 cons = queue_get_consumer(q, type); in queue_full() local 156 return ((prod + 1 - cons) & q->index_mask) == 0; in queue_full() [all …]
|
D | rxe_queue.c | 117 u32 cons; in resize_finish() local 124 cons = queue_get_consumer(q, type); in resize_finish() 126 while ((prod - cons) & q->index_mask) { in resize_finish() 128 queue_addr_from_index(q, cons), new_q->elem_size); in resize_finish() 130 cons = queue_next_index(q, cons); in resize_finish() 134 q->buf->consumer_index = cons; in resize_finish()
|
/linux-6.1.9/virt/lib/ |
D | irqbypass.c | 31 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-6.1.9/drivers/tty/serial/ |
D | kgdboc.c | 147 if (kgdboc_earlycon_io_ops.cons) in cleanup_earlycon() 173 struct console *cons; in configure_kgdboc() local 180 kgdboc_io_ops.cons = NULL; in configure_kgdboc() 196 for_each_console(cons) { in configure_kgdboc() 198 if (cons->device && cons->device(cons, &idx) == p && in configure_kgdboc() 200 kgdboc_io_ops.cons = cons; in configure_kgdboc() 435 if (!kgdboc_earlycon_io_ops.cons->read(kgdboc_earlycon_io_ops.cons, in kgdboc_earlycon_get_char() 444 kgdboc_earlycon_io_ops.cons->write(kgdboc_earlycon_io_ops.cons, &chr, in kgdboc_earlycon_put_char() 465 if (con == kgdboc_earlycon_io_ops.cons) in kgdboc_earlycon_pre_exp_handler() 488 if (!kgdboc_earlycon_io_ops.cons) in kgdboc_earlycon_deinit() [all …]
|
/linux-6.1.9/drivers/usb/gadget/function/ |
D | u_serial.c | 866 struct gs_console *cons = req->context; in gs_console_complete_out() local 875 spin_lock(&cons->lock); in gs_console_complete_out() 877 schedule_work(&cons->work); in gs_console_complete_out() 878 spin_unlock(&cons->lock); in gs_console_complete_out() 888 static void __gs_console_push(struct gs_console *cons) in __gs_console_push() argument 890 struct usb_request *req = cons->req; in __gs_console_push() 900 ep = cons->console.data; in __gs_console_push() 901 size = kfifo_out(&cons->buf, req->buf, ep->maxpacket); in __gs_console_push() 905 if (cons->missed && ep->maxpacket >= 64) { in __gs_console_push() 909 len = sprintf(buf, "\n[missed %zu bytes]\n", cons->missed); in __gs_console_push() [all …]
|
/linux-6.1.9/drivers/xen/xenbus/ |
D | xenbus_comms.c | 66 static int check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument 68 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes() 71 static void *get_output_chunk(XENSTORE_RING_IDX cons, in get_output_chunk() argument 76 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk() 77 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk() 81 static const void *get_input_chunk(XENSTORE_RING_IDX cons, in get_input_chunk() argument 85 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in get_input_chunk() 86 if ((prod - cons) < *len) in get_input_chunk() 87 *len = prod - cons; in get_input_chunk() 88 return buf + MASK_XENSTORE_IDX(cons); in get_input_chunk() [all …]
|
/linux-6.1.9/net/smc/ |
D | smc_rx.c | 56 union smc_host_cursor cons, size_t len) in smc_rx_update_consumer() argument 63 smc_curs_add(conn->rmb_desc->len, &cons, len); in smc_rx_update_consumer() 67 diff = smc_curs_comp(conn->rmb_desc->len, &cons, in smc_rx_update_consumer() 79 smc_curs_add(conn->rmb_desc->len, &cons, 1); in smc_rx_update_consumer() 87 smc_curs_copy(&conn->local_tx_ctrl.cons, &cons, conn); in smc_rx_update_consumer() 99 union smc_host_cursor cons; in smc_rx_update_cons() local 101 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_update_cons() 102 smc_rx_update_consumer(smc, cons, len); in smc_rx_update_cons() 281 union smc_host_cursor cons; in smc_rx_recv_urg() local 299 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_recv_urg() [all …]
|
D | smc_cdc.h | 47 union smc_cdc_cursor cons; /* piggy backed "ack" */ member 73 union smcd_cdc_cursor cons; member 217 smc_host_cursor_to_cdc(&peer->cons, &local->cons, save, conn); in smc_host_msg_to_cdc() 250 smc_cdc_cursor_to_host(&local->cons, &peer->cons, conn); in smcr_cdc_msg_to_host() 265 temp.wrap = peer->cons.wrap; in smcd_cdc_msg_to_host() 266 temp.count = peer->cons.count; in smcd_cdc_msg_to_host() 267 smc_curs_copy(&local->cons, &temp, conn); in smcd_cdc_msg_to_host() 268 local->prod_flags = peer->cons.prod_flags; in smcd_cdc_msg_to_host() 269 local->conn_state_flags = peer->cons.conn_state_flags; in smcd_cdc_msg_to_host()
|
D | smc_cdc.c | 246 curs.acurs.counter = atomic64_read(&conn->local_tx_ctrl.cons.acurs); in smcd_cdc_msg_send() 247 cdc.cons.wrap = curs.wrap; in smcd_cdc_msg_send() 248 cdc.cons.count = curs.count; in smcd_cdc_msg_send() 249 cdc.cons.prod_flags = conn->local_tx_ctrl.prod_flags; in smcd_cdc_msg_send() 250 cdc.cons.conn_state_flags = conn->local_tx_ctrl.conn_state_flags; in smcd_cdc_msg_send() 327 smc_curs_copy(&cons_old, &conn->local_rx_ctrl.cons, conn); in smc_cdc_msg_recv_action() 331 &conn->local_rx_ctrl.cons); in smc_cdc_msg_recv_action() 420 smcd_curs_copy(&cdc.cons, &data_cdc->cons, conn); in smcd_cdc_rx_tsklet()
|
/linux-6.1.9/drivers/platform/mellanox/ |
D | mlxbf-tmfifo.c | 121 struct virtio_console_config cons; member 414 static void mlxbf_tmfifo_console_output_one(struct mlxbf_tmfifo_vdev *cons, in mlxbf_tmfifo_console_output_one() argument 419 struct virtio_device *vdev = &cons->vdev; in mlxbf_tmfifo_console_output_one() 427 seg = CIRC_SPACE_TO_END(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_output_one() 430 memcpy(cons->tx_buf.buf + cons->tx_buf.head, addr, len); in mlxbf_tmfifo_console_output_one() 432 memcpy(cons->tx_buf.buf + cons->tx_buf.head, addr, seg); in mlxbf_tmfifo_console_output_one() 434 memcpy(cons->tx_buf.buf, addr, len - seg); in mlxbf_tmfifo_console_output_one() 436 cons->tx_buf.head = (cons->tx_buf.head + len) % in mlxbf_tmfifo_console_output_one() 447 static void mlxbf_tmfifo_console_output(struct mlxbf_tmfifo_vdev *cons, in mlxbf_tmfifo_console_output() argument 457 avail = CIRC_SPACE(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_output() [all …]
|
/linux-6.1.9/tools/testing/selftests/bpf/ |
D | xsk.h | 208 static inline __u32 xsk_ring_cons__peek(struct xsk_ring_cons *cons, __u32 nb, __u32 *idx) in xsk_ring_cons__peek() argument 210 __u32 entries = xsk_cons_nb_avail(cons, nb); in xsk_ring_cons__peek() 213 *idx = cons->cached_cons; in xsk_ring_cons__peek() 214 cons->cached_cons += entries; in xsk_ring_cons__peek() 220 static inline void xsk_ring_cons__cancel(struct xsk_ring_cons *cons, __u32 nb) in xsk_ring_cons__cancel() argument 222 cons->cached_cons -= nb; in xsk_ring_cons__cancel() 225 static inline void xsk_ring_cons__release(struct xsk_ring_cons *cons, __u32 nb) in xsk_ring_cons__release() argument 230 libbpf_smp_store_release(cons->consumer, *cons->consumer + nb); in xsk_ring_cons__release()
|
/linux-6.1.9/net/9p/ |
D | trans_xen.c | 106 RING_IDX cons, prod; in p9_xen_write_todo() local 108 cons = ring->intf->out_cons; in p9_xen_write_todo() 113 xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE(ring)) >= size; in p9_xen_write_todo() 119 RING_IDX cons, prod, masked_cons, masked_prod; in p9_xen_request() local 143 cons = ring->intf->out_cons; in p9_xen_request() 148 xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE(ring)) < size) { in p9_xen_request() 154 masked_cons = xen_9pfs_mask(cons, XEN_9PFS_RING_SIZE(ring)); in p9_xen_request() 175 RING_IDX cons, prod, masked_cons, masked_prod; in p9_xen_response() local 184 cons = ring->intf->in_cons; in p9_xen_response() 188 if (xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE(ring)) < in p9_xen_response() [all …]
|
/linux-6.1.9/drivers/tty/hvc/ |
D | hvc_xen.c | 80 static inline void notify_daemon(struct xencons_info *cons) in notify_daemon() argument 83 notify_remote_via_evtchn(cons->evtchn); in notify_daemon() 89 XENCONS_RING_IDX cons, prod; in __write_console() local 93 cons = intf->out_cons; in __write_console() 97 if ((prod - cons) > sizeof(intf->out)) { in __write_console() 102 while ((sent < len) && ((prod - cons) < sizeof(intf->out))) in __write_console() 116 struct xencons_info *cons = vtermno_to_xencons(vtermno); in domU_write_console() local 117 if (cons == NULL) in domU_write_console() 127 int sent = __write_console(cons, data, len); in domU_write_console() 145 XENCONS_RING_IDX cons, prod; in domU_read_console() local [all …]
|
/linux-6.1.9/drivers/tty/vt/ |
D | selection.c | 41 struct vc_data *cons; /* must not be deallocated */ member 57 invert_screen(vc_sel.cons, s, e-s+2, true); in highlight() 63 complement_pos(vc_sel.cons, where); in highlight_pointer() 70 return screen_glyph_unicode(vc_sel.cons, n / 2); in sel_pos() 71 return inverse_translate(vc_sel.cons, screen_glyph(vc_sel.cons, n), in sel_pos() 93 return vc == vc_sel.cons; in vc_is_sel() 346 if (vc_sel.cons != vc) { in vc_selection() 348 vc_sel.cons = vc; in vc_selection()
|
/linux-6.1.9/include/xen/interface/io/ |
D | ring.h | 406 RING_IDX cons, \ 411 if (prod == cons) \ 415 cons = name##_mask(cons, ring_size); \ 417 if (prod == cons) \ 420 if (prod > cons) \ 421 size = prod - cons; \ 423 size = ring_size - (cons - prod); \
|
/linux-6.1.9/drivers/char/ |
D | virtio_console.c | 210 struct console cons; member 246 struct console *cons; in find_port_by_vtermno() local 250 list_for_each_entry(cons, &pdrvdata.consoles, list) { in find_port_by_vtermno() 251 if (cons->vtermno == vtermno) { in find_port_by_vtermno() 252 port = container_of(cons, struct port, cons); in find_port_by_vtermno() 334 if (port->cons.hvc) in is_console_port() 1179 hvc_resize(port->cons.hvc, port->cons.ws); in resize_console() 1247 port->cons.vtermno = pdrvdata.next_vtermno; in init_port_console() 1249 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console() 1250 if (IS_ERR(port->cons.hvc)) { in init_port_console() [all …]
|
/linux-6.1.9/drivers/net/ethernet/broadcom/bnxt/ |
D | bnxt_xdp.c | 180 u16 cons, u8 *data_ptr, unsigned int len, in bnxt_xdp_buff_init() argument 190 rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_xdp_buff_init() 221 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, in bnxt_rx_xdp() argument 266 rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_rx_xdp() 280 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 290 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 297 rx_buf = &rxr->rx_buf_ring[cons]; in bnxt_rx_xdp() 307 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 327 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
|
/linux-6.1.9/include/linux/qed/ |
D | qed_chain.h | 209 u32 cons = qed_chain_get_cons_idx(chain); in qed_chain_get_elem_used() local 213 if (prod < cons) in qed_chain_get_elem_used() 216 used = (u16)(prod - cons); in qed_chain_get_elem_used() 218 used -= (u16)(prod / elem_per_page - cons / elem_per_page); in qed_chain_get_elem_used() 231 u64 cons = qed_chain_get_cons_idx_u32(chain); in qed_chain_get_elem_used_u32() local 235 if (prod < cons) in qed_chain_get_elem_used_u32() 238 used = (u32)(prod - cons); in qed_chain_get_elem_used_u32() 240 used -= (u32)(prod / elem_per_page - cons / elem_per_page); in qed_chain_get_elem_used_u32()
|
/linux-6.1.9/drivers/infiniband/hw/bnxt_re/ |
D | qplib_res.h | 70 - HWQ_CMP(hwq->cons, hwq))\ 157 u32 cons; /* raw */ member 374 hwq->cons = (hwq->cons + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_cons() 382 key = info->hwq->cons & (info->hwq->max_elements - 1); in bnxt_qplib_ring_db32() 397 key |= (info->hwq->cons & (info->hwq->max_elements - 1)) & in bnxt_qplib_ring_db()
|
/linux-6.1.9/drivers/gpu/drm/xen/ |
D | xen_drm_front_evtchnl.c | 86 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-6.1.9/drivers/gpu/drm/qxl/ |
D | qxl_cmd.c | 85 ret = header->prod - header->cons < header->num_items; in qxl_check_header() 87 header->notify_on_cons = header->cons + 1; in qxl_check_header() 99 ret = header->prod == header->cons; in qxl_check_idle() 113 if (header->prod - header->cons == header->num_items) { in qxl_ring_push() 114 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()
|
/linux-6.1.9/drivers/iommu/arm/arm-smmu-v3/ |
D | arm-smmu-v3.c | 106 u32 space, prod, cons; in queue_has_space() local 109 cons = Q_IDX(q, q->cons); in queue_has_space() 111 if (Q_WRP(q, q->prod) == Q_WRP(q, q->cons)) in queue_has_space() 112 space = (1 << q->max_n_shift) - (prod - cons); in queue_has_space() 114 space = cons - prod; in queue_has_space() 121 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_full() 122 Q_WRP(q, q->prod) != Q_WRP(q, q->cons); in queue_full() 127 return Q_IDX(q, q->prod) == Q_IDX(q, q->cons) && in queue_empty() 128 Q_WRP(q, q->prod) == Q_WRP(q, q->cons); in queue_empty() 133 return ((Q_WRP(q, q->cons) == Q_WRP(q, prod)) && in queue_consumed() [all …]
|
/linux-6.1.9/drivers/tty/ |
D | mips_ejtag_fdc.c | 293 struct console cons; member 304 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_write() local 305 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_write() 318 regs = cons->regs[cpu]; in mips_ejtag_fdc_console_write() 322 cons->regs[cpu] = regs; in mips_ejtag_fdc_console_write() 359 struct mips_ejtag_fdc_console *cons = in mips_ejtag_fdc_console_device() local 360 container_of(c, struct mips_ejtag_fdc_console, cons); in mips_ejtag_fdc_console_device() 363 return cons->tty_drv; in mips_ejtag_fdc_console_device() 386 register_console(&c->cons); in mips_ejtag_fdc_console_init() 393 .cons = { [all …]
|
/linux-6.1.9/drivers/infiniband/hw/qedr/ |
D | qedr_roce_cm.c | 682 while (i < num_entries && qp->rq.cons != qp->rq.gsi_cons) { in qedr_gsi_poll_cq() 686 wc[i].wr_id = qp->rqe_wr_id[qp->rq.cons].wr_id; in qedr_gsi_poll_cq() 689 wc[i].status = (qp->rqe_wr_id[qp->rq.cons].rc) ? in qedr_gsi_poll_cq() 692 wc[i].byte_len = qp->rqe_wr_id[qp->rq.cons].sg_list[0].length; in qedr_gsi_poll_cq() 694 ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac); in qedr_gsi_poll_cq() 697 vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq() 702 wc[i].sl = (qp->rqe_wr_id[qp->rq.cons].vlan & in qedr_gsi_poll_cq() 710 while (i < num_entries && qp->sq.cons != qp->sq.gsi_cons) { in qedr_gsi_poll_cq() 714 wc[i].wr_id = qp->wqe_wr_id[qp->sq.cons].wr_id; in qedr_gsi_poll_cq() 726 num_entries, i, qp->rq.cons, qp->rq.gsi_cons, qp->sq.cons, in qedr_gsi_poll_cq()
|
/linux-6.1.9/arch/mips/sibyte/common/ |
D | cfe_console.c | 13 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
|