Lines Matching refs:qsz
61 unsigned VirtqSize(uint16_t qsz) in VirtqSize() argument
65 ALIGN(sizeof(struct VirtqDesc) * qsz, VIRTQ_ALIGN_AVAIL) + in VirtqSize()
66 ALIGN(sizeof(struct VirtqAvail) + sizeof(uint16_t) * qsz, VIRTQ_ALIGN_USED) + in VirtqSize()
67 sizeof(struct VirtqUsed) + sizeof(struct VirtqUsedElem) * qsz; in VirtqSize()
157 if (num < q->qsz) { in CompleteConfigQueue()
158 PRINT_ERR("queue %u not available: max qsz=%u, requested=%u\n", queue, num, q->qsz); in CompleteConfigQueue()
162 FENCE_WRITE_UINT32(q->qsz, dev->base + VIRTMMIO_REG_QUEUENUM); in CompleteConfigQueue()
171 static VADDR_T CalculateQueueAddr(VADDR_T base, uint16_t qsz, struct Virtq *q) in CalculateQueueAddr() argument
175 q->qsz = qsz; in CalculateQueueAddr()
176 base = ALIGN(base + sizeof(struct VirtqDesc) * qsz, VIRTQ_ALIGN_AVAIL); in CalculateQueueAddr()
178 base = ALIGN(base + sizeof(struct VirtqAvail) + sizeof(uint16_t) * qsz, VIRTQ_ALIGN_USED); in CalculateQueueAddr()
181 return base + sizeof(struct VirtqUsed) + sizeof(struct VirtqUsedElem) * qsz; in CalculateQueueAddr()
184 VADDR_T VirtmmioConfigQueue(struct VirtmmioDev *dev, VADDR_T base, uint16_t qsz[], int num) in VirtmmioConfigQueue() argument
189 base = CalculateQueueAddr(base, qsz[i], &dev->vq[i]); in VirtmmioConfigQueue()