/kernel/linux/linux-5.10/tools/virtio/ringtest/ |
D | virtio_ring_0_9.c | 70 ret = posix_memalign(&p, 0x1000, vring_size(ring_size, 0x1000)); in alloc_ring() 75 memset(p, 0, vring_size(ring_size, 0x1000)); in alloc_ring() 76 vring_init(&ring, ring_size, p, 0x1000); in alloc_ring() 85 for (i = 0; i < ring_size - 1; i++) in alloc_ring() 89 guest.num_free = ring_size; in alloc_ring() 90 data = malloc(ring_size * sizeof *data); in alloc_ring() 95 memset(data, 0, ring_size * sizeof *data); in alloc_ring() 111 head = (ring_size - 1) & (guest.avail_idx++); in add_inbuf() 136 ring.avail->ring[avail & (ring_size - 1)] = in add_inbuf() 137 (head | (avail & ~(ring_size - 1))) ^ 0x8000; in add_inbuf() [all …]
|
D | ring.c | 82 ret = posix_memalign((void **)&ring, 0x1000, ring_size * sizeof *ring); in alloc_ring() 97 for (i = 0; i < ring_size; ++i) { in alloc_ring() 103 guest.num_free = ring_size; in alloc_ring() 104 data = calloc(ring_size, sizeof(*data)); in alloc_ring() 120 head = (ring_size - 1) & (guest.avail_idx++); in add_inbuf() 145 unsigned head = (ring_size - 1) & guest.last_used_idx; in get_buf() 154 index = ring[head].index & (ring_size - 1); in get_buf() 166 unsigned head = (ring_size - 1) & guest.last_used_idx; in used_empty() 221 unsigned head = (ring_size - 1) & host.used_idx; in avail_empty() 228 unsigned head = (ring_size - 1) & host.used_idx; in use_buf()
|
D | main.c | 29 unsigned ring_size = 256; variable 288 ring_size, in help() 322 ring_size = strtol(optarg, &endptr, 0); in main() 323 assert(ring_size && !(ring_size & (ring_size - 1))); in main()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_ih.c | 42 unsigned ring_size, bool use_bus_addr) in amdgpu_ih_ring_init() argument 48 rb_bufsz = order_base_2(ring_size / 4); in amdgpu_ih_ring_init() 49 ring_size = (1 << rb_bufsz) * 4; in amdgpu_ih_ring_init() 50 ih->ring_size = ring_size; in amdgpu_ih_ring_init() 51 ih->ptr_mask = ih->ring_size - 1; in amdgpu_ih_ring_init() 64 ih->ring = dma_alloc_coherent(adev->dev, ih->ring_size + 8, in amdgpu_ih_ring_init() 70 ih->wptr_addr = dma_addr + ih->ring_size; in amdgpu_ih_ring_init() 71 ih->wptr_cpu = &ih->ring[ih->ring_size / 4]; in amdgpu_ih_ring_init() 72 ih->rptr_addr = dma_addr + ih->ring_size + 4; in amdgpu_ih_ring_init() 73 ih->rptr_cpu = &ih->ring[(ih->ring_size / 4) + 1]; in amdgpu_ih_ring_init() [all …]
|
D | psp_v10_0.c | 133 ring->ring_size = 0x1000; in psp_v10_0_ring_init() 134 ret = amdgpu_bo_create_kernel(adev, ring->ring_size, PAGE_SIZE, in psp_v10_0_ring_init() 140 ring->ring_size = 0; in psp_v10_0_ring_init() 162 psp_ring_reg = ring->ring_size; in psp_v10_0_ring_create()
|
D | navi10_ih.c | 108 if (adev->irq.ih1.ring_size) { in navi10_ih_enable_interrupts() 124 if (adev->irq.ih2.ring_size) { in navi10_ih_enable_interrupts() 169 if (adev->irq.ih1.ring_size) { in navi10_ih_disable_interrupts() 189 if (adev->irq.ih2.ring_size) { in navi10_ih_disable_interrupts() 213 int rb_bufsz = order_base_2(ih->ring_size / 4); in navi10_ih_rb_cntl() 309 if (adev->irq.ih1.ring_size) in navi10_ih_irq_init() 349 if (ih->ring_size) { in navi10_ih_irq_init() 378 if (ih->ring_size) { in navi10_ih_irq_init() 567 if ((v < ih->ring_size) && (v != ih->rptr)) in navi10_ih_irq_rearm() 672 adev->irq.ih1.ring_size = 0; in navi10_ih_sw_init() [all …]
|
D | amdgpu_ih.h | 37 unsigned ring_size; member 73 unsigned ring_size, bool use_bus_addr);
|
D | amdgpu_ring.c | 240 ring->ring_size = roundup_pow_of_two(max_dw * 4 * sched_hw_submission); in amdgpu_ring_init() 242 ring->buf_mask = (ring->ring_size / 4) - 1; in amdgpu_ring_init() 247 r = amdgpu_bo_create_kernel(adev, ring->ring_size + ring->funcs->extra_dw, PAGE_SIZE, in amdgpu_ring_init() 395 if (*pos >= (ring->ring_size + 12)) in amdgpu_debugfs_ring_read() 435 i_size_write(ent->d_inode, ring->ring_size + 12); in amdgpu_debugfs_ring_init()
|
D | vega10_ih.c | 63 if (adev->irq.ih1.ring_size) { in vega10_ih_enable_interrupts() 79 if (adev->irq.ih2.ring_size) { in vega10_ih_enable_interrupts() 124 if (adev->irq.ih1.ring_size) { in vega10_ih_disable_interrupts() 144 if (adev->irq.ih2.ring_size) { in vega10_ih_disable_interrupts() 168 int rb_bufsz = order_base_2(ih->ring_size / 4); in vega10_ih_rb_cntl() 277 if (ih->ring_size) { in vega10_ih_irq_init() 307 if (ih->ring_size) { in vega10_ih_irq_init() 497 if ((v < ih->ring_size) && (v != ih->rptr)) in vega10_ih_irq_rearm()
|
D | psp_v3_1.c | 178 ring->ring_size = 0x1000; in psp_v3_1_ring_init() 179 ret = amdgpu_bo_create_kernel(adev, ring->ring_size, PAGE_SIZE, in psp_v3_1_ring_init() 185 ring->ring_size = 0; in psp_v3_1_ring_init() 268 psp_ring_reg = ring->ring_size; in psp_v3_1_ring_create()
|
D | psp_v12_0.c | 247 ring->ring_size = 0x1000; in psp_v12_0_ring_init() 248 ret = amdgpu_bo_create_kernel(adev, ring->ring_size, PAGE_SIZE, in psp_v12_0_ring_init() 254 ring->ring_size = 0; in psp_v12_0_ring_init() 296 psp_ring_reg = ring->ring_size; in psp_v12_0_ring_create()
|
/kernel/linux/linux-5.10/include/xen/interface/io/ |
D | ring.h | 365 static inline RING_IDX name##_mask(RING_IDX idx, RING_IDX ring_size) \ 367 return idx & (ring_size - 1); \ 372 RING_IDX ring_size) \ 374 return buf + name##_mask(idx, ring_size); \ 382 RING_IDX ring_size) \ 385 size <= ring_size - *masked_cons) { \ 388 memcpy(opaque, buf + *masked_cons, ring_size - *masked_cons); \ 389 memcpy((unsigned char *)opaque + ring_size - *masked_cons, buf, \ 390 size - (ring_size - *masked_cons)); \ 392 *masked_cons = name##_mask(*masked_cons + size, ring_size); \ [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/ccp/ |
D | tee-dev.c | 24 static int tee_alloc_ring(struct psp_tee_device *tee, int ring_size) in tee_alloc_ring() argument 29 if (!ring_size) in tee_alloc_ring() 35 start_addr = (void *)__get_free_pages(GFP_KERNEL, get_order(ring_size)); in tee_alloc_ring() 39 memset(start_addr, 0x0, ring_size); in tee_alloc_ring() 41 rb_mgr->ring_size = ring_size; in tee_alloc_ring() 56 get_order(rb_mgr->ring_size)); in tee_free_ring() 59 rb_mgr->ring_size = 0; in tee_free_ring() 95 cmd->size = tee->rb_mgr.ring_size; in tee_alloc_cmd_buffer() 110 int ring_size = MAX_RING_BUFFER_ENTRIES * sizeof(struct tee_ring_cmd); in tee_init_ring() local 118 ret = tee_alloc_ring(tee, ring_size); in tee_init_ring() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/ |
D | radeon_ring.c | 87 ring->ring_free_dw = rptr + (ring->ring_size / 4); in radeon_ring_free_size() 92 ring->ring_free_dw = ring->ring_size / 4; in radeon_ring_free_size() 113 if (ndw > (ring->ring_size / 4)) in radeon_ring_alloc() 312 size = ring->wptr + (ring->ring_size / 4); in radeon_ring_backup() 379 int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *ring, unsigned ring_size, in radeon_ring_init() argument 384 ring->ring_size = ring_size; in radeon_ring_init() 389 r = radeon_bo_create(rdev, ring->ring_size, PAGE_SIZE, true, in radeon_ring_init() 414 ring->ptr_mask = (ring->ring_size / 4) - 1; in radeon_ring_init() 415 ring->ring_free_dw = ring->ring_size / 4; in radeon_ring_init() 476 count = (ring->ring_size / 4) - ring->ring_free_dw; in radeon_debugfs_ring_info()
|
/kernel/linux/linux-5.10/drivers/xen/ |
D | evtchn.c | 67 unsigned int ring_size; member 98 return idx & (u->ring_size - 1); in evtchn_ring_offset() 174 if ((u->ring_prod - u->ring_cons) < u->ring_size) { in evtchn_interrupt() 230 if (((c ^ p) & u->ring_size) != 0) { in evtchn_read() 231 bytes1 = (u->ring_size - evtchn_ring_offset(u, c)) * in evtchn_read() 317 if (u->nr_evtchns <= u->ring_size) in evtchn_resize_ring() 320 if (u->ring_size == 0) in evtchn_resize_ring() 323 new_size = 2 * u->ring_size; in evtchn_resize_ring() 349 memcpy(new_ring, old_ring, u->ring_size * sizeof(*u->ring)); in evtchn_resize_ring() 350 memcpy(new_ring + u->ring_size, old_ring, in evtchn_resize_ring() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/amazon/ena/ |
D | ena_netdev.h | 90 #define ENA_TX_RING_IDX_NEXT(idx, ring_size) (((idx) + 1) & ((ring_size) - 1)) argument 92 #define ENA_RX_RING_IDX_NEXT(idx, ring_size) (((idx) + 1) & ((ring_size) - 1)) argument 93 #define ENA_RX_RING_IDX_ADD(idx, n, ring_size) \ argument 94 (((idx) + (n)) & ((ring_size) - 1)) 285 int ring_size; member
|
/kernel/linux/linux-5.10/drivers/crypto/qat/qat_common/ |
D | adf_transport.c | 76 ADF_MAX_INFLIGHTS(ring->ring_size, ring->msg_size)) { in adf_send_message() 86 ADF_RING_SIZE_MODULO(ring->ring_size)); in adf_send_message() 104 ADF_RING_SIZE_MODULO(ring->ring_size)); in adf_handle_response() 117 u32 ring_config = BUILD_RING_CONFIG(ring->ring_size); in adf_configure_tx_ring() 126 BUILD_RESP_RING_CONFIG(ring->ring_size, in adf_configure_rx_ring() 141 ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size); in adf_init_ring() 166 ring_base = BUILD_RING_BASE_ADDR(ring->dma_addr, ring->ring_size); in adf_init_ring() 176 ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size); in adf_cleanup_ring() 239 ring->ring_size = adf_verify_ring_size(msg_size, num_msgs); in adf_create_ring()
|
D | adf_transport_debug.c | 21 if (*pos >= (ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size) / in adf_ring_start() 33 if (*pos >= (ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size) / in adf_ring_next() 65 ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size), in adf_ring_show()
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/pasemi/ |
D | dma_lib.c | 240 int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size) in pasemi_dma_alloc_ring() argument 244 chan->ring_size = ring_size; in pasemi_dma_alloc_ring() 247 ring_size * sizeof(u64), in pasemi_dma_alloc_ring() 266 dma_free_coherent(&dma_pdev->dev, chan->ring_size * sizeof(u64), in pasemi_dma_free_ring() 269 chan->ring_size = 0; in pasemi_dma_free_ring()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/atheros/ |
D | ag71xx.c | 782 int ring_mask, ring_size; in ag71xx_tx_packets() local 786 ring_size = BIT(ring->order); in ag71xx_tx_packets() 839 if ((ring->curr - ring->dirty) < (ring_size * 3) / 4) in ag71xx_tx_packets() 1215 int ring_size = BIT(ring->order); in ag71xx_ring_tx_init() local 1216 int ring_mask = ring_size - 1; in ag71xx_ring_tx_init() 1219 for (i = 0; i < ring_size; i++) { in ag71xx_ring_tx_init() 1240 int ring_size = BIT(ring->order); in ag71xx_ring_rx_clean() local 1246 for (i = 0; i < ring_size; i++) in ag71xx_ring_rx_clean() 1287 int ring_size = BIT(ring->order); in ag71xx_ring_rx_init() local 1292 for (i = 0; i < ring_size; i++) { in ag71xx_ring_rx_init() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | test_ringbuf.c | 32 long ring_size = 0; variable 73 ring_size = bpf_ringbuf_query(&ringbuf, BPF_RB_RING_SIZE); in test_ringbuf()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/pensando/ionic/ |
D | ionic_dev.c | 451 .q_init.ring_size = ilog2(q->num_descs), in ionic_dev_cmd_adminq_init() 468 unsigned int ring_size; in ionic_cq_init() local 473 ring_size = ilog2(num_descs); in ionic_cq_init() 474 if (ring_size < 2 || ring_size > 16) in ionic_cq_init() 537 unsigned int ring_size; in ionic_q_init() local 542 ring_size = ilog2(num_descs); in ionic_q_init() 543 if (ring_size < 2 || ring_size > 16) in ionic_q_init()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/r128/ |
D | r128_ioc32.c | 45 int ring_size; member 77 init.ring_size = init32.ring_size; in compat_r128_init()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/ti/ |
D | cpmac.c | 191 int ring_size; member 684 for (i = 0; i < priv->ring_size; i++) { in cpmac_clear_rx() 829 ring->rx_pending = priv->ring_size; in cpmac_get_ringparam() 842 priv->ring_size = ring->rx_pending; in cpmac_set_ringparam() 925 size = priv->ring_size + CPMAC_QUEUES; in cpmac_open() 939 for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) { in cpmac_open() 952 desc->next = &priv->rx_head[(i + 1) % priv->ring_size]; in cpmac_open() 978 for (i = 0; i < priv->ring_size; i++) { in cpmac_open() 1024 for (i = 0; i < priv->ring_size; i++) { in cpmac_stop() 1035 (CPMAC_QUEUES + priv->ring_size), in cpmac_stop() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/microchip/ |
D | lan743x_main.c | 1332 return ((++index) % tx->ring_size); in lan743x_tx_next_index() 1353 sizeof(*tx->ring_cpu_ptr) * (tx->ring_size)); in lan743x_tx_release_all_descriptors() 1355 sizeof(*tx->buffer_info) * (tx->ring_size)); in lan743x_tx_release_all_descriptors() 1377 return tx->ring_size - last_tail + last_head - 1; in lan743x_tx_get_avail_desc() 1620 if (required_number_of_descriptors > (tx->ring_size - 1)) { in lan743x_tx_xmit_frame() 1752 tx->ring_size = 0; in lan743x_tx_ring_cleanup() 1762 tx->ring_size = LAN743X_TX_RING_SIZE; in lan743x_tx_ring_init() 1763 if (tx->ring_size & ~TX_CFG_B_TX_RING_LEN_MASK_) { in lan743x_tx_ring_init() 1777 ring_allocation_size = ALIGN(tx->ring_size * in lan743x_tx_ring_init() 1792 cpu_ptr = kcalloc(tx->ring_size, sizeof(*tx->buffer_info), GFP_KERNEL); in lan743x_tx_ring_init() [all …]
|