Home
last modified time | relevance | path

Searched refs:tail (Results 1 – 25 of 830) sorted by relevance

12345678910>>...34

/kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/
Ddebug_private.h30 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 …]
/kernel/linux/linux-5.10/lib/
Dlist_sort.c19 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 …]
/kernel/linux/linux-5.10/drivers/rpmsg/
Dqcom_glink_smem.c39 __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 …]
Dqcom_glink_rpm.c50 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 …]
/kernel/linux/linux-5.10/arch/arm64/kernel/
Dperf_callchain.c23 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()
116 struct frame_tail __user *tail; in perf_callchain_user() local
118 tail = (struct frame_tail __user *)regs->regs[29]; in perf_callchain_user()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/sw/rdmavt/
Dcq.c76 u32 tail; in rvt_cq_enter() local
84 tail = RDMA_READ_UAPI_ATOMIC(u_wc->tail); in rvt_cq_enter()
89 tail = k_wc->tail; in rvt_cq_enter()
103 if (unlikely(next == tail || cq->cq_full)) { in rvt_cq_enter()
361 RDMA_READ_UAPI_ATOMIC(cq->queue->tail)) in rvt_req_notify_cq()
364 if (cq->kqueue->head != cq->kqueue->tail) in rvt_req_notify_cq()
383 u32 head, tail, n; in rvt_resize_cq() local
428 tail = RDMA_READ_UAPI_ATOMIC(old_u_wc->tail); in rvt_resize_cq()
432 tail = old_k_wc->tail; in rvt_resize_cq()
437 if (tail > (u32)cq->ibcq.cqe) in rvt_resize_cq()
[all …]
Drc.c108 u32 tail; in rvt_compute_aeth() local
115 tail = RDMA_READ_UAPI_ATOMIC(qp->r_rq.wq->tail); in rvt_compute_aeth()
118 tail = READ_ONCE(qp->r_rq.kwq->tail); in rvt_compute_aeth()
122 if (tail >= qp->r_rq.size) in rvt_compute_aeth()
123 tail = 0; in rvt_compute_aeth()
130 credits = rvt_get_rq_count(&qp->r_rq, head, tail); in rvt_compute_aeth()
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/fm10k/
Dfm10k_mbx.c17 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()
74 return (fifo->tail + offset) & (fifo->size - 1); in fm10k_fifo_tail_offset()
120 fifo->head = fifo->tail; in fm10k_fifo_drop_all()
132 static u16 fm10k_mbx_index_len(struct fm10k_mbx_info *mbx, u16 head, u16 tail) in fm10k_mbx_index_len() argument
134 u16 len = tail - head; in fm10k_mbx_index_len()
137 if (len > tail) in fm10k_mbx_index_len()
153 u16 tail = (mbx->tail + offset + 1) & ((mbx->mbmem_len << 1) - 1); in fm10k_mbx_tail_add() local
[all …]
/kernel/linux/linux-5.10/include/linux/
Dcirc_buf.h12 int tail; member
16 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) argument
21 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) argument
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); \
Dpipe_fs_i.h62 unsigned int tail; member
132 static inline bool pipe_empty(unsigned int head, unsigned int tail) in pipe_empty() argument
134 return head == tail; in pipe_empty()
142 static inline unsigned int pipe_occupancy(unsigned int head, unsigned int tail) in pipe_occupancy() argument
144 return head - tail; in pipe_occupancy()
153 static inline bool pipe_full(unsigned int head, unsigned int tail, in pipe_full() argument
156 return pipe_occupancy(head, tail) >= limit; in pipe_full()
165 static inline unsigned int pipe_space_for_user(unsigned int head, unsigned int tail, in pipe_space_for_user() argument
170 p_occupancy = pipe_occupancy(head, tail); in pipe_space_for_user()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/
Dintel_ring.h27 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()
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
124 assert_ring_tail_valid(ring, tail); in intel_ring_set_tail()
125 ring->tail = tail; in intel_ring_set_tail()
126 return tail; in intel_ring_set_tail()
130 __intel_ring_space(unsigned int head, unsigned int tail, unsigned int size) in __intel_ring_space() argument
138 return (head - tail - CACHELINE_BYTES) & (size - 1); in __intel_ring_space()
/kernel/linux/linux-5.10/drivers/net/wireguard/
Dqueueing.c54 queue->head = queue->tail = STUB(queue); in wg_prev_queue_init()
80 struct sk_buff *tail = queue->tail, *next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue() local
82 if (tail == STUB(queue)) { in wg_prev_queue_dequeue()
85 queue->tail = next; in wg_prev_queue_dequeue()
86 tail = next; in wg_prev_queue_dequeue()
90 queue->tail = next; in wg_prev_queue_dequeue()
92 return tail; in wg_prev_queue_dequeue()
94 if (tail != READ_ONCE(queue->head)) in wg_prev_queue_dequeue()
97 next = smp_load_acquire(&NEXT(tail)); in wg_prev_queue_dequeue()
99 queue->tail = next; in wg_prev_queue_dequeue()
[all …]
/kernel/linux/linux-5.10/arch/arm/oprofile/
Dcommon.c86 static struct frame_tail* user_backtrace(struct frame_tail *tail) in user_backtrace() argument
91 if (!access_ok(tail, sizeof(buftail))) in user_backtrace()
93 if (__copy_from_user_inatomic(buftail, tail, sizeof(buftail))) in user_backtrace()
100 if (tail + 1 >= buftail[0].fp) in user_backtrace()
108 struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1; in arm_backtrace() local
117 while (depth-- && tail && !((unsigned long) tail & 3)) in arm_backtrace()
118 tail = user_backtrace(tail); in arm_backtrace()
/kernel/linux/linux-5.10/arch/arm/kernel/
Dperf_callchain.c34 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()
66 struct frame_tail __user *tail; in perf_callchain_user() local
78 tail = (struct frame_tail __user *)regs->ARM_fp - 1; in perf_callchain_user()
81 tail && !((unsigned long)tail & 0x3)) in perf_callchain_user()
82 tail = user_backtrace(tail, entry); in perf_callchain_user()
/kernel/linux/linux-5.10/kernel/locking/
Dqspinlock.c117 u32 tail; in encode_tail() local
119 tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET; in encode_tail()
120 tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */ in encode_tail()
122 return tail; in encode_tail()
125 static inline __pure struct mcs_spinlock *decode_tail(u32 tail) in decode_tail() argument
127 int cpu = (tail >> _Q_TAIL_CPU_OFFSET) - 1; in decode_tail()
128 int idx = (tail & _Q_TAIL_IDX_MASK) >> _Q_TAIL_IDX_OFFSET; in decode_tail()
176 static __always_inline u32 xchg_tail(struct qspinlock *lock, u32 tail) in xchg_tail() argument
182 return (u32)xchg_relaxed(&lock->tail, in xchg_tail()
183 tail >> _Q_TAIL_OFFSET) << _Q_TAIL_OFFSET; in xchg_tail()
[all …]
/kernel/linux/linux-5.10/include/drm/
Dspsc_queue.h43 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()
/kernel/linux/linux-5.10/drivers/media/test-drivers/vidtv/
Dvidtv_channel.c165 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 …]
/kernel/liteos_a/shell/full/src/cmds/
Ddmesg.c126 UINT32 tail = g_dmesgInfo->logTail; in OsDmesgRead() local
139 if (head < tail) { /* Case A */ in OsDmesgRead()
376 UINT32 tail = g_dmesgInfo->logTail; in OsBufFullWrite() local
384 ret = memcpy_s(buf + tail, bufSize - tail, dst, bufSize - tail); in OsBufFullWrite()
389 ret = memcpy_s(buf, bufSize, dst + bufSize - tail, tail); in OsBufFullWrite()
397 if (logLen > (bufSize - tail)) { /* need cycle back to start */ in OsBufFullWrite()
398 ret = memcpy_s(buf + tail, bufSize - tail, dst, bufSize - tail); in OsBufFullWrite()
403 ret = memcpy_s(buf, bufSize, dst + bufSize - tail, logLen - (bufSize - tail)); in OsBufFullWrite()
409 g_dmesgInfo->logTail = logLen - (bufSize - tail); in OsBufFullWrite()
412 ret = memcpy_s(buf + tail, bufSize - tail, dst, logLen); in OsBufFullWrite()
[all …]
/kernel/linux/linux-5.10/Documentation/trace/
Dring-buffer-design.rst21 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 …]
/kernel/linux/linux-5.10/net/sunrpc/
Dxdr.c184 struct kvec *tail = xdr->tail; in xdr_inline_pages() local
194 tail->iov_base = buf + offset; in xdr_inline_pages()
195 tail->iov_len = buflen - offset; in xdr_inline_pages()
197 tail->iov_len -= sizeof(__be32); in xdr_inline_pages()
272 struct kvec *tail = buf->tail; in _shift_data_left_tail() local
274 if (len > tail->iov_len) in _shift_data_left_tail()
275 len = tail->iov_len; in _shift_data_left_tail()
279 (char *)tail->iov_base, in _shift_data_left_tail()
281 tail->iov_len -= len; in _shift_data_left_tail()
283 if (tail->iov_len > 0) in _shift_data_left_tail()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_ring.h89 const __u32 tail = atomic_read(&r->prod_tail); in pvrdma_idx_ring_has_space() local
92 if (pvrdma_idx_valid(tail, max_elems) && in pvrdma_idx_ring_has_space()
94 *out_tail = tail & (max_elems - 1); in pvrdma_idx_ring_has_space()
95 return tail != (head ^ max_elems); in pvrdma_idx_ring_has_space()
103 const __u32 tail = atomic_read(&r->prod_tail); in pvrdma_idx_ring_has_data() local
106 if (pvrdma_idx_valid(tail, max_elems) && in pvrdma_idx_ring_has_data()
109 return tail != head; in pvrdma_idx_ring_has_data()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/uc/
Dintel_guc_ct.c94 desc->tail = 0; in guc_ct_buffer_desc_reset()
321 u32 tail = desc->tail; in ct_write() local
331 if (unlikely(!IS_ALIGNED(head | tail | size, 4) || in ct_write()
332 (tail | head) >= size)) in ct_write()
337 tail /= 4; in ct_write()
344 if (tail < head) in ct_write()
345 used = (size - head) + tail; in ct_write()
347 used = tail - head; in ct_write()
367 cmds[tail] = header; in ct_write()
368 tail = (tail + 1) % size; in ct_write()
[all …]
/kernel/linux/linux-5.10/net/sched/
Dsch_choke.c68 unsigned int tail; member
78 return (q->tail - q->head) & q->tab_mask; in choke_len()
98 if (q->head == q->tail) in choke_zap_head_holes()
107 q->tail = (q->tail - 1) & q->tab_mask; in choke_zap_tail_holes()
108 if (q->head == q->tail) in choke_zap_tail_holes()
110 } while (q->tab[q->tail] == NULL); in choke_zap_tail_holes()
124 if (idx == q->tail) in choke_drop_by_idx()
206 if (q->head == q->tail) in choke_match_random()
269 q->tab[q->tail] = skb; in choke_enqueue()
270 q->tail = (q->tail + 1) & q->tab_mask; in choke_enqueue()
[all …]
/kernel/linux/linux-5.10/kernel/
Dsoftirq.c499 struct tasklet_struct **tail; member
515 *head->tail = t; in __tasklet_schedule_common()
516 head->tail = &(t->next); in __tasklet_schedule_common()
544 tl_head->tail = &tl_head->head; in tasklet_action_common()
569 *tl_head->tail = t; in tasklet_action_common()
570 tl_head->tail = &t->next; in tasklet_action_common()
630 per_cpu(tasklet_vec, cpu).tail = in softirq_init()
632 per_cpu(tasklet_hi_vec, cpu).tail = in softirq_init()
687 per_cpu(tasklet_vec, cpu).tail = i; in tasklet_kill_immediate()
700 if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) { in takeover_tasklets()
[all …]
/kernel/linux/linux-5.10/fs/
Dsplice.c186 unsigned int tail = pipe->tail; in splice_to_pipe() local
200 while (!pipe_full(head, tail, pipe->max_usage)) { in splice_to_pipe()
233 unsigned int tail = pipe->tail; in add_to_pipe() local
240 } else if (pipe_full(head, tail, pipe->max_usage)) { in add_to_pipe()
361 pipe_occupancy(pipe->head, pipe->tail) > 1) in pipe_to_sendpage()
400 unsigned int tail = pipe->tail; in splice_from_pipe_feed() local
404 while (!pipe_empty(head, tail)) { in splice_from_pipe_feed()
405 struct pipe_buffer *buf = &pipe->bufs[tail & mask]; in splice_from_pipe_feed()
432 tail++; in splice_from_pipe_feed()
433 pipe->tail = tail; in splice_from_pipe_feed()
[all …]

12345678910>>...34