Lines Matching full:head
18 #define CIRC_CNT(head, tail, size) (((head) - (tail)) & (size - 1)) argument
19 #define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), (head) + 1, (size)) argument
139 jr->head = 0; in jr_sw_cleanup()
186 int head = jr->head; in jr_enqueue() local
206 jr->info[head].desc_phys_addr = desc_phys_addr; in jr_enqueue()
207 jr->info[head].callback = (void *)callback; in jr_enqueue()
208 jr->info[head].arg = arg; in jr_enqueue()
209 jr->info[head].op_done = 0; in jr_enqueue()
211 unsigned long start = (unsigned long)&jr->info[head] & in jr_enqueue()
213 unsigned long end = ALIGN((unsigned long)&jr->info[head] + in jr_enqueue()
223 addr_lo = (uint32_t *)(&jr->input_ring[head]); in jr_enqueue()
224 addr_hi = (uint32_t *)(&jr->input_ring[head]) + 1; in jr_enqueue()
226 addr_hi = (uint32_t *)(&jr->input_ring[head]); in jr_enqueue()
227 addr_lo = (uint32_t *)(&jr->input_ring[head]) + 1; in jr_enqueue()
235 sec_out32(&jr->input_ring[head], desc_phys_addr); in jr_enqueue()
238 start = (unsigned long)&jr->input_ring[head] & ~(ARCH_DMA_MINALIGN - 1); in jr_enqueue()
239 end = ALIGN((unsigned long)&jr->input_ring[head] + in jr_enqueue()
243 jr->head = (head + 1) & (jr->size - 1); in jr_enqueue()
261 int head = jr->head; in jr_dequeue() local
272 while (sec_in32(®s->orsf) && CIRC_CNT(jr->head, jr->tail, in jr_dequeue()
302 for (i = 0; CIRC_CNT(head, tail + i, jr->size) >= 1; i++) { in jr_dequeue()