Lines Matching refs:head
54 __le32 *head;
69 u32 head;
85 head = le32_to_cpu(*pipe->head);
88 if (head < tail)
89 return pipe->native.length - tail + head;
91 return head - tail;
132 u32 head;
136 head = le32_to_cpu(*pipe->head);
139 if (tail <= head)
140 avail = pipe->native.length - head + tail;
142 avail = tail - head;
153 unsigned int head,
158 len = min_t(size_t, count, pipe->native.length - head);
160 memcpy(pipe->fifo + head, data, len);
165 head += count;
166 if (head >= pipe->native.length)
167 head -= pipe->native.length;
169 return head;
177 unsigned int head;
179 head = le32_to_cpu(*pipe->head);
181 head = glink_smem_tx_write_one(pipe, head, hdr, hlen);
182 head = glink_smem_tx_write_one(pipe, head, data, dlen);
184 /* Ensure head is always aligned to 8 bytes */
185 head = ALIGN(head, 8);
186 if (head >= pipe->native.length)
187 head -= pipe->native.length;
189 /* Ensure ordering of fifo and head update */
192 *pipe->head = cpu_to_le32(head);
288 tx_pipe->head = &descs[1];
290 rx_pipe->head = &descs[3];
336 *tx_pipe->head = 0;