Lines Matching refs:head
40 __le32 *head;
54 u32 head;
70 head = le32_to_cpu(*pipe->head);
73 if (head < tail)
74 return pipe->native.length - tail + head;
76 return head - tail;
117 u32 head;
121 head = le32_to_cpu(*pipe->head);
124 if (tail <= head)
125 avail = pipe->native.length - head + tail;
127 avail = tail - head;
138 unsigned int head,
143 len = min_t(size_t, count, pipe->native.length - head);
145 memcpy(pipe->fifo + head, data, len);
150 head += count;
151 if (head >= pipe->native.length)
152 head -= pipe->native.length;
154 return head;
162 unsigned int head;
164 head = le32_to_cpu(*pipe->head);
166 head = glink_smem_tx_write_one(pipe, head, hdr, hlen);
167 head = glink_smem_tx_write_one(pipe, head, data, dlen);
169 /* Ensure head is always aligned to 8 bytes */
170 head = ALIGN(head, 8);
171 if (head >= pipe->native.length)
172 head -= pipe->native.length;
174 /* Ensure ordering of fifo and head update */
177 *pipe->head = cpu_to_le32(head);
248 tx_pipe->head = &descs[1];
250 rx_pipe->head = &descs[3];
277 *tx_pipe->head = 0;