vring 117 drivers/misc/mic/vop/vop_debugfs.c int num = vrh->vring.num; vring 121 drivers/misc/mic/vop/vop_debugfs.c desc = vrh->vring.desc; vring 123 drivers/misc/mic/vop/vop_debugfs.c i, vvr->vring.info->avail_idx & (num - 1)); vring 125 drivers/misc/mic/vop/vop_debugfs.c i, vvr->vring.info->avail_idx); vring 138 drivers/misc/mic/vop/vop_debugfs.c avail = vrh->vring.avail; vring 149 drivers/misc/mic/vop/vop_debugfs.c used = vrh->vring.used; vring 284 drivers/misc/mic/vop/vop_main.c struct vring vring; vring 286 drivers/misc/mic/vop/vop_main.c vring_init(&vring, num, pages, MIC_VIRTIO_RING_ALIGN); vring 287 drivers/misc/mic/vop/vop_main.c vring.used = used; vring 289 drivers/misc/mic/vop/vop_main.c return __vring_new_virtqueue(index, vring, vdev, weak_barriers, context, vring 82 drivers/misc/mic/vop/vop_main.h struct mic_vring vring; vring 70 drivers/misc/mic/vop/vop_vringh.c vdev->vvr[i].vrh.vring.used = vring 105 drivers/misc/mic/vop/vop_vringh.c vdev->vvr[i].vring.info->avail_idx = 0; vring 295 drivers/misc/mic/vop/vop_vringh.c struct mic_vring *vr = &vdev->vvr[i].vring; vring 386 drivers/misc/mic/vop/vop_vringh.c vvr->vring.len, DMA_BIDIRECTIONAL); vring 387 drivers/misc/mic/vop/vop_vringh.c free_pages((unsigned long)vvr->vring.va, vring 388 drivers/misc/mic/vop/vop_vringh.c get_order(vvr->vring.len)); vring 444 drivers/misc/mic/vop/vop_vringh.c vvr->vring.len, DMA_BIDIRECTIONAL); vring 445 drivers/misc/mic/vop/vop_vringh.c free_pages((unsigned long)vvr->vring.va, vring 446 drivers/misc/mic/vop/vop_vringh.c get_order(vvr->vring.len)); vring 756 drivers/misc/mic/vop/vop_vringh.c struct mic_vring *vr = &vvr->vring; vring 1063 drivers/misc/mic/vop/vop_vringh.c *pa = virt_to_phys(vvr->vring.va); vring 1064 drivers/misc/mic/vop/vop_vringh.c *size = vvr->vring.len; vring 1067 drivers/misc/mic/vop/vop_vringh.c start += vvr->vring.len; vring 226 drivers/net/wireless/ath/wil6210/trace.h TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags), vring 227 drivers/net/wireless/ath/wil6210/trace.h TP_ARGS(vring, index, len, frags), vring 229 drivers/net/wireless/ath/wil6210/trace.h __field(u8, vring) vring 235 drivers/net/wireless/ath/wil6210/trace.h __entry->vring = vring; vring 241 drivers/net/wireless/ath/wil6210/trace.h __entry->vring, __entry->index, __entry->len, __entry->frags) vring 245 drivers/net/wireless/ath/wil6210/trace.h TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err), vring 246 drivers/net/wireless/ath/wil6210/trace.h TP_ARGS(vring, index, len, err), vring 248 drivers/net/wireless/ath/wil6210/trace.h __field(u8, vring) vring 254 drivers/net/wireless/ath/wil6210/trace.h __entry->vring = vring; vring 260 drivers/net/wireless/ath/wil6210/trace.h __entry->vring, __entry->index, __entry->len, vring 81 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_tx[i]; vring 82 drivers/net/wireless/ath/wil6210/txrx.c int vring_index = vring - wil->ring_tx; vring 88 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->va || !txdata->enabled) { vring 96 drivers/net/wireless/ath/wil6210/txrx.c while (!wil_ring_is_empty(vring)) { vring 109 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->va || !txdata->enabled) vring 120 drivers/net/wireless/ath/wil6210/txrx.c static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) vring 123 drivers/net/wireless/ath/wil6210/txrx.c size_t sz = vring->size * sizeof(vring->va[0]); vring 128 drivers/net/wireless/ath/wil6210/txrx.c BUILD_BUG_ON(sizeof(vring->va[0]) != 32); vring 130 drivers/net/wireless/ath/wil6210/txrx.c vring->swhead = 0; vring 131 drivers/net/wireless/ath/wil6210/txrx.c vring->swtail = 0; vring 132 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx = kcalloc(vring->size, sizeof(vring->ctx[0]), GFP_KERNEL); vring 133 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->ctx) { vring 134 drivers/net/wireless/ath/wil6210/txrx.c vring->va = NULL; vring 153 drivers/net/wireless/ath/wil6210/txrx.c vring->va = dma_alloc_coherent(dev, sz, &vring->pa, GFP_KERNEL); vring 154 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->va) { vring 155 drivers/net/wireless/ath/wil6210/txrx.c kfree(vring->ctx); vring 156 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx = NULL; vring 168 drivers/net/wireless/ath/wil6210/txrx.c for (i = 0; i < vring->size; i++) { vring 170 drivers/net/wireless/ath/wil6210/txrx.c &vring->va[i].tx.legacy; vring 175 drivers/net/wireless/ath/wil6210/txrx.c wil_dbg_misc(wil, "vring[%d] 0x%p:%pad 0x%p\n", vring->size, vring 176 drivers/net/wireless/ath/wil6210/txrx.c vring->va, &vring->pa, vring->ctx); vring 200 drivers/net/wireless/ath/wil6210/txrx.c static void wil_vring_free(struct wil6210_priv *wil, struct wil_ring *vring) vring 203 drivers/net/wireless/ath/wil6210/txrx.c size_t sz = vring->size * sizeof(vring->va[0]); vring 206 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->is_rx) { vring 207 drivers/net/wireless/ath/wil6210/txrx.c int vring_index = vring - wil->ring_tx; vring 210 drivers/net/wireless/ath/wil6210/txrx.c vring_index, vring->size, vring->va, vring 211 drivers/net/wireless/ath/wil6210/txrx.c &vring->pa, vring->ctx); vring 214 drivers/net/wireless/ath/wil6210/txrx.c vring->size, vring->va, vring 215 drivers/net/wireless/ath/wil6210/txrx.c &vring->pa, vring->ctx); vring 218 drivers/net/wireless/ath/wil6210/txrx.c while (!wil_ring_is_empty(vring)) { vring 223 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->is_rx) { vring 226 drivers/net/wireless/ath/wil6210/txrx.c &vring->va[vring->swtail].tx.legacy; vring 228 drivers/net/wireless/ath/wil6210/txrx.c ctx = &vring->ctx[vring->swtail]; vring 232 drivers/net/wireless/ath/wil6210/txrx.c vring->swtail); vring 233 drivers/net/wireless/ath/wil6210/txrx.c vring->swtail = wil_ring_next_tail(vring); vring 240 drivers/net/wireless/ath/wil6210/txrx.c vring->swtail = wil_ring_next_tail(vring); vring 244 drivers/net/wireless/ath/wil6210/txrx.c &vring->va[vring->swhead].rx.legacy; vring 246 drivers/net/wireless/ath/wil6210/txrx.c ctx = &vring->ctx[vring->swhead]; vring 252 drivers/net/wireless/ath/wil6210/txrx.c wil_ring_advance_head(vring, 1); vring 255 drivers/net/wireless/ath/wil6210/txrx.c dma_free_coherent(dev, sz, (void *)vring->va, vring->pa); vring 256 drivers/net/wireless/ath/wil6210/txrx.c kfree(vring->ctx); vring 257 drivers/net/wireless/ath/wil6210/txrx.c vring->pa = 0; vring 258 drivers/net/wireless/ath/wil6210/txrx.c vring->va = NULL; vring 259 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx = NULL; vring 267 drivers/net/wireless/ath/wil6210/txrx.c static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct wil_ring *vring, vring 273 drivers/net/wireless/ath/wil6210/txrx.c volatile struct vring_rx_desc *_d = &vring->va[i].rx.legacy; vring 303 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].skb = skb; vring 453 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring) vring 473 drivers/net/wireless/ath/wil6210/txrx.c if (unlikely(wil_ring_is_empty(vring))) vring 476 drivers/net/wireless/ath/wil6210/txrx.c i = (int)vring->swhead; vring 477 drivers/net/wireless/ath/wil6210/txrx.c _d = &vring->va[i].rx.legacy; vring 483 drivers/net/wireless/ath/wil6210/txrx.c skb = vring->ctx[i].skb; vring 484 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].skb = NULL; vring 485 drivers/net/wireless/ath/wil6210/txrx.c wil_ring_advance_head(vring, 1); vring 1083 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_rx; vring 1088 drivers/net/wireless/ath/wil6210/txrx.c if (vring->va) { vring 1095 drivers/net/wireless/ath/wil6210/txrx.c vring->size = 1 << order; vring 1096 drivers/net/wireless/ath/wil6210/txrx.c vring->is_rx = true; vring 1097 drivers/net/wireless/ath/wil6210/txrx.c rc = wil_vring_alloc(wil, vring); vring 1101 drivers/net/wireless/ath/wil6210/txrx.c rc = wmi_rx_chain_add(wil, vring); vring 1105 drivers/net/wireless/ath/wil6210/txrx.c rc = wil_rx_refill(wil, vring->size); vring 1111 drivers/net/wireless/ath/wil6210/txrx.c wil_vring_free(wil, vring); vring 1118 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_rx; vring 1122 drivers/net/wireless/ath/wil6210/txrx.c if (vring->va) vring 1123 drivers/net/wireless/ath/wil6210/txrx.c wil_vring_free(wil, vring); vring 1196 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_tx[id]; vring 1211 drivers/net/wireless/ath/wil6210/txrx.c if (vring->va) { vring 1218 drivers/net/wireless/ath/wil6210/txrx.c vring->is_rx = false; vring 1219 drivers/net/wireless/ath/wil6210/txrx.c vring->size = size; vring 1220 drivers/net/wireless/ath/wil6210/txrx.c rc = wil_vring_alloc(wil, vring); vring 1227 drivers/net/wireless/ath/wil6210/txrx.c cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); vring 1245 drivers/net/wireless/ath/wil6210/txrx.c vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr); vring 1259 drivers/net/wireless/ath/wil6210/txrx.c wil_vring_free(wil, vring); vring 1299 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_tx[ring_id]; vring 1306 drivers/net/wireless/ath/wil6210/txrx.c if (!vring->va) { vring 1318 drivers/net/wireless/ath/wil6210/txrx.c cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); vring 1373 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_tx[id]; vring 1380 drivers/net/wireless/ath/wil6210/txrx.c if (vring->va) { vring 1387 drivers/net/wireless/ath/wil6210/txrx.c vring->is_rx = false; vring 1388 drivers/net/wireless/ath/wil6210/txrx.c vring->size = size; vring 1389 drivers/net/wireless/ath/wil6210/txrx.c rc = wil_vring_alloc(wil, vring); vring 1396 drivers/net/wireless/ath/wil6210/txrx.c cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); vring 1415 drivers/net/wireless/ath/wil6210/txrx.c vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr); vring 1426 drivers/net/wireless/ath/wil6210/txrx.c wil_vring_free(wil, vring); vring 1731 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring, struct sk_buff *skb) vring 1750 drivers/net/wireless/ath/wil6210/txrx.c u32 swhead = vring->swhead; vring 1751 drivers/net/wireless/ath/wil6210/txrx.c int used, avail = wil_ring_avail_tx(vring); vring 1756 drivers/net/wireless/ath/wil6210/txrx.c int vring_index = vring - wil->ring_tx; vring 1825 drivers/net/wireless/ath/wil6210/txrx.c _hdr_desc = &vring->va[i].tx.legacy; vring 1839 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].mapped_as = wil_mapped_as_single; vring 1840 drivers/net/wireless/ath/wil6210/txrx.c hdr_ctx = &vring->ctx[i]; vring 1868 drivers/net/wireless/ath/wil6210/txrx.c i = (swhead + descs_used) % vring->size; vring 1875 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].mapped_as = wil_mapped_as_page; vring 1882 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].mapped_as = wil_mapped_as_single; vring 1891 drivers/net/wireless/ath/wil6210/txrx.c _desc = &vring->va[i].tx.legacy; vring 1895 drivers/net/wireless/ath/wil6210/txrx.c first_ctx = &vring->ctx[i]; vring 1980 drivers/net/wireless/ath/wil6210/txrx.c vring->ctx[i].skb = skb_get(skb); vring 1983 drivers/net/wireless/ath/wil6210/txrx.c used = wil_ring_used_tx(vring); vring 1999 drivers/net/wireless/ath/wil6210/txrx.c wil_ring_advance_head(vring, descs_used); vring 2000 drivers/net/wireless/ath/wil6210/txrx.c wil_dbg_txrx(wil, "TSO: Tx swhead %d -> %d\n", swhead, vring->swhead); vring 2012 drivers/net/wireless/ath/wil6210/txrx.c wil_w(wil, vring->hwtail, vring->swhead); vring 2019 drivers/net/wireless/ath/wil6210/txrx.c i = (swhead + descs_used - 1) % vring->size; vring 2020 drivers/net/wireless/ath/wil6210/txrx.c d = (struct vring_tx_desc *)&vring->va[i].tx.legacy; vring 2021 drivers/net/wireless/ath/wil6210/txrx.c _desc = &vring->va[i].tx.legacy; vring 2024 drivers/net/wireless/ath/wil6210/txrx.c ctx = &vring->ctx[i]; vring 2432 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ring *vring = &wil->ring_tx[ringid]; vring 2441 drivers/net/wireless/ath/wil6210/txrx.c if (unlikely(!vring->va)) { vring 2453 drivers/net/wireless/ath/wil6210/txrx.c used_before_complete = wil_ring_used_tx(vring); vring 2458 drivers/net/wireless/ath/wil6210/txrx.c while (!wil_ring_is_empty(vring)) { vring 2460 drivers/net/wireless/ath/wil6210/txrx.c struct wil_ctx *ctx = &vring->ctx[vring->swtail]; vring 2466 drivers/net/wireless/ath/wil6210/txrx.c int lf = (vring->swtail + ctx->nr_frags) % vring->size; vring 2469 drivers/net/wireless/ath/wil6210/txrx.c _d = &vring->va[lf].tx.legacy; vring 2473 drivers/net/wireless/ath/wil6210/txrx.c new_swtail = (lf + 1) % vring->size; vring 2474 drivers/net/wireless/ath/wil6210/txrx.c while (vring->swtail != new_swtail) { vring 2479 drivers/net/wireless/ath/wil6210/txrx.c ctx = &vring->ctx[vring->swtail]; vring 2481 drivers/net/wireless/ath/wil6210/txrx.c _d = &vring->va[vring->swtail].tx.legacy; vring 2486 drivers/net/wireless/ath/wil6210/txrx.c trace_wil6210_tx_done(ringid, vring->swtail, dmalen, vring 2490 drivers/net/wireless/ath/wil6210/txrx.c ringid, vring->swtail, dmalen, vring 2533 drivers/net/wireless/ath/wil6210/txrx.c vring->swtail = wil_ring_next_tail(vring); vring 2539 drivers/net/wireless/ath/wil6210/txrx.c used_new = wil_ring_used_tx(vring); vring 2549 drivers/net/wireless/ath/wil6210/txrx.c wil_update_net_queues(wil, vif, vring, false); vring 1266 drivers/net/wireless/ath/wil6210/wil6210.h int wmi_rx_chain_add(struct wil6210_priv *wil, struct wil_ring *vring); vring 2594 drivers/net/wireless/ath/wil6210/wmi.c int wmi_rx_chain_add(struct wil6210_priv *wil, struct wil_ring *vring) vring 2604 drivers/net/wireless/ath/wil6210/wmi.c .ring_mem_base = cpu_to_le64(vring->pa), vring 2605 drivers/net/wireless/ath/wil6210/wmi.c .ring_size = cpu_to_le16(vring->size), vring 2652 drivers/net/wireless/ath/wil6210/wmi.c vring->hwtail = le32_to_cpu(evt.evt.rx_ring_tail_ptr); vring 2655 drivers/net/wireless/ath/wil6210/wmi.c le32_to_cpu(evt.evt.status), vring->hwtail); vring 166 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring[2]; vring 211 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring; vring 215 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_vdev->vrings[i]; vring 216 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->va) { vring 217 drivers/platform/mellanox/mlxbf-tmfifo.c size = vring_size(vring->num, vring->align); vring 219 drivers/platform/mellanox/mlxbf-tmfifo.c vring->va, vring->dma); vring 220 drivers/platform/mellanox/mlxbf-tmfifo.c vring->va = NULL; vring 221 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->vq) { vring 222 drivers/platform/mellanox/mlxbf-tmfifo.c vring_del_virtqueue(vring->vq); vring 223 drivers/platform/mellanox/mlxbf-tmfifo.c vring->vq = NULL; vring 233 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring; vring 240 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_vdev->vrings[i]; vring 241 drivers/platform/mellanox/mlxbf-tmfifo.c vring->fifo = fifo; vring 242 drivers/platform/mellanox/mlxbf-tmfifo.c vring->num = MLXBF_TMFIFO_VRING_SIZE; vring 243 drivers/platform/mellanox/mlxbf-tmfifo.c vring->align = SMP_CACHE_BYTES; vring 244 drivers/platform/mellanox/mlxbf-tmfifo.c vring->index = i; vring 245 drivers/platform/mellanox/mlxbf-tmfifo.c vring->vdev_id = tm_vdev->vdev.id.device; vring 248 drivers/platform/mellanox/mlxbf-tmfifo.c size = vring_size(vring->num, vring->align); vring 256 drivers/platform/mellanox/mlxbf-tmfifo.c vring->va = va; vring 257 drivers/platform/mellanox/mlxbf-tmfifo.c vring->dma = dma; vring 288 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_get_next_desc(struct mlxbf_tmfifo_vring *vring) vring 290 drivers/platform/mellanox/mlxbf-tmfifo.c const struct vring *vr = virtqueue_get_vring(vring->vq); vring 291 drivers/platform/mellanox/mlxbf-tmfifo.c struct virtio_device *vdev = vring->vq->vdev; vring 294 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->next_avail == virtio16_to_cpu(vdev, vr->avail->idx)) vring 297 drivers/platform/mellanox/mlxbf-tmfifo.c idx = vring->next_avail % vr->num; vring 302 drivers/platform/mellanox/mlxbf-tmfifo.c vring->next_avail++; vring 308 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_release_desc(struct mlxbf_tmfifo_vring *vring, vring 311 drivers/platform/mellanox/mlxbf-tmfifo.c const struct vring *vr = virtqueue_get_vring(vring->vq); vring 312 drivers/platform/mellanox/mlxbf-tmfifo.c struct virtio_device *vdev = vring->vq->vdev; vring 330 drivers/platform/mellanox/mlxbf-tmfifo.c static u32 mlxbf_tmfifo_get_pkt_len(struct mlxbf_tmfifo_vring *vring, vring 333 drivers/platform/mellanox/mlxbf-tmfifo.c const struct vring *vr = virtqueue_get_vring(vring->vq); vring 334 drivers/platform/mellanox/mlxbf-tmfifo.c struct virtio_device *vdev = vring->vq->vdev; vring 348 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_release_pending_pkt(struct mlxbf_tmfifo_vring *vring) vring 353 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->desc_head) { vring 354 drivers/platform/mellanox/mlxbf-tmfifo.c desc_head = vring->desc_head; vring 355 drivers/platform/mellanox/mlxbf-tmfifo.c len = vring->pkt_len; vring 357 drivers/platform/mellanox/mlxbf-tmfifo.c desc_head = mlxbf_tmfifo_get_next_desc(vring); vring 358 drivers/platform/mellanox/mlxbf-tmfifo.c len = mlxbf_tmfifo_get_pkt_len(vring, desc_head); vring 362 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_release_desc(vring, desc_head, len); vring 364 drivers/platform/mellanox/mlxbf-tmfifo.c vring->pkt_len = 0; vring 365 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc = NULL; vring 366 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc_head = NULL; vring 369 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_init_net_desc(struct mlxbf_tmfifo_vring *vring, vring 372 drivers/platform/mellanox/mlxbf-tmfifo.c struct virtio_device *vdev = vring->vq->vdev; vring 381 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_get_next_pkt(struct mlxbf_tmfifo_vring *vring, bool is_rx) vring 385 drivers/platform/mellanox/mlxbf-tmfifo.c desc = mlxbf_tmfifo_get_next_desc(vring); vring 386 drivers/platform/mellanox/mlxbf-tmfifo.c if (desc && is_rx && vring->vdev_id == VIRTIO_ID_NET) vring 387 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_init_net_desc(vring, desc, is_rx); vring 389 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc_head = desc; vring 390 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc = desc; vring 412 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring, vring 415 drivers/platform/mellanox/mlxbf-tmfifo.c const struct vring *vr = virtqueue_get_vring(vring->vq); vring 445 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring) vring 450 drivers/platform/mellanox/mlxbf-tmfifo.c desc = mlxbf_tmfifo_get_next_desc(vring); vring 453 drivers/platform/mellanox/mlxbf-tmfifo.c len = mlxbf_tmfifo_get_pkt_len(vring, desc); vring 457 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_release_desc(vring, desc, len); vring 461 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_console_output_one(cons, vring, desc); vring 462 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_release_desc(vring, desc, len); vring 463 drivers/platform/mellanox/mlxbf-tmfifo.c desc = mlxbf_tmfifo_get_next_desc(vring); vring 559 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring, vring 563 drivers/platform/mellanox/mlxbf-tmfifo.c struct virtio_device *vdev = vring->vq->vdev; vring 564 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo *fifo = vring->fifo; vring 575 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->cur_len + sizeof(u64) <= len) { vring 578 drivers/platform/mellanox/mlxbf-tmfifo.c memcpy(addr + vring->cur_len, &data, sizeof(u64)); vring 580 drivers/platform/mellanox/mlxbf-tmfifo.c memcpy(&data, addr + vring->cur_len, sizeof(u64)); vring 581 drivers/platform/mellanox/mlxbf-tmfifo.c vring->cur_len += sizeof(u64); vring 585 drivers/platform/mellanox/mlxbf-tmfifo.c memcpy(addr + vring->cur_len, &data, vring 586 drivers/platform/mellanox/mlxbf-tmfifo.c len - vring->cur_len); vring 588 drivers/platform/mellanox/mlxbf-tmfifo.c memcpy(&data, addr + vring->cur_len, vring 589 drivers/platform/mellanox/mlxbf-tmfifo.c len - vring->cur_len); vring 590 drivers/platform/mellanox/mlxbf-tmfifo.c vring->cur_len = len; vring 605 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_rxtx_header(struct mlxbf_tmfifo_vring *vring, vring 609 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo *fifo = vring->fifo; vring 640 drivers/platform/mellanox/mlxbf-tmfifo.c if (vdev_id != vring->vdev_id) { vring 645 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc = desc; vring 646 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_dev2->vrings[MLXBF_TMFIFO_VRING_RX]; vring 649 drivers/platform/mellanox/mlxbf-tmfifo.c vring->pkt_len = ntohs(hdr.len) + hdr_len; vring 652 drivers/platform/mellanox/mlxbf-tmfifo.c hdr_len = (vring->vdev_id == VIRTIO_ID_NET) ? vring 654 drivers/platform/mellanox/mlxbf-tmfifo.c vring->pkt_len = mlxbf_tmfifo_get_pkt_len(vring, desc); vring 655 drivers/platform/mellanox/mlxbf-tmfifo.c hdr.type = (vring->vdev_id == VIRTIO_ID_NET) ? vring 657 drivers/platform/mellanox/mlxbf-tmfifo.c hdr.len = htons(vring->pkt_len - hdr_len); vring 661 drivers/platform/mellanox/mlxbf-tmfifo.c vring->cur_len = hdr_len; vring 662 drivers/platform/mellanox/mlxbf-tmfifo.c vring->rem_len = vring->pkt_len; vring 663 drivers/platform/mellanox/mlxbf-tmfifo.c fifo->vring[is_rx] = vring; vring 671 drivers/platform/mellanox/mlxbf-tmfifo.c static bool mlxbf_tmfifo_rxtx_one_desc(struct mlxbf_tmfifo_vring *vring, vring 674 drivers/platform/mellanox/mlxbf-tmfifo.c const struct vring *vr = virtqueue_get_vring(vring->vq); vring 675 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo *fifo = vring->fifo; vring 682 drivers/platform/mellanox/mlxbf-tmfifo.c vdev = &fifo->vdev[vring->vdev_id]->vdev; vring 685 drivers/platform/mellanox/mlxbf-tmfifo.c if (!vring->desc) { vring 686 drivers/platform/mellanox/mlxbf-tmfifo.c desc = mlxbf_tmfifo_get_next_pkt(vring, is_rx); vring 690 drivers/platform/mellanox/mlxbf-tmfifo.c desc = vring->desc; vring 694 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->pkt_len == 0) { vring 695 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_rxtx_header(vring, desc, is_rx, &vring_change); vring 706 drivers/platform/mellanox/mlxbf-tmfifo.c if (len > vring->rem_len) vring 707 drivers/platform/mellanox/mlxbf-tmfifo.c len = vring->rem_len; vring 710 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->cur_len < len) { vring 711 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_rxtx_word(vring, desc, is_rx, len); vring 716 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->cur_len == len) { vring 717 drivers/platform/mellanox/mlxbf-tmfifo.c vring->cur_len = 0; vring 718 drivers/platform/mellanox/mlxbf-tmfifo.c vring->rem_len -= len; vring 721 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->rem_len > 0 && vring 729 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_release_pending_pkt(vring); vring 731 drivers/platform/mellanox/mlxbf-tmfifo.c fifo->vring[is_rx] = NULL; vring 735 drivers/platform/mellanox/mlxbf-tmfifo.c vring_interrupt(0, vring->vq); vring 741 drivers/platform/mellanox/mlxbf-tmfifo.c vring->desc = desc; vring 747 drivers/platform/mellanox/mlxbf-tmfifo.c static void mlxbf_tmfifo_rxtx(struct mlxbf_tmfifo_vring *vring, bool is_rx) vring 749 drivers/platform/mellanox/mlxbf-tmfifo.c int avail = 0, devid = vring->vdev_id; vring 753 drivers/platform/mellanox/mlxbf-tmfifo.c fifo = vring->fifo; vring 760 drivers/platform/mellanox/mlxbf-tmfifo.c if (fifo->vring[is_rx] && fifo->vring[is_rx] != vring) vring 785 drivers/platform/mellanox/mlxbf-tmfifo.c more = mlxbf_tmfifo_rxtx_one_desc(vring, is_rx, &avail); vring 794 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring; vring 804 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_vdev->vrings[queue_id]; vring 805 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->vq) vring 806 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_rxtx(vring, is_rx); vring 836 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring = vq->priv; vring 841 drivers/platform/mellanox/mlxbf-tmfifo.c fifo = vring->fifo; vring 847 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->index & BIT(0)) { vring 854 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->vdev_id == VIRTIO_ID_CONSOLE) { vring 857 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_console_output(tm_vdev, vring); vring 895 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring; vring 900 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_vdev->vrings[i]; vring 903 drivers/platform/mellanox/mlxbf-tmfifo.c if (vring->desc) vring 904 drivers/platform/mellanox/mlxbf-tmfifo.c mlxbf_tmfifo_release_pending_pkt(vring); vring 905 drivers/platform/mellanox/mlxbf-tmfifo.c vq = vring->vq; vring 907 drivers/platform/mellanox/mlxbf-tmfifo.c vring->vq = NULL; vring 923 drivers/platform/mellanox/mlxbf-tmfifo.c struct mlxbf_tmfifo_vring *vring; vring 935 drivers/platform/mellanox/mlxbf-tmfifo.c vring = &tm_vdev->vrings[i]; vring 938 drivers/platform/mellanox/mlxbf-tmfifo.c size = vring_size(vring->num, vring->align); vring 939 drivers/platform/mellanox/mlxbf-tmfifo.c memset(vring->va, 0, size); vring 940 drivers/platform/mellanox/mlxbf-tmfifo.c vq = vring_new_virtqueue(i, vring->num, vring->align, vdev, vring 941 drivers/platform/mellanox/mlxbf-tmfifo.c false, false, vring->va, vring 951 drivers/platform/mellanox/mlxbf-tmfifo.c vring->vq = vq; vring 952 drivers/platform/mellanox/mlxbf-tmfifo.c vq->priv = vring; vring 321 drivers/remoteproc/remoteproc_core.c struct rproc_vring *rvring = &rvdev->vring[i]; vring 335 drivers/remoteproc/remoteproc_core.c if (rproc_check_carveout_da(rproc, mem, rsc->vring[i].da, size)) vring 339 drivers/remoteproc/remoteproc_core.c mem = rproc_mem_entry_init(dev, 0, 0, size, rsc->vring[i].da, vring 371 drivers/remoteproc/remoteproc_core.c rsc->vring[i].notifyid = notifyid; vring 380 drivers/remoteproc/remoteproc_core.c struct fw_rsc_vdev_vring *vring = &rsc->vring[i]; vring 381 drivers/remoteproc/remoteproc_core.c struct rproc_vring *rvring = &rvdev->vring[i]; vring 384 drivers/remoteproc/remoteproc_core.c i, vring->da, vring->num, vring->align); vring 387 drivers/remoteproc/remoteproc_core.c if (!vring->num || !vring->align) { vring 389 drivers/remoteproc/remoteproc_core.c vring->num, vring->align); vring 393 drivers/remoteproc/remoteproc_core.c rvring->len = vring->num; vring 394 drivers/remoteproc/remoteproc_core.c rvring->align = vring->align; vring 403 drivers/remoteproc/remoteproc_core.c int idx = rvring - rvring->rvdev->vring; vring 410 drivers/remoteproc/remoteproc_core.c rsc->vring[idx].da = 0; vring 411 drivers/remoteproc/remoteproc_core.c rsc->vring[idx].notifyid = -1; vring 497 drivers/remoteproc/remoteproc_core.c if (rsc->num_of_vrings > ARRAY_SIZE(rvdev->vring)) { vring 564 drivers/remoteproc/remoteproc_core.c rproc_free_vring(&rvdev->vring[i]); vring 577 drivers/remoteproc/remoteproc_core.c for (id = 0; id < ARRAY_SIZE(rvdev->vring); id++) { vring 578 drivers/remoteproc/remoteproc_core.c rvring = &rvdev->vring[id]; vring 254 drivers/remoteproc/remoteproc_debugfs.c seq_printf(seq, " Device Address 0x%x\n", v->vring[j].da); vring 255 drivers/remoteproc/remoteproc_debugfs.c seq_printf(seq, " Alignment %d\n", v->vring[j].align); vring 256 drivers/remoteproc/remoteproc_debugfs.c seq_printf(seq, " Number of buffers %d\n", v->vring[j].num); vring 257 drivers/remoteproc/remoteproc_debugfs.c seq_printf(seq, " Notify ID %d\n", v->vring[j].notifyid); vring 259 drivers/remoteproc/remoteproc_debugfs.c v->vring[j].pa); vring 81 drivers/remoteproc/remoteproc_virtio.c if (id >= ARRAY_SIZE(rvdev->vring)) vring 93 drivers/remoteproc/remoteproc_virtio.c rvring = &rvdev->vring[id]; vring 121 drivers/remoteproc/remoteproc_virtio.c rsc->vring[id].da = mem->da; vring 259 drivers/remoteproc/remoteproc_virtio.c cfg = &rsc->vring[rsc->num_of_vrings]; vring 277 drivers/remoteproc/remoteproc_virtio.c cfg = &rsc->vring[rsc->num_of_vrings]; vring 41 drivers/vhost/vringh.c err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); vring 44 drivers/vhost/vringh.c &vrh->vring.avail->idx); vring 49 drivers/vhost/vringh.c return vrh->vring.num; vring 54 drivers/vhost/vringh.c i = *last_avail_idx & (vrh->vring.num - 1); vring 56 drivers/vhost/vringh.c err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); vring 59 drivers/vhost/vringh.c *last_avail_idx, &vrh->vring.avail->ring[i]); vring 63 drivers/vhost/vringh.c if (head >= vrh->vring.num) { vring 65 drivers/vhost/vringh.c head, vrh->vring.num); vring 215 drivers/vhost/vringh.c *descs = vrh->vring.desc; vring 216 drivers/vhost/vringh.c *desc_max = vrh->vring.num; vring 273 drivers/vhost/vringh.c descs = vrh->vring.desc; vring 274 drivers/vhost/vringh.c desc_max = vrh->vring.num; vring 323 drivers/vhost/vringh.c if (count++ == vrh->vring.num) { vring 415 drivers/vhost/vringh.c used_ring = vrh->vring.used; vring 418 drivers/vhost/vringh.c off = used_idx % vrh->vring.num; vring 421 drivers/vhost/vringh.c if (num_used > 1 && unlikely(off + num_used >= vrh->vring.num)) { vring 422 drivers/vhost/vringh.c u16 part = vrh->vring.num - off; vring 439 drivers/vhost/vringh.c err = putu16(vrh, &vrh->vring.used->idx, used_idx + num_used); vring 442 drivers/vhost/vringh.c &vrh->vring.used->idx); vring 468 drivers/vhost/vringh.c err = getu16(vrh, &flags, &vrh->vring.avail->flags); vring 471 drivers/vhost/vringh.c &vrh->vring.avail->flags); vring 478 drivers/vhost/vringh.c err = getu16(vrh, &used_event, &vring_used_event(&vrh->vring)); vring 481 drivers/vhost/vringh.c &vring_used_event(&vrh->vring)); vring 508 drivers/vhost/vringh.c if (putu16(vrh, &vrh->vring.used->flags, 0) != 0) { vring 510 drivers/vhost/vringh.c &vrh->vring.used->flags); vring 514 drivers/vhost/vringh.c if (putu16(vrh, &vring_avail_event(&vrh->vring), vring 517 drivers/vhost/vringh.c &vring_avail_event(&vrh->vring)); vring 526 drivers/vhost/vringh.c if (getu16(vrh, &avail, &vrh->vring.avail->idx) != 0) { vring 528 drivers/vhost/vringh.c &vrh->vring.avail->idx); vring 544 drivers/vhost/vringh.c if (putu16(vrh, &vrh->vring.used->flags, vring 547 drivers/vhost/vringh.c &vrh->vring.used->flags); vring 624 drivers/vhost/vringh.c vrh->vring.num = num; vring 626 drivers/vhost/vringh.c vrh->vring.desc = (__force struct vring_desc *)desc; vring 627 drivers/vhost/vringh.c vrh->vring.avail = (__force struct vring_avail *)avail; vring 628 drivers/vhost/vringh.c vrh->vring.used = (__force struct vring_used *)used; vring 659 drivers/vhost/vringh.c *head = vrh->vring.num; vring 665 drivers/vhost/vringh.c if (err == vrh->vring.num) vring 891 drivers/vhost/vringh.c vrh->vring.num = num; vring 892 drivers/vhost/vringh.c vrh->vring.desc = desc; vring 893 drivers/vhost/vringh.c vrh->vring.avail = avail; vring 894 drivers/vhost/vringh.c vrh->vring.used = used; vring 929 drivers/vhost/vringh.c if (err == vrh->vring.num) vring 120 drivers/virtio/virtio_ring.c struct vring vring; vring 147 drivers/virtio/virtio_ring.c } vring; vring 451 drivers/virtio/virtio_ring.c WARN_ON_ONCE(total_sg > vq->split.vring.num && !vq->indirect); vring 462 drivers/virtio/virtio_ring.c desc = vq->split.vring.desc; vring 518 drivers/virtio/virtio_ring.c vq->split.vring.desc[head].flags = cpu_to_virtio16(_vq->vdev, vring 520 drivers/virtio/virtio_ring.c vq->split.vring.desc[head].addr = cpu_to_virtio64(_vq->vdev, vring 523 drivers/virtio/virtio_ring.c vq->split.vring.desc[head].len = cpu_to_virtio32(_vq->vdev, vring 533 drivers/virtio/virtio_ring.c vq->split.vring.desc[head].next); vring 546 drivers/virtio/virtio_ring.c avail = vq->split.avail_idx_shadow & (vq->split.vring.num - 1); vring 547 drivers/virtio/virtio_ring.c vq->split.vring.avail->ring[avail] = cpu_to_virtio16(_vq->vdev, head); vring 553 drivers/virtio/virtio_ring.c vq->split.vring.avail->idx = cpu_to_virtio16(_vq->vdev, vring 609 drivers/virtio/virtio_ring.c vring_avail_event(&vq->split.vring)), vring 612 drivers/virtio/virtio_ring.c needs_kick = !(vq->split.vring.used->flags & vring 632 drivers/virtio/virtio_ring.c while (vq->split.vring.desc[i].flags & nextflag) { vring 633 drivers/virtio/virtio_ring.c vring_unmap_one_split(vq, &vq->split.vring.desc[i]); vring 634 drivers/virtio/virtio_ring.c i = virtio16_to_cpu(vq->vq.vdev, vq->split.vring.desc[i].next); vring 638 drivers/virtio/virtio_ring.c vring_unmap_one_split(vq, &vq->split.vring.desc[i]); vring 639 drivers/virtio/virtio_ring.c vq->split.vring.desc[i].next = cpu_to_virtio16(vq->vq.vdev, vring 656 drivers/virtio/virtio_ring.c vq->split.vring.desc[head].len); vring 658 drivers/virtio/virtio_ring.c BUG_ON(!(vq->split.vring.desc[head].flags & vring 675 drivers/virtio/virtio_ring.c vq->split.vring.used->idx); vring 703 drivers/virtio/virtio_ring.c last_used = (vq->last_used_idx & (vq->split.vring.num - 1)); vring 705 drivers/virtio/virtio_ring.c vq->split.vring.used->ring[last_used].id); vring 707 drivers/virtio/virtio_ring.c vq->split.vring.used->ring[last_used].len); vring 709 drivers/virtio/virtio_ring.c if (unlikely(i >= vq->split.vring.num)) { vring 727 drivers/virtio/virtio_ring.c &vring_used_event(&vq->split.vring), vring 743 drivers/virtio/virtio_ring.c vq->split.vring.avail->flags = vring 764 drivers/virtio/virtio_ring.c vq->split.vring.avail->flags = vring 768 drivers/virtio/virtio_ring.c vring_used_event(&vq->split.vring) = cpu_to_virtio16(_vq->vdev, vring 779 drivers/virtio/virtio_ring.c vq->split.vring.used->idx); vring 797 drivers/virtio/virtio_ring.c vq->split.vring.avail->flags = vring 805 drivers/virtio/virtio_ring.c &vring_used_event(&vq->split.vring), vring 808 drivers/virtio/virtio_ring.c if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->split.vring.used->idx) vring 826 drivers/virtio/virtio_ring.c for (i = 0; i < vq->split.vring.num; i++) { vring 833 drivers/virtio/virtio_ring.c vq->split.vring.avail->idx = cpu_to_virtio16(_vq->vdev, vring 839 drivers/virtio/virtio_ring.c BUG_ON(vq->vq.num_free != vq->split.vring.num); vring 861 drivers/virtio/virtio_ring.c struct vring vring; vring 892 drivers/virtio/virtio_ring.c vring_init(&vring, num, queue, vring_align); vring 894 drivers/virtio/virtio_ring.c vq = __vring_new_virtqueue(index, vring, vdev, weak_barriers, context, vring 1005 drivers/virtio/virtio_ring.c BUG_ON(id == vq->packed.vring.num); vring 1029 drivers/virtio/virtio_ring.c vq->packed.vring.desc[head].addr = cpu_to_le64(addr); vring 1030 drivers/virtio/virtio_ring.c vq->packed.vring.desc[head].len = cpu_to_le32(total_sg * vring 1032 drivers/virtio/virtio_ring.c vq->packed.vring.desc[head].id = cpu_to_le16(id); vring 1048 drivers/virtio/virtio_ring.c vq->packed.vring.desc[head].flags = cpu_to_le16(VRING_DESC_F_INDIRECT | vring 1056 drivers/virtio/virtio_ring.c if (n >= vq->packed.vring.num) { vring 1128 drivers/virtio/virtio_ring.c WARN_ON_ONCE(total_sg > vq->packed.vring.num && !vq->indirect); vring 1130 drivers/virtio/virtio_ring.c desc = vq->packed.vring.desc; vring 1142 drivers/virtio/virtio_ring.c BUG_ON(id == vq->packed.vring.num); vring 1174 drivers/virtio/virtio_ring.c if ((unlikely(++i >= vq->packed.vring.num))) { vring 1205 drivers/virtio/virtio_ring.c vq->packed.vring.desc[head].flags = head_flags; vring 1224 drivers/virtio/virtio_ring.c if (i >= vq->packed.vring.num) vring 1257 drivers/virtio/virtio_ring.c snapshot.u32 = *(u32 *)vq->packed.vring.device; vring 1273 drivers/virtio/virtio_ring.c event_idx -= vq->packed.vring.num; vring 1333 drivers/virtio/virtio_ring.c flags = le16_to_cpu(vq->packed.vring.desc[idx].flags); vring 1371 drivers/virtio/virtio_ring.c id = le16_to_cpu(vq->packed.vring.desc[last_used].id); vring 1372 drivers/virtio/virtio_ring.c *len = le32_to_cpu(vq->packed.vring.desc[last_used].len); vring 1374 drivers/virtio/virtio_ring.c if (unlikely(id >= vq->packed.vring.num)) { vring 1388 drivers/virtio/virtio_ring.c if (unlikely(vq->last_used_idx >= vq->packed.vring.num)) { vring 1389 drivers/virtio/virtio_ring.c vq->last_used_idx -= vq->packed.vring.num; vring 1400 drivers/virtio/virtio_ring.c &vq->packed.vring.driver->off_wrap, vring 1417 drivers/virtio/virtio_ring.c vq->packed.vring.driver->flags = vring 1434 drivers/virtio/virtio_ring.c vq->packed.vring.driver->off_wrap = vring 1449 drivers/virtio/virtio_ring.c vq->packed.vring.driver->flags = vring 1485 drivers/virtio/virtio_ring.c bufs = (vq->packed.vring.num - vq->vq.num_free) * 3 / 4; vring 1489 drivers/virtio/virtio_ring.c if (used_idx >= vq->packed.vring.num) { vring 1490 drivers/virtio/virtio_ring.c used_idx -= vq->packed.vring.num; vring 1494 drivers/virtio/virtio_ring.c vq->packed.vring.driver->off_wrap = cpu_to_le16(used_idx | vring 1508 drivers/virtio/virtio_ring.c vq->packed.vring.driver->flags = vring 1537 drivers/virtio/virtio_ring.c for (i = 0; i < vq->packed.vring.num; i++) { vring 1547 drivers/virtio/virtio_ring.c BUG_ON(vq->vq.num_free != vq->packed.vring.num); vring 1631 drivers/virtio/virtio_ring.c vq->packed.vring.num = num; vring 1632 drivers/virtio/virtio_ring.c vq->packed.vring.desc = ring; vring 1633 drivers/virtio/virtio_ring.c vq->packed.vring.driver = driver; vring 1634 drivers/virtio/virtio_ring.c vq->packed.vring.device = device; vring 1668 drivers/virtio/virtio_ring.c vq->packed.vring.driver->flags = vring 2054 drivers/virtio/virtio_ring.c struct vring vring, vring 2076 drivers/virtio/virtio_ring.c vq->vq.num_free = vring.num; vring 2101 drivers/virtio/virtio_ring.c vq->split.vring = vring; vring 2109 drivers/virtio/virtio_ring.c vq->split.vring.avail->flags = cpu_to_virtio16(vdev, vring 2113 drivers/virtio/virtio_ring.c vq->split.desc_state = kmalloc_array(vring.num, vring 2122 drivers/virtio/virtio_ring.c for (i = 0; i < vring.num-1; i++) vring 2123 drivers/virtio/virtio_ring.c vq->split.vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); vring 2124 drivers/virtio/virtio_ring.c memset(vq->split.desc_state, 0, vring.num * vring 2167 drivers/virtio/virtio_ring.c struct vring vring; vring 2172 drivers/virtio/virtio_ring.c vring_init(&vring, num, pages, vring_align); vring 2173 drivers/virtio/virtio_ring.c return __vring_new_virtqueue(index, vring, vdev, weak_barriers, context, vring 2186 drivers/virtio/virtio_ring.c vq->packed.vring.desc, vring 2191 drivers/virtio/virtio_ring.c vq->packed.vring.driver, vring 2196 drivers/virtio/virtio_ring.c vq->packed.vring.device, vring 2204 drivers/virtio/virtio_ring.c vq->split.vring.desc, vring 2254 drivers/virtio/virtio_ring.c return vq->packed_ring ? vq->packed.vring.num : vq->split.vring.num; vring 2304 drivers/virtio/virtio_ring.c ((char *)vq->split.vring.avail - (char *)vq->split.vring.desc); vring 2318 drivers/virtio/virtio_ring.c ((char *)vq->split.vring.used - (char *)vq->split.vring.desc); vring 2323 drivers/virtio/virtio_ring.c const struct vring *virtqueue_get_vring(struct virtqueue *vq) vring 2325 drivers/virtio/virtio_ring.c return &to_vvq(vq)->split.vring; vring 309 include/linux/remoteproc.h struct fw_rsc_vdev_vring vring[0]; vring 582 include/linux/remoteproc.h struct rproc_vring vring[RVDEV_NUM_VRINGS]; vring 88 include/linux/virtio.h const struct vring *virtqueue_get_vring(struct virtqueue *vq); vring 82 include/linux/virtio_ring.h struct vring vring, vring 40 include/linux/vringh.h struct vring vring; vring 168 include/uapi/linux/mic_common.h struct vring vr; vring 167 include/uapi/linux/virtio_ring.h static inline void vring_init(struct vring *vr, unsigned int num, void *p, vring 1046 samples/mic/mpssd/mpssd.c start_virtblk(struct mic_info *mic, struct mic_vring *vring) vring 1055 samples/mic/mpssd/mpssd.c VIRTIO_ID_BLOCK, vring, NULL, vring 1163 samples/mic/mpssd/mpssd.c struct mic_vring vring; vring 1182 samples/mic/mpssd/mpssd.c if (!start_virtblk(mic, &vring)) vring 1215 samples/mic/mpssd/mpssd.c while (vring.info->avail_idx != vring 1216 samples/mic/mpssd/mpssd.c le16toh(vring.vr.avail->idx)) { vring 1219 samples/mic/mpssd/mpssd.c vring.info->avail_idx & vring 1220 samples/mic/mpssd/mpssd.c (vring.vr.num - 1); vring 1222 samples/mic/mpssd/mpssd.c vring.vr.avail->ring[avail_idx]); vring 1223 samples/mic/mpssd/mpssd.c desc = &vring.vr.desc[desc_idx]; vring 1227 samples/mic/mpssd/mpssd.c vring.info->avail_idx); vring 1229 samples/mic/mpssd/mpssd.c vring.vr.num, desc); vring 1249 samples/mic/mpssd/mpssd.c for (desc = &vring.vr.desc[buffer_desc_idx]; vring 1252 samples/mic/mpssd/mpssd.c desc = &vring.vr.desc[desc_idx]) { vring 22 tools/virtio/ringtest/virtio_ring_0_9.c struct vring ring; vring 31 tools/virtio/virtio_test.c struct vring vring; vring 68 tools/virtio/virtio_test.c .desc_user_addr = (uint64_t)(unsigned long)info->vring.desc, vring 69 tools/virtio/virtio_test.c .avail_user_addr = (uint64_t)(unsigned long)info->vring.avail, vring 70 tools/virtio/virtio_test.c .used_user_addr = (uint64_t)(unsigned long)info->vring.used, vring 75 tools/virtio/virtio_test.c state.num = info->vring.num; vring 101 tools/virtio/virtio_test.c vring_init(&info->vring, num, info->ring, 4096); vring 103 tools/virtio/virtio_test.c info->vring.num, 4096, &dev->vdev, vring 116 tools/virtio/vringh_test.c err = get_user(avail_idx, &vrh->vring.avail->idx); vring 126 tools/virtio/vringh_test.c i = vrh->last_avail_idx & (vrh->vring.num - 1); vring 128 tools/virtio/vringh_test.c err = get_user(*head, &vrh->vring.avail->ring[i]); vring 188 tools/virtio/vringh_test.c vring_init(&vrh.vring, RINGSIZE, host_map, ALIGN); vring 190 tools/virtio/vringh_test.c vrh.vring.desc, vrh.vring.avail, vrh.vring.used); vring 490 tools/virtio/vringh_test.c vring_init(&vrh.vring, RINGSIZE, __user_addr_min, ALIGN); vring 492 tools/virtio/vringh_test.c vrh.vring.desc, vrh.vring.avail, vrh.vring.used); vring 648 tools/virtio/vringh_test.c assert(vrh.vring.used->idx % RINGSIZE != 0); vring 663 tools/virtio/vringh_test.c struct vring vring; vring 683 tools/virtio/vringh_test.c vring_init(&vring, RINGSIZE, __user_addr_min, ALIGN); vring 686 tools/virtio/vringh_test.c assert(vring.desc[0].addr == (unsigned long)d); vring 687 tools/virtio/vringh_test.c assert(vring.desc[1].addr == (unsigned long)(d+2)); vring 688 tools/virtio/vringh_test.c assert(vring.desc[2].addr == (unsigned long)data + 6); vring 689 tools/virtio/vringh_test.c assert(vring.desc[3].addr == (unsigned long)(d+3)); vring 690 tools/virtio/vringh_test.c vring.desc[0].flags |= VRING_DESC_F_INDIRECT; vring 691 tools/virtio/vringh_test.c vring.desc[1].flags |= VRING_DESC_F_INDIRECT; vring 692 tools/virtio/vringh_test.c vring.desc[3].flags |= VRING_DESC_F_INDIRECT;