Home
last modified time | relevance | path

Searched refs:ring (Results 1 – 25 of 93) sorted by relevance

1234

/openbmc/qemu/hw/net/rocker/
H A Drocker_desc.c40 DescRing *ring; member
58 PCIDevice *dev = PCI_DEVICE(info->ring->r); in desc_get_buf()
74 PCIDevice *dev = PCI_DEVICE(info->ring->r); in desc_set_buf()
91 return info->ring; in desc_get_ring()
94 int desc_ring_index(DescRing *ring) in desc_ring_index() argument
96 return ring->index; in desc_ring_index()
99 static bool desc_ring_empty(DescRing *ring) in desc_ring_empty() argument
101 return ring->head == ring->tail; in desc_ring_empty()
104 bool desc_ring_set_base_addr(DescRing *ring, uint64_t base_addr) in desc_ring_set_base_addr() argument
108 ") not 8-byte aligned\n", ring->index, base_addr); in desc_ring_set_base_addr()
[all …]
H A Drocker_desc.h30 int desc_ring_index(DescRing *ring);
31 bool desc_ring_set_base_addr(DescRing *ring, uint64_t base_addr);
32 uint64_t desc_ring_get_base_addr(DescRing *ring);
33 bool desc_ring_set_size(DescRing *ring, uint32_t size);
34 uint32_t desc_ring_get_size(DescRing *ring);
35 bool desc_ring_set_head(DescRing *ring, uint32_t new);
36 uint32_t desc_ring_get_head(DescRing *ring);
37 uint32_t desc_ring_get_tail(DescRing *ring);
38 void desc_ring_set_ctrl(DescRing *ring, uint32_t val);
39 bool desc_ring_ret_credits(DescRing *ring, uint32_t credits);
[all …]
/openbmc/qemu/hw/9pfs/
H A Dxen-9p-backend.c44 struct xen_9pfs_data ring; member
71 static void xen_9pfs_in_sg(Xen9pfsRing *ring, in xen_9pfs_in_sg() argument
79 cons = ring->intf->in_cons; in xen_9pfs_in_sg()
80 prod = ring->intf->in_prod; in xen_9pfs_in_sg()
82 masked_prod = xen_9pfs_mask(prod, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_in_sg()
83 masked_cons = xen_9pfs_mask(cons, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_in_sg()
86 in_sg[0].iov_base = ring->ring.in + masked_prod; in xen_9pfs_in_sg()
90 in_sg[0].iov_base = ring->ring.in + masked_prod; in xen_9pfs_in_sg()
91 in_sg[0].iov_len = XEN_FLEX_RING_SIZE(ring->ring_order) - masked_prod; in xen_9pfs_in_sg()
92 in_sg[1].iov_base = ring->ring.in; in xen_9pfs_in_sg()
[all …]
/openbmc/u-boot/drivers/usb/host/
H A Dxhci-ring.c35 static int last_trb(struct xhci_ctrl *ctrl, struct xhci_ring *ring, in last_trb() argument
38 if (ring == ctrl->event_ring) in last_trb()
55 struct xhci_ring *ring, in last_trb_on_last_seg() argument
59 if (ring == ctrl->event_ring) in last_trb_on_last_seg()
61 (seg->next == ring->first_seg)); in last_trb_on_last_seg()
88 static void inc_enq(struct xhci_ctrl *ctrl, struct xhci_ring *ring, in inc_enq() argument
94 chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN; in inc_enq()
95 next = ++(ring->enqueue); in inc_enq()
101 while (last_trb(ctrl, ring, ring->enq_seg, next)) { in inc_enq()
102 if (ring != ctrl->event_ring) { in inc_enq()
[all …]
H A Dxhci-mem.c78 static void xhci_ring_free(struct xhci_ring *ring) in xhci_ring_free() argument
83 BUG_ON(!ring); in xhci_ring_free()
85 first_seg = ring->first_seg; in xhci_ring_free()
94 free(ring); in xhci_ring_free()
152 if (virt_dev->eps[i].ring) in xhci_free_virt_devices()
153 xhci_ring_free(virt_dev->eps[i].ring); in xhci_free_virt_devices()
245 static void xhci_initialize_ring_info(struct xhci_ring *ring) in xhci_initialize_ring_info() argument
250 ring->enqueue = ring->first_seg->trbs; in xhci_initialize_ring_info()
251 ring->enq_seg = ring->first_seg; in xhci_initialize_ring_info()
252 ring->dequeue = ring->enqueue; in xhci_initialize_ring_info()
[all …]
/openbmc/qemu/net/
H A Dnetmap.c161 struct netmap_ring *ring = s->tx; in netmap_receive_iov() local
162 unsigned int tail = ring->tail; in netmap_receive_iov()
170 last = i = ring->head; in netmap_receive_iov()
172 if (nm_ring_space(ring) < iovcnt) { in netmap_receive_iov()
177 ring->cur = tail; in netmap_receive_iov()
192 nm_frag_size = MIN(iov_frag_size, ring->nr_buf_size); in netmap_receive_iov()
197 ring->cur = tail; in netmap_receive_iov()
202 idx = ring->slot[i].buf_idx; in netmap_receive_iov()
203 dst = (uint8_t *)NETMAP_BUF(ring, idx); in netmap_receive_iov()
205 ring->slot[i].len = nm_frag_size; in netmap_receive_iov()
[all …]
/openbmc/qemu/hw/usb/
H A Dhost-libusb.c139 USBHostIsoRing *ring; member
534 QTAILQ_REMOVE(&xfer->ring->inflight, xfer, next); in usb_host_req_complete_iso()
535 if (QTAILQ_EMPTY(&xfer->ring->inflight)) { in usb_host_req_complete_iso()
536 USBHostDevice *s = xfer->ring->host; in usb_host_req_complete_iso()
537 trace_usb_host_iso_stop(s->bus_num, s->addr, xfer->ring->ep->nr); in usb_host_req_complete_iso()
539 if (xfer->ring->ep->pid == USB_TOKEN_IN) { in usb_host_req_complete_iso()
540 QTAILQ_INSERT_TAIL(&xfer->ring->copy, xfer, next); in usb_host_req_complete_iso()
541 usb_wakeup(xfer->ring->ep, 0); in usb_host_req_complete_iso()
543 QTAILQ_INSERT_TAIL(&xfer->ring->unused, xfer, next); in usb_host_req_complete_iso()
549 USBHostIsoRing *ring = g_new0(USBHostIsoRing, 1); in usb_host_iso_alloc() local
[all …]
H A Dhcd-xhci.c268 XHCIRing ring; member
276 XHCIRing ring; member
684 static void xhci_ring_init(XHCIState *xhci, XHCIRing *ring, in xhci_ring_init() argument
687 ring->dequeue = base; in xhci_ring_init()
688 ring->ccs = 1; in xhci_ring_init()
691 static TRBType xhci_ring_fetch(XHCIState *xhci, XHCIRing *ring, XHCITRB *trb, in xhci_ring_fetch() argument
698 if (dma_memory_read(xhci->as, ring->dequeue, trb, TRB_SIZE, in xhci_ring_fetch()
704 trb->addr = ring->dequeue; in xhci_ring_fetch()
705 trb->ccs = ring->ccs; in xhci_ring_fetch()
710 trace_usb_xhci_fetch_trb(ring->dequeue, trb_name(trb), in xhci_ring_fetch()
[all …]
/openbmc/qemu/docs/specs/
H A Dvmw_pvscsi-spec.rst37 Request ring (``struct PVSCSIRingReqDesc *req_ring``)
38 ring for OS to device requests
40 Completion ring (``struct PVSCSIRingCmpDesc *cmp_ring``)
41 ring for device request completions
43 Message ring (``struct PVSCSIRingMsgDesc *msg_ring``)
44 ring for messages from device. This ring is optional and the
55 Completion interrupts (completion ring notifications):
60 Message interrupts (message ring notifications):
96 b. Flush request ring using ``PVSCSI_REG_OFFSET_KICK_NON_RW_IO``
102 a. Fill next free request ring descriptor
/openbmc/qemu/include/hw/ppc/
H A Dxive.h363 static inline uint32_t xive_tctx_word2(uint8_t *ring) in xive_tctx_word2() argument
365 return *((uint32_t *) &ring[TM_WORD2]); in xive_tctx_word2()
368 bool xive_ring_valid(XiveTCTX *tctx, uint8_t ring);
369 bool xive_nsr_indicates_exception(uint8_t ring, uint8_t nsr);
370 bool xive_nsr_indicates_group_exception(uint8_t ring, uint8_t nsr);
371 uint8_t xive_nsr_exception_ring(uint8_t ring, uint8_t nsr);
430 uint8_t ring; member
562 static inline uint8_t *xive_tctx_signal_regs(XiveTCTX *tctx, uint8_t ring) in xive_tctx_signal_regs() argument
572 if (ring == TM_QW2_HV_POOL) { in xive_tctx_signal_regs()
574 ring = TM_QW3_HV_PHYS; in xive_tctx_signal_regs()
[all …]
/openbmc/qemu/include/standard-headers/linux/
H A Dvirtio_ring.h115 __virtio16 ring[]; member
132 vring_used_elem_t ring[]; member
194 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
195 #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
203 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) in vring_init()
/openbmc/qemu/hw/intc/
H A Dxive.c28 bool xive_ring_valid(XiveTCTX *tctx, uint8_t ring) in xive_ring_valid() argument
32 for (cur_ring = ring; cur_ring <= TM_QW3_HV_PHYS; in xive_ring_valid()
41 bool xive_nsr_indicates_exception(uint8_t ring, uint8_t nsr) in xive_nsr_indicates_exception() argument
43 switch (ring) { in xive_nsr_indicates_exception()
54 bool xive_nsr_indicates_group_exception(uint8_t ring, uint8_t nsr) in xive_nsr_indicates_group_exception() argument
57 g_assert(xive_nsr_indicates_exception(ring, nsr)); in xive_nsr_indicates_group_exception()
63 uint8_t xive_nsr_exception_ring(uint8_t ring, uint8_t nsr) in xive_nsr_exception_ring() argument
66 if ((ring == TM_QW3_HV_PHYS) || (ring == TM_QW2_HV_POOL)) { in xive_nsr_exception_ring()
78 return ring; in xive_nsr_exception_ring()
81 static qemu_irq xive_tctx_output(XiveTCTX *tctx, uint8_t ring) in xive_tctx_output() argument
[all …]
H A Dxive2.c26 static int xive2_tctx_get_nvp_indexes(XiveTCTX *tctx, uint8_t ring,
515 uint8_t ring, in xive2_tctx_save_ctx() argument
521 uint8_t *sig_regs = xive_tctx_signal_regs(tctx, ring); in xive2_tctx_save_ctx()
522 uint8_t *regs = &tctx->regs[ring]; in xive2_tctx_save_ctx()
558 if ((nvp.w0 & NVP2_W0_P) || ring != TM_QW2_HV_POOL) { in xive2_tctx_save_ctx()
616 static void xive2_redistribute(Xive2Router *xrtr, XiveTCTX *tctx, uint8_t ring) in xive2_redistribute() argument
618 uint8_t *sig_regs = xive_tctx_signal_regs(tctx, ring); in xive2_redistribute()
630 if (!xive_nsr_indicates_group_exception(ring, nsr)) { in xive2_redistribute()
635 xive2_tctx_get_nvp_indexes(tctx, ring, &nvp_blk, &nvp_idx); in xive2_redistribute()
637 trace_xive_redistribute(tctx->cs->cpu_index, ring, nvp_blk, nvp_idx); in xive2_redistribute()
[all …]
/openbmc/qemu/block/
H A Dio_uring.c55 struct io_uring ring; member
151 while (io_uring_peek_cqe(&s->ring, &cqes) == 0) { in luring_process_completions()
161 io_uring_cqe_seen(&s->ring, cqes); in luring_process_completions()
249 struct io_uring_sqe *sqes = io_uring_get_sqe(&s->ring); in ioq_submit()
257 ret = io_uring_submit(&s->ring); in ioq_submit()
308 return io_uring_cq_ready(&s->ring); in qemu_luring_poll_cb()
430 aio_set_fd_handler(old_context, s->ring.ring_fd, in luring_detach_aio_context()
440 aio_set_fd_handler(s->aio_context, s->ring.ring_fd, in luring_attach_aio_context()
449 struct io_uring *ring = &s->ring; in luring_init() local
453 rc = io_uring_queue_init(MAX_ENTRIES, ring, 0); in luring_init()
[all …]
H A Dlinux-aio.c146 struct aio_ring *ring = (struct aio_ring *)ctx; in io_getevents_peek() local
147 unsigned int head = ring->head, tail = ring->tail; in io_getevents_peek()
150 nr = tail >= head ? tail - head : ring->nr - head; in io_getevents_peek()
151 *events = ring->io_events + head; in io_getevents_peek()
168 struct aio_ring *ring = (struct aio_ring *)ctx; in io_getevents_commit() local
171 ring->head = (ring->head + nr) % ring->nr; in io_getevents_commit()
/openbmc/u-boot/include/
H A Dvirtio_ring.h61 __virtio16 ring[]; member
74 struct vring_used_elem ring[]; member
125 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
126 #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
134 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + in vring_init()
/openbmc/qemu/util/
H A Dfdmon-io_uring.c82 struct io_uring *ring = &ctx->fdmon_io_uring; in get_sqe() local
83 struct io_uring_sqe *sqe = io_uring_get_sqe(ring); in get_sqe()
92 ret = io_uring_submit(ring); in get_sqe()
96 sqe = io_uring_get_sqe(ring); in get_sqe()
257 struct io_uring *ring = &ctx->fdmon_io_uring; in process_cq_ring() local
263 io_uring_for_each_cqe(ring, head, cqe) { in process_cq_ring()
271 io_uring_cq_advance(ring, num_cqes); in process_cq_ring()
/openbmc/qemu/include/hw/xen/interface/io/
H A Dconsole.h15 #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1)) argument
H A Dring.h52 (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \
53 sizeof(((struct _s##_sring *)0)->ring[0])))
58 (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
113 union __name##_sring_entry ring[1]; /* variable-length */ \
233 (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req))
236 (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))
/openbmc/qemu/hw/virtio/
H A Dvhost-backend.c114 struct vhost_vring_state *ring) in vhost_kernel_set_vring_endian() argument
116 return vhost_kernel_call(dev, VHOST_SET_VRING_ENDIAN, ring); in vhost_kernel_set_vring_endian()
120 struct vhost_vring_state *ring) in vhost_kernel_set_vring_num() argument
122 return vhost_kernel_call(dev, VHOST_SET_VRING_NUM, ring); in vhost_kernel_set_vring_num()
126 struct vhost_vring_state *ring) in vhost_kernel_set_vring_base() argument
128 return vhost_kernel_call(dev, VHOST_SET_VRING_BASE, ring); in vhost_kernel_set_vring_base()
132 struct vhost_vring_state *ring) in vhost_kernel_get_vring_base() argument
134 return vhost_kernel_call(dev, VHOST_GET_VRING_BASE, ring); in vhost_kernel_get_vring_base()
/openbmc/qemu/hw/net/
H A Dvmxnet3.c130 Vmxnet3Ring *ring, in DECLARE_CLASS_CHECKERS()
136 ring->pa = pa; in DECLARE_CLASS_CHECKERS()
137 ring->size = size; in DECLARE_CLASS_CHECKERS()
138 ring->cell_size = cell_size; in DECLARE_CLASS_CHECKERS()
139 ring->gen = VMXNET3_INIT_GEN; in DECLARE_CLASS_CHECKERS()
140 ring->next = 0; in DECLARE_CLASS_CHECKERS()
152 static inline void vmxnet3_ring_inc(Vmxnet3Ring *ring) in vmxnet3_ring_inc() argument
154 if (++ring->next >= ring->size) { in vmxnet3_ring_inc()
155 ring->next = 0; in vmxnet3_ring_inc()
156 ring->gen ^= 1; in vmxnet3_ring_inc()
[all …]
/openbmc/qemu/hw/display/
H A Dqxl.c408 QXLReleaseRing *ring; in init_qxl_ram() local
424 ring = &d->ram->release_ring; in init_qxl_ram()
425 prod = ring->prod & SPICE_RING_INDEX_MASK(ring); in init_qxl_ram()
426 assert(prod < ARRAY_SIZE(ring->items)); in init_qxl_ram()
427 ring->items[prod].el = 0; in init_qxl_ram()
630 QXLCommandRing *ring; in interface_get_command() local
655 ring = &qxl->ram->cmd_ring; in interface_get_command()
656 if (qxl->guest_bug || SPICE_RING_IS_EMPTY(ring)) { in interface_get_command()
659 SPICE_RING_CONS_ITEM(qxl, ring, cmd); in interface_get_command()
666 SPICE_RING_POP(ring, notify); in interface_get_command()
[all …]
/openbmc/qemu/audio/
H A Dpwaudio.c52 struct spa_ringbuffer ring; member
113 avail = spa_ringbuffer_get_read_index(&v->ring, &index); in playback_on_process()
128 spa_ringbuffer_read_data(&v->ring, in playback_on_process()
133 spa_ringbuffer_read_update(&v->ring, index); in playback_on_process()
173 filled = spa_ringbuffer_get_write_index(&v->ring, &index); in capture_on_process()
184 spa_ringbuffer_write_data(&v->ring, in capture_on_process()
189 spa_ringbuffer_write_update(&v->ring, index); in capture_on_process()
237 avail = spa_ringbuffer_get_read_index(&v->ring, &index); in qpw_read()
245 spa_ringbuffer_read_data(&v->ring, in qpw_read()
249 spa_ringbuffer_read_update(&v->ring, index); in qpw_read()
[all …]
/openbmc/qemu/pc-bios/s390-ccw/
H A Dvirtio-net.c110 len = rxvq->used->ring[rx_last_idx % rxvq->num].len - sizeof(VirtioNetHdr); in recv()
115 id = rxvq->used->ring[rx_last_idx % rxvq->num].id % rxvq->num; in recv()
134 rxvq->avail->ring[rxvq->avail->idx % rxvq->num] = id; in recv()
/openbmc/u-boot/drivers/usb/musb-new/
H A Dmusb_host.h32 struct list_head ring; /* of musb_qh */ member
59 return list_entry(q->next, struct musb_qh, ring); in first_qh()

1234