/Linux-v6.1/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/ |
D | debug_private.h | 30 return (debug_data_ptr->head == debug_data_ptr->tail); in is_debug_buffer_empty() 56 if (remote_tail > debug_data_ptr->tail) { in debug_synch_queue() 57 size_t delta = remote_tail - debug_data_ptr->tail; in debug_synch_queue() 60 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 61 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 62 } else if (remote_tail < debug_data_ptr->tail) { in debug_synch_queue() 63 size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail; in debug_synch_queue() 66 debug_data_ptr->tail * sizeof(uint32_t), in debug_synch_queue() 67 (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t)); in debug_synch_queue() 72 debug_data_ptr->tail = remote_tail; in debug_synch_queue() [all …]
|
/Linux-v6.1/drivers/rpmsg/ |
D | qcom_glink_smem.c | 39 __le32 *tail; member 55 u32 tail; in glink_smem_rx_avail() local 71 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_avail() 73 if (head < tail) in glink_smem_rx_avail() 74 return pipe->native.length - tail + head; in glink_smem_rx_avail() 76 return head - tail; in glink_smem_rx_avail() 84 u32 tail; in glink_smem_rx_peak() local 86 tail = le32_to_cpu(*pipe->tail); in glink_smem_rx_peak() 87 tail += offset; in glink_smem_rx_peak() 88 if (tail >= pipe->native.length) in glink_smem_rx_peak() [all …]
|
D | qcom_glink_rpm.c | 50 void __iomem *tail; member 60 unsigned int tail; in glink_rpm_rx_avail() local 63 tail = readl(pipe->tail); in glink_rpm_rx_avail() 65 if (head < tail) in glink_rpm_rx_avail() 66 return pipe->native.length - tail + head; in glink_rpm_rx_avail() 68 return head - tail; in glink_rpm_rx_avail() 75 unsigned int tail; in glink_rpm_rx_peak() local 78 tail = readl(pipe->tail); in glink_rpm_rx_peak() 79 tail += offset; in glink_rpm_rx_peak() 80 if (tail >= pipe->native.length) in glink_rpm_rx_peak() [all …]
|
/Linux-v6.1/arch/arm64/kernel/ |
D | perf_callchain.c | 20 * next frame tail. 23 user_backtrace(struct frame_tail __user *tail, in user_backtrace() argument 31 if (!access_ok(tail, sizeof(buftail))) in user_backtrace() 35 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); in user_backtrace() 49 if (tail >= buftail.fp) in user_backtrace() 71 compat_user_backtrace(struct compat_frame_tail __user *tail, in compat_user_backtrace() argument 78 if (!access_ok(tail, sizeof(buftail))) in compat_user_backtrace() 82 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); in compat_user_backtrace() 94 if (tail + 1 >= (struct compat_frame_tail __user *) in compat_user_backtrace() 114 struct frame_tail __user *tail; in perf_callchain_user() local [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/gt/ |
D | intel_ring.h | 26 void intel_ring_reset(struct intel_ring *ring, u32 tail); 91 assert_ring_tail_valid(const struct intel_ring *ring, unsigned int tail) in assert_ring_tail_valid() argument 95 GEM_BUG_ON(!intel_ring_offset_valid(ring, tail)); in assert_ring_tail_valid() 102 * "If the Ring Buffer Head Pointer and the Tail Pointer are on the in assert_ring_tail_valid() 103 * same cacheline, the Head Pointer must not be greater than the Tail in assert_ring_tail_valid() 112 GEM_BUG_ON(cacheline(tail) == cacheline(head) && tail < head); in assert_ring_tail_valid() 117 intel_ring_set_tail(struct intel_ring *ring, unsigned int tail) in intel_ring_set_tail() argument 119 /* Whilst writes to the tail are strictly order, there is no in intel_ring_set_tail() 120 * serialisation between readers and the writers. The tail may be in intel_ring_set_tail() 125 assert_ring_tail_valid(ring, tail); in intel_ring_set_tail() [all …]
|
/Linux-v6.1/drivers/infiniband/sw/rdmavt/ |
D | cq.c | 34 u32 tail; in rvt_cq_enter() local 42 tail = RDMA_READ_UAPI_ATOMIC(u_wc->tail); in rvt_cq_enter() 47 tail = k_wc->tail; in rvt_cq_enter() 61 if (unlikely(next == tail || cq->cq_full)) { in rvt_cq_enter() 183 * Allocate the completion queue entries and head/tail pointers. in rvt_create_cq() 319 RDMA_READ_UAPI_ATOMIC(cq->queue->tail)) in rvt_req_notify_cq() 322 if (cq->kqueue->head != cq->kqueue->tail) in rvt_req_notify_cq() 341 u32 head, tail, n; in rvt_resize_cq() local 380 * Make sure head and tail are sane since they in rvt_resize_cq() 386 tail = RDMA_READ_UAPI_ATOMIC(old_u_wc->tail); in rvt_resize_cq() [all …]
|
D | srq.c | 137 u32 sz, size, n, head, tail; in rvt_modify_srq() local 169 * validate head and tail pointer values and compute in rvt_modify_srq() 175 tail = RDMA_READ_UAPI_ATOMIC(owq->tail); in rvt_modify_srq() 179 tail = okwq->tail; in rvt_modify_srq() 181 if (head >= srq->rq.size || tail >= srq->rq.size) { in rvt_modify_srq() 186 if (n < tail) in rvt_modify_srq() 187 n += srq->rq.size - tail; in rvt_modify_srq() 189 n -= tail; in rvt_modify_srq() 196 while (tail != head) { in rvt_modify_srq() 200 wqe = rvt_get_rwqe_ptr(&srq->rq, tail); in rvt_modify_srq() [all …]
|
/Linux-v6.1/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-v6.1/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); \
|
/Linux-v6.1/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-v6.1/drivers/net/wireguard/ |
D | queueing.c | 55 queue->head = queue->tail = STUB(queue); in wg_prev_queue_init() 81 struct sk_buff *tail = queue->tail, *next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() local 83 if (tail == STUB(queue)) { in wg_prev_queue_dequeue() 86 queue->tail = next; in wg_prev_queue_dequeue() 87 tail = next; in wg_prev_queue_dequeue() 91 queue->tail = next; in wg_prev_queue_dequeue() 93 return tail; in wg_prev_queue_dequeue() 95 if (tail != READ_ONCE(queue->head)) in wg_prev_queue_dequeue() 98 next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() 100 queue->tail = next; in wg_prev_queue_dequeue() [all …]
|
/Linux-v6.1/tools/lib/ |
D | list_sort.c | 18 struct list_head *head, **tail = &head; in merge() local 23 *tail = a; in merge() 24 tail = &a->next; in merge() 27 *tail = b; in merge() 31 *tail = b; in merge() 32 tail = &b->next; in merge() 35 *tail = a; in merge() 54 struct list_head *tail = head; in merge_final() local 60 tail->next = a; in merge_final() 61 a->prev = tail; in merge_final() [all …]
|
/Linux-v6.1/lib/ |
D | list_sort.c | 19 struct list_head *head, **tail = &head; in merge() local 24 *tail = a; in merge() 25 tail = &a->next; in merge() 28 *tail = b; in merge() 32 *tail = b; in merge() 33 tail = &b->next; in merge() 36 *tail = a; in merge() 55 struct list_head *tail = head; in merge_final() local 61 tail->next = a; in merge_final() 62 a->prev = tail; in merge_final() [all …]
|
/Linux-v6.1/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-v6.1/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-v6.1/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-v6.1/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-v6.1/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-v6.1/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-v6.1/net/sunrpc/ |
D | xdr.c | 182 struct kvec *tail = xdr->tail; in xdr_inline_pages() local 192 tail->iov_base = buf + offset; in xdr_inline_pages() 193 tail->iov_len = buflen - offset; in xdr_inline_pages() 452 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero() 456 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero() 512 struct kvec *tail = buf->tail; in xdr_buf_try_expand() local 513 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand() 528 /* Expand the tail buffer */ in xdr_buf_try_expand() 530 tail->iov_len += free_space; in xdr_buf_try_expand() 539 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_right() local [all …]
|
/Linux-v6.1/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-v6.1/fs/reiserfs/ |
D | tail_conversion.c | 13 * access to tail : when one is going to read tail it must make sure, that is 19 * tail. -ENOSPC if no disk space for conversion 196 * reads tail through page cache, insert direct item. When direct item 198 * what we expect from it (number of cut bytes). But when tail remains 214 char *tail; in indirect2direct() local 216 loff_t pos, pos1; /* position of first byte of the tail */ in indirect2direct() 240 * we are protected by i_mutex. The tail can not disapper, not in indirect2direct() 242 * we are in truncate or packing tail in file_release in indirect2direct() 245 tail = (char *)kmap(page); /* this can schedule */ in indirect2direct() 260 reiserfs_panic(sb, "vs-5530", "tail position " in indirect2direct() [all …]
|
/Linux-v6.1/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()
|
/Linux-v6.1/arch/x86/kernel/ |
D | static_call.c | 10 JMP = 2, /* tramp / site tail-call */ 11 RET = 3, /* tramp / site cond-tail-call */ 70 static void __static_call_validate(void *insn, bool tail, bool tramp) in __static_call_validate() argument 79 if (tail) { in __static_call_validate() 97 static inline enum insn_type __sc_insn(bool null, bool tail) in __sc_insn() argument 102 * tail null insn in __sc_insn() 109 return 2*tail + null; in __sc_insn() 112 void arch_static_call_transform(void *site, void *tramp, void *func, bool tail) in arch_static_call_transform() argument 122 __static_call_validate(site, tail, false); in arch_static_call_transform() 123 __static_call_transform(site, __sc_insn(!func, tail), func, false); in arch_static_call_transform()
|
/Linux-v6.1/drivers/gpu/drm/i915/gt/uc/ |
D | intel_guc_ct.c | 126 ctb->tail = 0; in guc_ct_buffer_reset() 128 space = CIRC_SPACE(ctb->tail, ctb->head, ctb->size) - ctb->resv_space; in guc_ct_buffer_reset() 375 u32 tail = ctb->tail; in ct_write() local 386 GEM_BUG_ON(tail > size); in ct_write() 389 if (unlikely(tail != READ_ONCE(desc->tail))) { in ct_write() 390 CT_ERROR(ct, "Tail was modified %u != %u\n", in ct_write() 391 desc->tail, tail); in ct_write() 418 CT_DEBUG(ct, "writing (tail %u) %*ph %*ph %*ph\n", in ct_write() 419 tail, 4, &header, 4, &hxg, 4 * (len - 1), &action[1]); in ct_write() 421 cmds[tail] = header; in ct_write() [all …]
|