Lines Matching refs:index
363 /* Return the virtual address associated with a ring index */
364 void *gsi_ring_virt(struct gsi_ring *ring, u32 index)
366 /* Note: index *must* be used modulo the ring count here */
367 return ring->virt + (index % ring->count) * GSI_RING_ELEMENT_SIZE;
370 /* Return the 32-bit DMA address associated with a ring index */
371 static u32 gsi_ring_addr(struct gsi_ring *ring, u32 index)
373 return lower_32_bits(ring->addr) + index * GSI_RING_ELEMENT_SIZE;
376 /* Return the ring index of a 32-bit ring offset */
700 * The index argument (modulo the ring count) is the first unfilled entry, so
702 * index field with the value provided.
704 static void gsi_evt_ring_doorbell(struct gsi *gsi, u32 evt_ring_id, u32 index)
710 ring->index = index; /* Next unused entry */
712 /* Note: index *must* be used modulo the ring count here */
713 val = gsi_ring_addr(ring, (index - 1) % ring->count);
774 gsi_evt_ring_doorbell(gsi, evt_ring_id, ring->index);
1029 channel->tre_ring.index = 0;
1466 * @index: Event index in ring reported by hardware
1477 * new events since the last time we checked. The ring's index field tells
1478 * the first entry in need of processing. The index provided is the
1484 * Note that @index always refers to an element *within* the event ring.
1486 static void gsi_evt_ring_update(struct gsi *gsi, u32 evt_ring_id, u32 index)
1502 old_index = ring->index;
1509 event_done = gsi_ring_virt(ring, index);
1532 gsi_evt_ring_doorbell(gsi, evt_ring_id, index);
1552 ring->index = 0;
1597 /* Note: index *must* be used modulo the ring count here */
1598 val = gsi_ring_addr(tre_ring, tre_ring->index % tre_ring->count);
1612 u32 index;
1618 * that index always refers to an entry *within* the event ring.
1622 index = gsi_ring_index(ring, ioread32(gsi->virt + offset));
1623 if (index == ring->index % ring->count)
1627 trans = gsi_event_trans(gsi, gsi_ring_virt(ring, index - 1));
1636 gsi_evt_ring_update(gsi, evt_ring_id, index);