/linux-6.14.4/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/ |
D | debug_private.h | 21 return (debug_data_ptr->head == debug_data_ptr->tail); in is_debug_buffer_empty() 47 if (remote_tail > debug_data_ptr->tail) { in debug_synch_queue() 48 size_t delta = remote_tail - debug_data_ptr->tail; in debug_synch_queue() 51 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 52 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 53 } else if (remote_tail < debug_data_ptr->tail) { in debug_synch_queue() 54 size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail; in debug_synch_queue() 57 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 58 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 63 debug_data_ptr->tail = remote_tail; in debug_synch_queue() [all …]
|
/linux-6.14.4/drivers/rpmsg/ |
D | qcom_glink_rpm.c | 51 void __iomem *tail; member 73 unsigned int tail; in glink_rpm_rx_avail() local 76 tail = readl(pipe->tail); in glink_rpm_rx_avail() 78 if (head < tail) in glink_rpm_rx_avail() 79 return pipe->native.length - tail + head; in glink_rpm_rx_avail() 81 return head - tail; in glink_rpm_rx_avail() 88 unsigned int tail; in glink_rpm_rx_peek() local 91 tail = readl(pipe->tail); in glink_rpm_rx_peek() 92 tail += offset; in glink_rpm_rx_peek() 93 if (tail >= pipe->native.length) in glink_rpm_rx_peek() [all …]
|
D | qcom_glink_smem.c | 53 __le32 *tail; member 70 u32 tail; in glink_smem_rx_avail() local 86 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_avail() 88 if (head < tail) in glink_smem_rx_avail() 89 return pipe->native.length - tail + head; in glink_smem_rx_avail() 91 return head - tail; in glink_smem_rx_avail() 99 u32 tail; in glink_smem_rx_peek() local 101 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_peek() 102 tail += offset; in glink_smem_rx_peek() 103 if (tail >= pipe->native.length) in glink_smem_rx_peek() [all …]
|
/linux-6.14.4/drivers/gpu/drm/i915/gt/ |
D | intel_ring.h | 25 void intel_ring_reset(struct intel_ring *ring, u32 tail); 90 assert_ring_tail_valid(const struct intel_ring *ring, unsigned int tail) in assert_ring_tail_valid() argument 94 GEM_BUG_ON(!intel_ring_offset_valid(ring, tail)); in assert_ring_tail_valid() 101 * "If the Ring Buffer Head Pointer and the Tail Pointer are on the in assert_ring_tail_valid() 102 * same cacheline, the Head Pointer must not be greater than the Tail in assert_ring_tail_valid() 111 GEM_BUG_ON(cacheline(tail) == cacheline(head) && tail < head); in assert_ring_tail_valid() 116 intel_ring_set_tail(struct intel_ring *ring, unsigned int tail) in intel_ring_set_tail() argument 118 /* Whilst writes to the tail are strictly order, there is no in intel_ring_set_tail() 119 * serialisation between readers and the writers. The tail may be in intel_ring_set_tail() 124 assert_ring_tail_valid(ring, tail); in intel_ring_set_tail() [all …]
|
/linux-6.14.4/drivers/infiniband/sw/rdmavt/ |
D | cq.c | 35 u32 tail; in rvt_cq_enter() local 43 tail = RDMA_READ_UAPI_ATOMIC(u_wc->tail); in rvt_cq_enter() 48 tail = k_wc->tail; in rvt_cq_enter() 62 if (unlikely(next == tail || cq->cq_full)) { in rvt_cq_enter() 185 * Allocate the completion queue entries and head/tail pointers. in rvt_create_cq() 321 RDMA_READ_UAPI_ATOMIC(cq->queue->tail)) in rvt_req_notify_cq() 324 if (cq->kqueue->head != cq->kqueue->tail) in rvt_req_notify_cq() 343 u32 head, tail, n; in rvt_resize_cq() local 382 * Make sure head and tail are sane since they in rvt_resize_cq() 388 tail = RDMA_READ_UAPI_ATOMIC(old_u_wc->tail); in rvt_resize_cq() [all …]
|
/linux-6.14.4/drivers/md/dm-vdo/ |
D | murmurhash3.c | 72 /* tail */ in murmurhash3_128() 75 const u8 *tail = (const u8 *)(data + nblocks * 16); in murmurhash3_128() local 82 k2 ^= ((u64)tail[14]) << 48; in murmurhash3_128() 85 k2 ^= ((u64)tail[13]) << 40; in murmurhash3_128() 88 k2 ^= ((u64)tail[12]) << 32; in murmurhash3_128() 91 k2 ^= ((u64)tail[11]) << 24; in murmurhash3_128() 94 k2 ^= ((u64)tail[10]) << 16; in murmurhash3_128() 97 k2 ^= ((u64)tail[9]) << 8; in murmurhash3_128() 100 k2 ^= ((u64)tail[8]) << 0; in murmurhash3_128() 108 k1 ^= ((u64)tail[7]) << 56; in murmurhash3_128() [all …]
|
/linux-6.14.4/drivers/net/ethernet/intel/fm10k/ |
D | fm10k_mbx.c | 17 fifo->tail = 0; in fm10k_fifo_init() 28 return fifo->tail - fifo->head; in fm10k_fifo_used() 39 return fifo->size + fifo->head - fifo->tail; in fm10k_fifo_unused() 50 return fifo->head == fifo->tail; in fm10k_fifo_empty() 66 * fm10k_fifo_tail_offset - returns indices of tail with given offset 68 * @offset: offset to add to tail 70 * This function returns the indices into the FIFO based on tail + offset 74 return (fifo->tail + offset) & (fifo->size - 1); in fm10k_fifo_tail_offset() 120 fifo->head = fifo->tail; in fm10k_fifo_drop_all() 124 * fm10k_mbx_index_len - Convert a head/tail index into a length value [all …]
|
/linux-6.14.4/include/linux/ |
D | circ_buf.h | 12 int tail; member 16 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) argument 19 as a completely full buffer has head == tail, which is the same as 21 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) argument 24 accessing head and tail more than once, so they can change 26 #define CIRC_CNT_TO_END(head,tail,size) \ argument 27 ({int end = (size) - (tail); \ 32 #define CIRC_SPACE_TO_END(head,tail,size) \ argument 34 int n = (end + (tail)) & ((size)-1); \
|
D | pipe_fs_i.h | 57 pipe_index_t tail; member 67 * @tail: The point of buffer consumption 68 * @head_tail: unsigned long union of @head and @tail 95 pipe_index_t tail; member 182 * @tail: The pipe ring tail pointer 184 static inline unsigned int pipe_occupancy(unsigned int head, unsigned int tail) in pipe_occupancy() argument 186 return (pipe_index_t)(head - tail); in pipe_occupancy() 192 * @tail: The pipe ring tail pointer 194 static inline bool pipe_empty(unsigned int head, unsigned int tail) in pipe_empty() argument 196 return !pipe_occupancy(head, tail); in pipe_empty() [all …]
|
D | objpool.h | 36 * @tail: tail sequence of the local ring array (to append at) 48 * head and tail, typed as uint32_t: [0, 2^32), so only lower bits (mask) 49 * of head and tail are used as the actual position in the ring array. In 55 uint32_t tail; member 195 uint32_t head, tail; in __objpool_try_add_slot() local 197 /* loading tail and head as a local snapshot, tail first */ in __objpool_try_add_slot() 198 tail = READ_ONCE(slot->tail); in __objpool_try_add_slot() 203 WARN_ON_ONCE(tail - head > pool->nr_objs); in __objpool_try_add_slot() 204 } while (!try_cmpxchg_acquire(&slot->tail, &tail, tail + 1)); in __objpool_try_add_slot() 206 /* now the tail position is reserved for the given obj */ in __objpool_try_add_slot() [all …]
|
/linux-6.14.4/drivers/gpu/drm/xe/ |
D | xe_trace_guc.h | 42 TP_printk("h2g flow control: dev=%s, head=%u, tail=%u, size=%u, space=%u, len=%u", 56 TP_printk("g2h flow control: dev=%s, head=%u, tail=%u, size=%u, space=%u, len=%u", 62 TP_PROTO(struct xe_device *xe, u8 gt_id, u32 action, u32 len, u32 _head, u32 tail), 63 TP_ARGS(xe, gt_id, action, len, _head, tail), 70 __field(u32, tail) 79 __entry->tail = tail; 83 TP_printk("H2G CTB: dev=%s, gt%d: action=0x%x, len=%d, tail=%d, head=%d\n", 85 __entry->tail, __entry->_head) 89 TP_PROTO(struct xe_device *xe, u8 gt_id, u32 action, u32 len, u32 _head, u32 tail), 90 TP_ARGS(xe, gt_id, action, len, _head, tail) [all …]
|
/linux-6.14.4/kernel/locking/ |
D | qspinlock.c | 45 * In particular; where the traditional MCS lock consists of a tail pointer 47 * unlock the next pending (next->locked), we compress both these: {tail, 53 * we can encode the tail by combining the 2-bit nesting level with the cpu 54 * number. With one byte for the lock value and 3 bytes for the tail, only a 112 * We must be able to distinguish between no-tail and the tail at 0:0, 118 u32 tail; in encode_tail() local 120 tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET; in encode_tail() 121 tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */ in encode_tail() 123 return tail; in encode_tail() 126 static inline __pure struct mcs_spinlock *decode_tail(u32 tail) in decode_tail() argument [all …]
|
/linux-6.14.4/tools/lib/ |
D | list_sort.c | 16 struct list_head *head, **tail = &head; in merge() local 21 *tail = a; in merge() 22 tail = &a->next; in merge() 25 *tail = b; in merge() 29 *tail = b; in merge() 30 tail = &b->next; in merge() 33 *tail = a; in merge() 52 struct list_head *tail = head; in merge_final() local 57 tail->next = a; in merge_final() 58 a->prev = tail; in merge_final() [all …]
|
/linux-6.14.4/drivers/net/wireguard/ |
D | queueing.c | 56 queue->head = queue->tail = STUB(queue); in wg_prev_queue_init() 82 struct sk_buff *tail = queue->tail, *next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() local 84 if (tail == STUB(queue)) { in wg_prev_queue_dequeue() 87 queue->tail = next; in wg_prev_queue_dequeue() 88 tail = next; in wg_prev_queue_dequeue() 92 queue->tail = next; in wg_prev_queue_dequeue() 94 return tail; in wg_prev_queue_dequeue() 96 if (tail != READ_ONCE(queue->head)) in wg_prev_queue_dequeue() 99 next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() 101 queue->tail = next; in wg_prev_queue_dequeue() [all …]
|
/linux-6.14.4/lib/ |
D | list_sort.c | 16 struct list_head *head, **tail = &head; in merge() local 21 *tail = a; in merge() 22 tail = &a->next; in merge() 25 *tail = b; in merge() 29 *tail = b; in merge() 30 tail = &b->next; in merge() 33 *tail = a; in merge() 52 struct list_head *tail = head; in merge_final() local 58 tail->next = a; in merge_final() 59 a->prev = tail; in merge_final() [all …]
|
/linux-6.14.4/arch/arm/kernel/ |
D | perf_callchain.c | 31 * next frame tail. 34 user_backtrace(struct frame_tail __user *tail, in user_backtrace() argument 40 if (!access_ok(tail, sizeof(buftail))) in user_backtrace() 44 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); in user_backtrace() 56 if (tail + 1 >= buftail.fp) in user_backtrace() 65 struct frame_tail __user *tail; in perf_callchain_user() local 72 tail = (struct frame_tail __user *)regs->ARM_fp - 1; in perf_callchain_user() 75 tail && !((unsigned long)tail & 0x3)) in perf_callchain_user() 76 tail = user_backtrace(tail, entry); in perf_callchain_user()
|
/linux-6.14.4/Documentation/trace/ |
D | ring-buffer-design.rst | 21 tail 191 It is possible that the page swapped is the commit page and the tail page, 196 reader page commit page tail page 227 tail page 253 +---------+ <--- tail pointer 278 +---------+ <--- tail pointer 291 +---------+ <--- tail pointer 302 +---------+ <--(last full commit and tail pointer) 311 The tail page points to the page with the last write (before 314 The tail page is always equal to or after the commit page. It may [all …]
|
/linux-6.14.4/drivers/media/test-drivers/vidtv/ |
D | vidtv_channel.c | 165 struct vidtv_psi_table_eit_event *tail = NULL; in vidtv_channel_eit_event_cat_into_new() local 182 tail = vidtv_psi_eit_event_init(tail, event_id); in vidtv_channel_eit_event_cat_into_new() 183 if (!tail) { in vidtv_channel_eit_event_cat_into_new() 189 vidtv_psi_desc_assign(&tail->descriptor, desc); in vidtv_channel_eit_event_cat_into_new() 192 head = tail; in vidtv_channel_eit_event_cat_into_new() 211 struct vidtv_psi_table_sdt_service *tail = NULL; in vidtv_channel_sdt_serv_cat_into_new() local 229 tail = vidtv_psi_sdt_service_init(tail, in vidtv_channel_sdt_serv_cat_into_new() 233 if (!tail) in vidtv_channel_sdt_serv_cat_into_new() 239 vidtv_psi_desc_assign(&tail->descriptor, desc); in vidtv_channel_sdt_serv_cat_into_new() 242 head = tail; in vidtv_channel_sdt_serv_cat_into_new() [all …]
|
/linux-6.14.4/net/sunrpc/ |
D | xdr.c | 179 const struct kvec *tail = xdr->tail; in xdr_buf_to_bvec() local 204 if (tail->iov_len) { in xdr_buf_to_bvec() 205 bvec_set_virt(bvec, tail->iov_base, tail->iov_len); in xdr_buf_to_bvec() 231 struct kvec *tail = xdr->tail; in xdr_inline_pages() local 241 tail->iov_base = buf + offset; in xdr_inline_pages() 242 tail->iov_len = buflen - offset; in xdr_inline_pages() 501 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero() 505 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero() 561 struct kvec *tail = buf->tail; in xdr_buf_try_expand() local 562 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand() [all …]
|
/linux-6.14.4/Documentation/core-api/ |
D | circular-buffers.rst | 44 (2) A 'tail' index - the point at which the consumer finds the next item in 47 Typically when the tail pointer is equal to the head pointer, the buffer is 48 empty; and the buffer is full when the head pointer is one less than the tail 51 The head index is incremented when items are added, and the tail index when 52 items are removed. The tail index should never jump the head index, and both 116 moving the tail index. 122 will return a lower bound as the consumer controls the tail index, but the 160 unsigned long tail = READ_ONCE(buffer->tail); 162 if (CIRC_SPACE(head, tail, buffer->size) >= 1) { 201 unsigned long tail = buffer->tail; [all …]
|
/linux-6.14.4/Documentation/networking/device_drivers/ethernet/toshiba/ |
D | spider_net.rst | 43 and "tail" pointers, managed by the OS, and a hardware current 52 The tail pointer tails or trails the hardware pointer. When the 53 hardware is ahead, the tail pointer will be pointing at a "full" 55 and advance the tail pointer. Thus, when there is flowing RX traffic, 56 all of the descrs in front of the tail pointer should be "full", and 58 flowing, then the tail pointer can catch up to the hardware pointer. 59 The OS will then note that the current tail is "empty", and halt 62 The head pointer (somewhat mis-named) follows after the tail pointer. 70 RX traffic is flowing, then the head pointer can catch up to the tail 74 Thus, in an idle system, the GDACTDPA, tail and head pointers will [all …]
|
/linux-6.14.4/Documentation/translations/zh_CN/core-api/ |
D | circular-buffers.rst | 55 (2) 'tail'索引 - 消费者在缓冲区中找到下一个元素的位置。 146 unsigned long tail = READ_ONCE(buffer->tail); 148 if (CIRC_SPACE(head, tail, buffer->size) >= 1) { 181 unsigned long tail = buffer->tail; 183 if (CIRC_CNT(head, tail, buffer->size) >= 1) { 186 struct item *item = buffer[tail]; 191 smp_store_release(buffer->tail, 192 (tail + 1) & (buffer->size - 1));
|
/linux-6.14.4/net/sched/ |
D | sch_choke.c | 67 unsigned int tail; member 77 return (q->tail - q->head) & q->tab_mask; in choke_len() 97 if (q->head == q->tail) in choke_zap_head_holes() 102 /* Move tail pointer backwards to reuse holes */ 106 q->tail = (q->tail - 1) & q->tab_mask; in choke_zap_tail_holes() 107 if (q->head == q->tail) in choke_zap_tail_holes() 109 } while (q->tab[q->tail] == NULL); in choke_zap_tail_holes() 123 if (idx == q->tail) in choke_drop_by_idx() 177 * Will return NULL if queue is empty (q->head == q->tail) 205 if (q->head == q->tail) in choke_match_random() [all …]
|
/linux-6.14.4/drivers/accel/amdxdna/ |
D | amdxdna_mailbox.c | 206 u32 head, tail; in mailbox_send_msg() local 211 tail = mb_chann->x2i_tail; in mailbox_send_msg() 214 tmp_tail = tail + mb_msg->pkg_size; in mailbox_send_msg() 216 if (tail < head && tmp_tail >= head) in mailbox_send_msg() 219 if (tail >= head && (tmp_tail > ringbuf_size - sizeof(u32) && in mailbox_send_msg() 223 if (tail >= head && tmp_tail > ringbuf_size - sizeof(u32)) { in mailbox_send_msg() 224 write_addr = mb_chann->mb->res.ringbuf_base + start_addr + tail; in mailbox_send_msg() 228 tail = 0; in mailbox_send_msg() 231 write_addr = mb_chann->mb->res.ringbuf_base + start_addr + tail; in mailbox_send_msg() 233 mailbox_set_tailptr(mb_chann, tail + mb_msg->pkg_size); in mailbox_send_msg() [all …]
|
/linux-6.14.4/include/drm/ |
D | spsc_queue.h | 43 atomic_long_t tail; member 51 atomic_long_set(&queue->tail, (long)&queue->head); in spsc_queue_init() 67 struct spsc_node **tail; in spsc_queue_push() local 73 tail = (struct spsc_node **)atomic_long_xchg(&queue->tail, (long)&node->next); in spsc_queue_push() 74 WRITE_ONCE(*tail, node); in spsc_queue_push() 85 return tail == &queue->head; in spsc_queue_push() 107 if (atomic_long_cmpxchg(&queue->tail, in spsc_queue_pop() 109 /* Updating tail failed wait for new next to appear */ in spsc_queue_pop()
|