/linux/drivers/infiniband/sw/rxe/ |
A D | rxe_queue.h | 122 u32 cons; in queue_get_consumer() local 126 cons = q->index; in queue_get_consumer() 133 cons = q->buf->consumer_index; in queue_get_consumer() 141 return cons; in queue_get_consumer() 201 u32 cons; in queue_advance_consumer() local 205 cons = q->index; in queue_advance_consumer() 206 cons = (cons + 1) & q->index_mask; in queue_advance_consumer() 207 q->index = cons; in queue_advance_consumer() 216 cons = q->buf->consumer_index; in queue_advance_consumer() 217 cons = (cons + 1) & q->index_mask; in queue_advance_consumer() [all …]
|
A D | rxe_queue.c | 116 u32 cons; in resize_finish() local 122 cons = queue_get_consumer(q, type); in resize_finish() 126 queue_addr_from_index(q, cons), new_q->elem_size); in resize_finish() 128 cons = queue_next_index(q, cons); in resize_finish() 132 q->buf->consumer_index = cons; in resize_finish()
|
/linux/virt/lib/ |
A D | irqbypass.c | 37 if (cons->stop) in __connect() 38 cons->stop(cons); in __connect() 44 ret = cons->add_producer(cons, prod); in __connect() 49 if (cons->start) in __connect() 50 cons->start(cons); in __connect() 63 if (cons->stop) in __disconnect() 64 cons->stop(cons); in __disconnect() 66 cons->del_producer(cons, prod); in __disconnect() 69 prod->del_consumer(prod, cons); in __disconnect() 71 if (cons->start) in __disconnect() [all …]
|
/linux/drivers/tty/serial/ |
A 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() 488 if (!kgdboc_earlycon_io_ops.cons) in kgdboc_earlycon_deinit() 504 kgdboc_earlycon_io_ops.cons->exit(kgdboc_earlycon_io_ops.cons); in kgdboc_earlycon_deinit() [all …]
|
/linux/drivers/usb/gadget/function/ |
A D | u_serial.c | 943 if (cons->req && !cons->req->length) in gs_console_write() 961 if (!cons) in gs_console_connect() 973 cons->req = req; in gs_console_connect() 990 if (!cons) in gs_console_disconnect() 995 req = cons->req; in gs_console_disconnect() 997 cons->req = NULL; in gs_console_disconnect() 1017 if (!cons) in gs_console_init() 1032 kfree(cons); in gs_console_init() 1051 if (!cons) in gs_console_exit() 1057 if (cons->req) in gs_console_exit() [all …]
|
/linux/net/smc/ |
A D | smc_rx.c | 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() 223 union smc_host_cursor cons; in smc_rx_recv_urg() local 241 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_recv_urg() 249 smc_rx_update_consumer(smc, cons, 0); in smc_rx_recv_urg() 289 union smc_host_cursor cons; in smc_rx_recvmsg() local 385 smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn); in smc_rx_recvmsg() 398 cons.count); in smc_rx_recvmsg() [all …]
|
A 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()
|
A D | smc_cdc.c | 235 curs.acurs.counter = atomic64_read(&conn->local_tx_ctrl.cons.acurs); in smcd_cdc_msg_send() 236 cdc.cons.wrap = curs.wrap; in smcd_cdc_msg_send() 237 cdc.cons.count = curs.count; in smcd_cdc_msg_send() 238 cdc.cons.prod_flags = conn->local_tx_ctrl.prod_flags; in smcd_cdc_msg_send() 239 cdc.cons.conn_state_flags = conn->local_tx_ctrl.conn_state_flags; in smcd_cdc_msg_send() 316 smc_curs_copy(&cons_old, &conn->local_rx_ctrl.cons, conn); in smc_cdc_msg_recv_action() 320 &conn->local_rx_ctrl.cons); in smc_cdc_msg_recv_action() 405 smcd_curs_copy(&cdc.cons, &data_cdc->cons, conn); in smcd_cdc_rx_tsklet()
|
/linux/drivers/xen/xenbus/ |
A D | xenbus_comms.c | 77 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_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() 109 XENSTORE_RING_IDX cons, prod; in xb_write() local 117 cons = intf->req_cons; in xb_write() 119 if (!check_indexes(cons, prod)) { in xb_write() 161 XENSTORE_RING_IDX cons, prod; in xb_read() local 169 cons = intf->rsp_cons; in xb_read() 171 if (cons == prod) in xb_read() [all …]
|
/linux/drivers/platform/mellanox/ |
A D | mlxbf-tmfifo.c | 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() 436 cons->tx_buf.head = (cons->tx_buf.head + len) % in mlxbf_tmfifo_console_output_one() 457 avail = CIRC_SPACE(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_output() 512 if (!cons || !cons->tx_buf.buf) in mlxbf_tmfifo_console_tx() 516 size = CIRC_CNT(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_tx() 534 addr = cons->tx_buf.buf + cons->tx_buf.tail; in mlxbf_tmfifo_console_tx() 536 seg = CIRC_CNT_TO_END(cons->tx_buf.head, cons->tx_buf.tail, in mlxbf_tmfifo_console_tx() 548 cons->tx_buf.tail = (cons->tx_buf.tail + sizeof(u64)) % in mlxbf_tmfifo_console_tx() [all …]
|
/linux/net/9p/ |
A 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() 119 RING_IDX cons, prod, masked_cons, masked_prod; in p9_xen_request() local 143 cons = ring->intf->out_cons; 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() 205 cons += h.size; in p9_xen_response() 207 ring->intf->in_cons = cons; in p9_xen_response() 221 cons += h.size; in p9_xen_response() [all …]
|
/linux/tools/lib/bpf/ |
A 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/drivers/tty/hvc/ |
A D | hvc_xen.c | 78 notify_remote_via_evtchn(cons->evtchn); in notify_daemon() 84 XENCONS_RING_IDX cons, prod; in __write_console() local 88 cons = intf->out_cons; in __write_console() 92 if ((prod - cons) > sizeof(intf->out)) { in __write_console() 112 if (cons == NULL) in domU_write_console() 122 int sent = __write_console(cons, data, len); in domU_write_console() 140 XENCONS_RING_IDX cons, prod; in domU_read_console() local 149 cons = intf->in_cons; in domU_read_console() 153 if ((prod - cons) > sizeof(intf->in)) { in domU_read_console() 158 while (cons != prod && recv < len) in domU_read_console() [all …]
|
/linux/drivers/tty/vt/ |
A 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), 0); in sel_pos() 92 return vc == vc_sel.cons; in vc_is_sel() 345 if (vc_sel.cons != vc) { in vc_selection() 347 vc_sel.cons = vc; in vc_selection()
|
/linux/include/xen/interface/io/ |
A D | ring.h | 397 RING_IDX cons, \ 402 if (prod == cons) \ 406 cons = name##_mask(cons, ring_size); \ 408 if (prod == cons) \ 411 if (prod > cons) \ 412 size = prod - cons; \ 414 size = ring_size - (cons - prod); \
|
/linux/drivers/char/ |
A D | virtio_console.c | 210 struct console cons; member 246 struct console *cons; in find_port_by_vtermno() local 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() 1249 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console() 1254 port->cons.hvc = NULL; in init_port_console() 1323 port->cons.ws.ws_row = rows; in set_console_size() 1378 port->cons.hvc = NULL; in add_port() 1381 port->cons.ws.ws_row = port->cons.ws.ws_col = 0; in add_port() [all …]
|
/linux/include/linux/qed/ |
A 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/drivers/iommu/arm/arm-smmu-v3/ |
A D | arm-smmu-v3.c | 108 u32 space, prod, cons; in queue_has_space() local 111 cons = Q_IDX(q, q->cons); in queue_has_space() 116 space = cons - prod; in queue_has_space() 153 u32 cons = (Q_WRP(q, q->cons) | Q_IDX(q, q->cons)) + 1; in queue_inc_cons() local 154 q->cons = Q_OVF(q->cons) | Q_WRP(q, cons) | Q_IDX(q, cons); in queue_inc_cons() 760 head.cons = llq.cons; in arm_smmu_cmdq_issue_cmdlist() 845 WRITE_ONCE(cmdq->q.llq.cons, llq.cons); in arm_smmu_cmdq_issue_cmdlist() 1572 llq->cons = Q_OVF(llq->prod) | Q_WRP(llq, llq->cons) | in arm_smmu_evtq_thread() 1573 Q_IDX(llq, llq->cons); in arm_smmu_evtq_thread() 1631 llq->cons = Q_OVF(llq->prod) | Q_WRP(llq, llq->cons) | in arm_smmu_priq_thread() [all …]
|
/linux/drivers/infiniband/hw/bnxt_re/ |
A D | qplib_res.h | 70 - HWQ_CMP(hwq->cons, hwq))\ 157 u32 cons; /* raw */ member 381 hwq->cons = (hwq->cons + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_cons() 389 key = info->hwq->cons & (info->hwq->max_elements - 1); in bnxt_qplib_ring_db32() 404 key |= (info->hwq->cons & (info->hwq->max_elements - 1)) & in bnxt_qplib_ring_db()
|
/linux/drivers/net/ethernet/broadcom/bnxt/ |
A D | bnxt_xdp.c | 111 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() 162 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 171 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 185 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp() 204 bnxt_reuse_rx_data(rxr, cons, page); in bnxt_rx_xdp()
|
/linux/drivers/gpu/drm/xen/ |
A 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/drivers/gpu/drm/qxl/ |
A D | qxl_cmd.c | 93 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/drivers/tty/ |
A 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 363 return cons->tty_drv; in mips_ejtag_fdc_console_device() 386 register_console(&c->cons); in mips_ejtag_fdc_console_init() 393 .cons = { 594 if (channel == mips_ejtag_fdc_con.cons.index) { in mips_ejtag_fdc_handle() [all …]
|
/linux/drivers/infiniband/hw/qedr/ |
A 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/drivers/s390/cio/ |
A 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->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()
|