Lines Matching refs:qsz
56 unsigned VirtqSize(uint16_t qsz) in VirtqSize() argument
60 ALIGN(sizeof(struct VirtqDesc) * qsz, VIRTQ_ALIGN_AVAIL) + in VirtqSize()
61 ALIGN(sizeof(struct VirtqAvail) + sizeof(uint16_t) * qsz, VIRTQ_ALIGN_USED) + in VirtqSize()
62 sizeof(struct VirtqUsed) + sizeof(struct VirtqUsedElem) * qsz; in VirtqSize()
149 if (num < q->qsz) { in CompleteConfigQueue()
150 PRINT_ERR("queue %u not available: max qsz=%u, requested=%u\n", queue, num, q->qsz); in CompleteConfigQueue()
154 WRITE_UINT32(q->qsz, dev->base + VIRTMMIO_REG_QUEUENUM); in CompleteConfigQueue()
163 static VADDR_T CalculateQueueAddr(VADDR_T base, uint16_t qsz, struct Virtq *q) in CalculateQueueAddr() argument
167 q->qsz = qsz; in CalculateQueueAddr()
168 base = ALIGN(base + sizeof(struct VirtqDesc) * qsz, VIRTQ_ALIGN_AVAIL); in CalculateQueueAddr()
170 base = ALIGN(base + sizeof(struct VirtqAvail) + sizeof(uint16_t) * qsz, VIRTQ_ALIGN_USED); in CalculateQueueAddr()
173 return base + sizeof(struct VirtqUsed) + sizeof(struct VirtqUsedElem) * qsz; in CalculateQueueAddr()
176 VADDR_T VirtmmioConfigQueue(struct VirtmmioDev *dev, VADDR_T base, uint16_t qsz[], int num) in VirtmmioConfigQueue() argument
181 base = CalculateQueueAddr(base, qsz[i], &dev->vq[i]); in VirtmmioConfigQueue()