/linux-4.4.14/include/linux/ |
H A D | circ_buf.h | 11 int tail; member in struct:circ_buf 15 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) 18 as a completely full buffer has head == tail, which is the same as 20 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) 23 accessing head and tail more than once, so they can change 25 #define CIRC_CNT_TO_END(head,tail,size) \ 26 ({int end = (size) - (tail); \ 31 #define CIRC_SPACE_TO_END(head,tail,size) \ 33 int n = (end + (tail)) & ((size)-1); \
|
H A D | osq_lock.h | 16 * Stores an encoded value of the CPU # of the tail node in the queue. 19 atomic_t tail; member in struct:optimistic_spin_queue 29 atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); osq_lock_init() 37 return atomic_read(&lock->tail) != OSQ_UNLOCKED_VAL; osq_is_locked()
|
H A D | bio.h | 594 * fast access to the tail. 598 struct bio *tail; member in struct:bio_list 608 bl->head = bl->tail = NULL; bio_list_init() 631 if (bl->tail) bio_list_add() 632 bl->tail->bi_next = bio; bio_list_add() 636 bl->tail = bio; bio_list_add() 645 if (!bl->tail) bio_list_add_head() 646 bl->tail = bio; bio_list_add_head() 654 if (bl->tail) bio_list_merge() 655 bl->tail->bi_next = bl2->head; bio_list_merge() 659 bl->tail = bl2->tail; bio_list_merge() 669 bl2->tail->bi_next = bl->head; bio_list_merge_head() 671 bl->tail = bl2->tail; bio_list_merge_head() 688 bl->tail = NULL; bio_list_pop() 700 bl->head = bl->tail = NULL; bio_list_get()
|
H A D | tty_flip.h | 19 struct tty_buffer *tb = port->buf.tail; tty_insert_flip_char()
|
H A D | string.h | 161 const char *tail = strrchr(path, '/'); kbasename() local 162 return tail ? tail + 1 : path; kbasename()
|
H A D | hid-debug.h | 44 int tail; member in struct:hid_debug_list
|
H A D | hidraw.h | 38 int tail; member in struct:hidraw_list
|
H A D | vmw_vmci_defs.h | 426 * a line in a store, for example, you walk up to the tail. 437 * For a queue of buffer 'size' bytes, the tail and head pointers will be in 737 * Helper to add a given offset to a head or tail pointer. Wraps the 776 * vmci_qp_add_pointer() is used to manipulate the tail itself. 799 * Helper routine for getting the head and the tail pointer for a queue. 832 u64 tail; vmci_q_header_free_space() local 836 tail = vmci_q_header_producer_tail(produce_q_header); vmci_q_header_free_space() 839 if (tail >= produce_q_size || head >= produce_q_size) vmci_q_header_free_space() 843 * Deduct 1 to avoid tail becoming equal to head which causes vmci_q_header_free_space() 844 * ambiguity. If head and tail are equal it means that the vmci_q_header_free_space() 847 if (tail >= head) vmci_q_header_free_space() 848 free_space = produce_q_size - (tail - head) - 1; vmci_q_header_free_space() 850 free_space = head - tail - 1; vmci_q_header_free_space()
|
/linux-4.4.14/arch/sparc/include/asm/ |
H A D | intr_queue.h | 7 #define INTRQ_CPU_MONDO_TAIL 0x3c8 /* CPU mondo tail */ 9 #define INTRQ_DEVICE_MONDO_TAIL 0x3d8 /* Device mondo tail */ 11 #define INTRQ_RESUM_MONDO_TAIL 0x3e8 /* Resumable error mondo tail */
|
/linux-4.4.14/arch/arm64/kernel/ |
H A D | perf_callchain.c | 30 * next frame tail. 33 user_backtrace(struct frame_tail __user *tail, user_backtrace() argument 40 if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) user_backtrace() 44 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); user_backtrace() 56 if (tail >= buftail.fp) user_backtrace() 78 compat_user_backtrace(struct compat_frame_tail __user *tail, compat_user_backtrace() argument 85 if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) compat_user_backtrace() 89 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); compat_user_backtrace() 101 if (tail + 1 >= (struct compat_frame_tail __user *) compat_user_backtrace() 121 struct frame_tail __user *tail; perf_callchain_user() local 123 tail = (struct frame_tail __user *)regs->regs[29]; perf_callchain_user() 126 tail && !((unsigned long)tail & 0xf)) perf_callchain_user() 127 tail = user_backtrace(tail, entry); perf_callchain_user() 131 struct compat_frame_tail __user *tail; perf_callchain_user() local 133 tail = (struct compat_frame_tail __user *)regs->compat_fp - 1; perf_callchain_user() 136 tail && !((unsigned long)tail & 0x3)) perf_callchain_user() 137 tail = compat_user_backtrace(tail, entry); perf_callchain_user()
|
/linux-4.4.14/arch/powerpc/platforms/pseries/ |
H A D | of_helpers.c | 20 const char *tail; pseries_of_derive_parent() local 23 tail = kbasename(path) - 1; pseries_of_derive_parent() 29 if (tail > path) { pseries_of_derive_parent() 30 parent_path = kstrndup(path, tail - path, GFP_KERNEL); pseries_of_derive_parent()
|
/linux-4.4.14/arch/arm/kernel/ |
H A D | perf_callchain.c | 30 * next frame tail. 33 user_backtrace(struct frame_tail __user *tail, user_backtrace() argument 39 if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) user_backtrace() 43 err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); user_backtrace() 55 if (tail + 1 >= buftail.fp) user_backtrace() 64 struct frame_tail __user *tail; perf_callchain_user() local 76 tail = (struct frame_tail __user *)regs->ARM_fp - 1; perf_callchain_user() 79 tail && !((unsigned long)tail & 0x3)) perf_callchain_user() 80 tail = user_backtrace(tail, entry); perf_callchain_user()
|
/linux-4.4.14/lib/ |
H A D | list_sort.c | 24 struct list_head head, *tail = &head; merge() local 29 tail->next = a; merge() 32 tail->next = b; merge() 35 tail = tail->next; merge() 37 tail->next = a?:b; merge() 54 struct list_head *tail = head; merge_and_restore_back_links() local 60 tail->next = a; merge_and_restore_back_links() 61 a->prev = tail; merge_and_restore_back_links() 64 tail->next = b; merge_and_restore_back_links() 65 b->prev = tail; merge_and_restore_back_links() 68 tail = tail->next; merge_and_restore_back_links() 70 tail->next = a ? : b; merge_and_restore_back_links() 80 (*cmp)(priv, tail->next, tail->next); merge_and_restore_back_links() 82 tail->next->prev = tail; merge_and_restore_back_links() 83 tail = tail->next; merge_and_restore_back_links() 84 } while (tail->next); merge_and_restore_back_links() 86 tail->next = head; merge_and_restore_back_links() 87 head->prev = tail; merge_and_restore_back_links()
|
/linux-4.4.14/kernel/locking/ |
H A 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 88 * We must be able to distinguish between no-tail and the tail at 0:0, 94 u32 tail; encode_tail() local 99 tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET; encode_tail() 100 tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */ encode_tail() 102 return tail; encode_tail() 105 static inline struct mcs_spinlock *decode_tail(u32 tail) decode_tail() argument 107 int cpu = (tail >> _Q_TAIL_CPU_OFFSET) - 1; decode_tail() 108 int idx = (tail & _Q_TAIL_IDX_MASK) >> _Q_TAIL_IDX_OFFSET; decode_tail() 133 u16 tail; member in struct:__qspinlock::__anon14805::__anon14807 137 u16 tail; member in struct:__qspinlock::__anon14805::__anon14808 166 * xchg_tail - Put in the new queue tail code word & retrieve previous one 168 * @tail : The new queue tail code word 169 * Return: The previous queue tail code word 171 * xchg(lock, tail) 175 static __always_inline u32 xchg_tail(struct qspinlock *lock, u32 tail) xchg_tail() argument 179 return (u32)xchg(&l->tail, tail >> _Q_TAIL_OFFSET) << _Q_TAIL_OFFSET; xchg_tail() 196 * xchg_tail - Put in the new queue tail code word & retrieve previous one 198 * @tail : The new queue tail code word 199 * Return: The previous queue tail code word 201 * xchg(lock, tail) 205 static __always_inline u32 xchg_tail(struct qspinlock *lock, u32 tail) xchg_tail() argument 210 new = (val & _Q_LOCKED_PENDING_MASK) | tail; xchg_tail() 265 * (queue tail, pending bit, lock value) 284 u32 new, old, tail; queued_spin_lock_slowpath() local 363 tail = encode_tail(smp_processor_id(), idx); queued_spin_lock_slowpath() 384 old = xchg_tail(lock, tail); queued_spin_lock_slowpath() 420 * If the queue head is the only one in the queue (lock value == tail), queued_spin_lock_slowpath() 421 * clear the tail code and grab the lock. Otherwise, we only need queued_spin_lock_slowpath() 425 if (val != tail) { queued_spin_lock_slowpath()
|
H A D | osq_lock.c | 52 if (atomic_read(&lock->tail) == curr && osq_wait_next() 53 atomic_cmpxchg_acquire(&lock->tail, curr, old) == curr) { osq_wait_next() 99 * the lock tail. osq_lock() 101 old = atomic_xchg(&lock->tail, curr); osq_lock() 193 if (likely(atomic_cmpxchg_release(&lock->tail, curr, osq_unlock()
|
/linux-4.4.14/arch/arm/oprofile/ |
H A D | common.c | 86 static struct frame_tail* user_backtrace(struct frame_tail *tail) user_backtrace() argument 91 if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) user_backtrace() 93 if (__copy_from_user_inatomic(buftail, tail, sizeof(buftail))) user_backtrace() 100 if (tail + 1 >= buftail[0].fp) user_backtrace() 108 struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1; arm_backtrace() local 117 while (depth-- && tail && !((unsigned long) tail & 3)) arm_backtrace() 118 tail = user_backtrace(tail); arm_backtrace()
|
/linux-4.4.14/sound/oss/ |
H A D | msnd.c | 104 f->tail = 0; msnd_fifo_alloc() 116 f->len = f->tail = f->head = 0; msnd_fifo_make_empty() 127 if (f->head <= f->tail) { msnd_fifo_write_io() 129 if (nwritten > f->n - f->tail) msnd_fifo_write_io() 130 nwritten = f->n - f->tail; msnd_fifo_write_io() 133 nwritten = f->head - f->tail; msnd_fifo_write_io() 138 memcpy_fromio(f->data + f->tail, buf, nwritten); msnd_fifo_write_io() 143 f->tail += nwritten; msnd_fifo_write_io() 144 f->tail %= f->n; msnd_fifo_write_io() 158 if (f->head <= f->tail) { msnd_fifo_write() 160 if (nwritten > f->n - f->tail) msnd_fifo_write() 161 nwritten = f->n - f->tail; msnd_fifo_write() 164 nwritten = f->head - f->tail; msnd_fifo_write() 169 memcpy(f->data + f->tail, buf, nwritten); msnd_fifo_write() 174 f->tail += nwritten; msnd_fifo_write() 175 f->tail %= f->n; msnd_fifo_write() 189 if (f->tail <= f->head) { msnd_fifo_read_io() 195 nread = f->tail - f->head; msnd_fifo_read_io() 220 if (f->tail <= f->head) { msnd_fifo_read() 226 nread = f->tail - f->head; msnd_fifo_read()
|
H A D | midibuf.c | 35 int len, head, tail; member in struct:midi_buf 66 q->queue[q->tail] = (data); \ 67 q->len++; q->tail = (q->tail+1) % MAX_QUEUE_SIZE; \ 188 midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; MIDIbuf_open() 200 midi_out_buf[dev]->len = midi_out_buf[dev]->head = midi_out_buf[dev]->tail = 0; MIDIbuf_open() 350 should q->len,tail&head be atomic_t? */ MIDIbuf_read()
|
/linux-4.4.14/drivers/staging/rdma/ipath/ |
H A D | ipath_cq.c | 68 if (unlikely(next == wc->tail)) { ipath_cq_enter() 135 u32 tail; ipath_poll_cq() local 146 tail = wc->tail; ipath_poll_cq() 147 if (tail > (u32) cq->ibcq.cqe) ipath_poll_cq() 148 tail = (u32) cq->ibcq.cqe; ipath_poll_cq() 150 if (tail == wc->head) ipath_poll_cq() 153 *entry = wc->kqueue[tail]; ipath_poll_cq() 154 if (tail >= cq->ibcq.cqe) ipath_poll_cq() 155 tail = 0; ipath_poll_cq() 157 tail++; ipath_poll_cq() 159 wc->tail = tail; ipath_poll_cq() 228 * Allocate the completion queue entries and head/tail pointers. ipath_create_cq() 294 wc->tail = 0; ipath_create_cq() 362 cq->queue->head != cq->queue->tail) ipath_req_notify_cq() 381 u32 head, tail, n; ipath_resize_cq() local 415 * Make sure head and tail are sane since they ipath_resize_cq() 422 tail = old_wc->tail; ipath_resize_cq() 423 if (tail > (u32) cq->ibcq.cqe) ipath_resize_cq() 424 tail = (u32) cq->ibcq.cqe; ipath_resize_cq() 425 if (head < tail) ipath_resize_cq() 426 n = cq->ibcq.cqe + 1 + head - tail; ipath_resize_cq() 428 n = head - tail; ipath_resize_cq() 433 for (n = 0; tail != head; n++) { ipath_resize_cq() 435 wc->uqueue[n] = old_wc->uqueue[tail]; ipath_resize_cq() 437 wc->kqueue[n] = old_wc->kqueue[tail]; ipath_resize_cq() 438 if (tail == (u32) cq->ibcq.cqe) ipath_resize_cq() 439 tail = 0; ipath_resize_cq() 441 tail++; ipath_resize_cq() 445 wc->tail = 0; ipath_resize_cq()
|
H A D | ipath_srq.c | 72 if (next == wq->tail) { ipath_post_srq_receive() 176 srq->rq.wq->tail = 0; ipath_create_srq() 226 u32 sz, size, n, head, tail; ipath_modify_srq() local 271 tail = owq->tail; ipath_modify_srq() 272 if (tail >= srq->rq.size) ipath_modify_srq() 273 tail = 0; ipath_modify_srq() 275 if (n < tail) ipath_modify_srq() 276 n += srq->rq.size - tail; ipath_modify_srq() 278 n -= tail; ipath_modify_srq() 285 while (tail != head) { ipath_modify_srq() 289 wqe = get_rwqe_ptr(&srq->rq, tail); ipath_modify_srq() 296 if (++tail >= srq->rq.size) ipath_modify_srq() 297 tail = 0; ipath_modify_srq() 302 wq->tail = 0; ipath_modify_srq()
|
H A D | ipath_sdma.c | 293 /* reset our notion of head and tail */ sdma_abort_task() 672 u16 tail; ipath_sdma_verbs_send() local 714 tail = dd->ipath_sdma_descq_tail; ipath_sdma_verbs_send() 715 descqp = &dd->ipath_sdma_descq[tail].qw[0]; ipath_sdma_verbs_send() 720 tx->txreq.start_idx = tail; ipath_sdma_verbs_send() 722 /* increment the tail */ ipath_sdma_verbs_send() 723 if (++tail == dd->ipath_sdma_descq_cnt) { ipath_sdma_verbs_send() 724 tail = 0; ipath_sdma_verbs_send() 753 /* increment the tail */ ipath_sdma_verbs_send() 754 if (++tail == dd->ipath_sdma_descq_cnt) { ipath_sdma_verbs_send() 755 tail = 0; ipath_sdma_verbs_send() 781 if (!tail) ipath_sdma_verbs_send() 791 /* Commit writes to memory and advance the tail on the chip */ ipath_sdma_verbs_send() 793 ipath_write_kreg(dd, dd->ipath_kregs->kr_senddmatail, tail); ipath_sdma_verbs_send() 795 tx->txreq.next_descq_idx = tail; ipath_sdma_verbs_send() 797 dd->ipath_sdma_descq_tail = tail; ipath_sdma_verbs_send() 805 while (tail != dd->ipath_sdma_descq_tail) { ipath_sdma_verbs_send() 806 if (!tail) ipath_sdma_verbs_send() 807 tail = dd->ipath_sdma_descq_cnt - 1; ipath_sdma_verbs_send() 809 tail--; ipath_sdma_verbs_send() 810 unmap_desc(dd, tail); ipath_sdma_verbs_send()
|
H A D | ipath_ud.c | 63 u32 tail; ipath_ud_loopback() local 118 * Note that it is safe to drop the lock after changing rq->tail ipath_ud_loopback() 123 tail = wq->tail; ipath_ud_loopback() 124 /* Validate tail before using it since it is user writable. */ ipath_ud_loopback() 125 if (tail >= rq->size) ipath_ud_loopback() 126 tail = 0; ipath_ud_loopback() 127 if (unlikely(tail == wq->head)) { ipath_ud_loopback() 132 wqe = get_rwqe_ptr(rq, tail); ipath_ud_loopback() 145 if (++tail >= rq->size) ipath_ud_loopback() 146 tail = 0; ipath_ud_loopback() 147 wq->tail = tail; ipath_ud_loopback() 159 if (n < tail) ipath_ud_loopback() 160 n += rq->size - tail; ipath_ud_loopback() 162 n -= tail; ipath_ud_loopback()
|
H A D | ipath_ruc.c | 173 u32 tail; ipath_get_rwqe() local 193 tail = wq->tail; ipath_get_rwqe() 194 /* Validate tail before using it since it is user writable. */ ipath_get_rwqe() 195 if (tail >= rq->size) ipath_get_rwqe() 196 tail = 0; ipath_get_rwqe() 198 if (unlikely(tail == wq->head)) { ipath_get_rwqe() 204 wqe = get_rwqe_ptr(rq, tail); ipath_get_rwqe() 205 if (++tail >= rq->size) ipath_get_rwqe() 206 tail = 0; ipath_get_rwqe() 212 wq->tail = tail; ipath_get_rwqe() 226 if (n < tail) ipath_get_rwqe() 227 n += rq->size - tail; ipath_get_rwqe() 229 n -= tail; ipath_get_rwqe()
|
H A D | ipath_user_sdma.c | 685 unsigned ofs, u16 tail) ipath_user_sdma_send_frag() 693 descqp = &dd->ipath_sdma_descq[tail].qw[0]; ipath_user_sdma_send_frag() 712 u16 tail; ipath_user_sdma_push_pkts() local 727 tail = dd->ipath_sdma_descq_tail; ipath_user_sdma_push_pkts() 734 u16 dtail = tail; ipath_user_sdma_push_pkts() 740 ipath_user_sdma_send_frag(dd, pkt, i, ofs, tail); ipath_user_sdma_push_pkts() 743 if (++tail == dd->ipath_sdma_descq_cnt) { ipath_user_sdma_push_pkts() 744 tail = 0; ipath_user_sdma_push_pkts() 777 /* advance the tail on the chip if necessary */ ipath_user_sdma_push_pkts() 778 if (dd->ipath_sdma_descq_tail != tail) { ipath_user_sdma_push_pkts() 780 ipath_write_kreg(dd, dd->ipath_kregs->kr_senddmatail, tail); ipath_user_sdma_push_pkts() 781 dd->ipath_sdma_descq_tail = tail; ipath_user_sdma_push_pkts() 683 ipath_user_sdma_send_frag(struct ipath_devdata *dd, struct ipath_user_sdma_pkt *pkt, int idx, unsigned ofs, u16 tail) ipath_user_sdma_send_frag() argument
|
H A D | ipath_qp.c | 361 qp->r_rq.wq->tail = 0; ipath_reset_qp() 412 u32 tail; ipath_error_qp() local 421 tail = wq->tail; ipath_error_qp() 422 if (tail >= qp->r_rq.size) ipath_error_qp() 423 tail = 0; ipath_error_qp() 424 while (tail != head) { ipath_error_qp() 425 wc.wr_id = get_rwqe_ptr(&qp->r_rq, tail)->wr_id; ipath_error_qp() 426 if (++tail >= qp->r_rq.size) ipath_error_qp() 427 tail = 0; ipath_error_qp() 430 wq->tail = tail; ipath_error_qp() 691 u32 tail; ipath_compute_aeth() local 697 tail = wq->tail; ipath_compute_aeth() 698 if (tail >= qp->r_rq.size) ipath_compute_aeth() 699 tail = 0; ipath_compute_aeth() 705 credits = head - tail; ipath_compute_aeth()
|
/linux-4.4.14/drivers/staging/rdma/hfi1/ |
H A D | cq.c | 87 if (unlikely(next == wc->tail)) { hfi1_cq_enter() 158 u32 tail; hfi1_poll_cq() local 169 tail = wc->tail; hfi1_poll_cq() 170 if (tail > (u32) cq->ibcq.cqe) hfi1_poll_cq() 171 tail = (u32) cq->ibcq.cqe; hfi1_poll_cq() 173 if (tail == wc->head) hfi1_poll_cq() 176 *entry = wc->kqueue[tail]; hfi1_poll_cq() 177 if (tail >= cq->ibcq.cqe) hfi1_poll_cq() 178 tail = 0; hfi1_poll_cq() 180 tail++; hfi1_poll_cq() 182 wc->tail = tail; hfi1_poll_cq() 256 * Allocate the completion queue entries and head/tail pointers. hfi1_create_cq() 323 wc->tail = 0; hfi1_create_cq() 391 cq->queue->head != cq->queue->tail) hfi1_req_notify_cq() 410 u32 head, tail, n; hfi1_resize_cq() local 444 * Make sure head and tail are sane since they hfi1_resize_cq() 451 tail = old_wc->tail; hfi1_resize_cq() 452 if (tail > (u32) cq->ibcq.cqe) hfi1_resize_cq() 453 tail = (u32) cq->ibcq.cqe; hfi1_resize_cq() 454 if (head < tail) hfi1_resize_cq() 455 n = cq->ibcq.cqe + 1 + head - tail; hfi1_resize_cq() 457 n = head - tail; hfi1_resize_cq() 462 for (n = 0; tail != head; n++) { hfi1_resize_cq() 464 wc->uqueue[n] = old_wc->uqueue[tail]; hfi1_resize_cq() 466 wc->kqueue[n] = old_wc->kqueue[tail]; hfi1_resize_cq() 467 if (tail == (u32) cq->ibcq.cqe) hfi1_resize_cq() 468 tail = 0; hfi1_resize_cq() 470 tail++; hfi1_resize_cq() 474 wc->tail = 0; hfi1_resize_cq()
|
H A D | srq.c | 89 if (next == wq->tail) { hfi1_post_srq_receive() 189 srq->rq.wq->tail = 0; hfi1_create_srq() 239 u32 sz, size, n, head, tail; hfi1_modify_srq() local 277 * validate head and tail pointer values and compute hfi1_modify_srq() 282 tail = owq->tail; hfi1_modify_srq() 283 if (head >= srq->rq.size || tail >= srq->rq.size) { hfi1_modify_srq() 288 if (n < tail) hfi1_modify_srq() 289 n += srq->rq.size - tail; hfi1_modify_srq() 291 n -= tail; hfi1_modify_srq() 298 while (tail != head) { hfi1_modify_srq() 302 wqe = get_rwqe_ptr(&srq->rq, tail); hfi1_modify_srq() 309 if (++tail >= srq->rq.size) hfi1_modify_srq() 310 tail = 0; hfi1_modify_srq() 315 wq->tail = 0; hfi1_modify_srq()
|
H A D | sdma.c | 389 /* flush from head to tail */ sdma_flush() 571 u16 head, tail; sdma_flush_descq() local 581 tail = sde->descq_tail & sde->sdma_mask; sdma_flush_descq() 582 while (head != tail) { sdma_flush_descq() 603 trace_hfi1_sdma_progress(sde, head, tail, txp); sdma_flush_descq() 653 * Reset our notion of head and tail. sdma_sw_clean_up_task() 1664 static inline void sdma_update_tail(struct sdma_engine *sde, u16 tail) sdma_update_tail() argument 1666 /* Commit writes to memory and advance the tail on the chip */ sdma_update_tail() 1668 writeq(tail, sde->tail_csr); sdma_update_tail() 1823 u16 head, tail, cnt; dump_sdma_state() local 1826 tail = sde->descq_tail & sde->sdma_mask; dump_sdma_state() 1834 tail, dump_sdma_state() 1839 while (head != tail) { dump_sdma_state() 1887 u16 head, tail; sdma_seqfile_dump_sde() local 1895 tail = ACCESS_ONCE(sde->descq_tail) & sde->sdma_mask; sdma_seqfile_dump_sde() 1903 tail, sdma_seqfile_dump_sde() 1921 while (head != tail) { sdma_seqfile_dump_sde() 1969 * tail side of ring is locked. 1971 * The hardware tail update is done 1973 * by returning the new tail. 1984 u16 tail; submit_tx() local 1988 tail = sde->descq_tail & sde->sdma_mask; submit_tx() 1989 sde->descq[tail].qw[0] = cpu_to_le64(descp->qw[0]); submit_tx() 1990 sde->descq[tail].qw[1] = cpu_to_le64(add_gen(sde, descp->qw[1])); submit_tx() 1992 tail, &sde->descq[tail]); submit_tx() 1993 tail = ++sde->descq_tail & sde->sdma_mask; submit_tx() 2000 sde->descq[tail].qw[0] = cpu_to_le64(descp->qw[0]); submit_tx() 2009 sde->descq[tail].qw[1] = cpu_to_le64(qw1); submit_tx() 2011 tail, &sde->descq[tail]); submit_tx() 2012 tail = ++sde->descq_tail & sde->sdma_mask; submit_tx() 2014 tx->next_descq_idx = tail; submit_tx() 2022 return tail; submit_tx() 2071 u16 tail; sdma_send_txreq() local 2084 tail = submit_tx(sde, tx); sdma_send_txreq() 2087 sdma_update_tail(sde, tail); sdma_send_txreq() 2134 * way of submitting multiple packets to SDMA while holding the tail 2149 u16 tail = INVALID_TAIL; sdma_send_txlist() local 2165 tail = submit_tx(sde, tx); list_for_each_entry_safe() 2167 if (tail != INVALID_TAIL && list_for_each_entry_safe() 2169 sdma_update_tail(sde, tail); list_for_each_entry_safe() 2170 tail = INVALID_TAIL; list_for_each_entry_safe() 2176 if (tail != INVALID_TAIL) 2177 sdma_update_tail(sde, tail);
|
H A D | ruc.c | 165 u32 tail; hfi1_get_rwqe() local 185 tail = wq->tail; hfi1_get_rwqe() 186 /* Validate tail before using it since it is user writable. */ hfi1_get_rwqe() 187 if (tail >= rq->size) hfi1_get_rwqe() 188 tail = 0; hfi1_get_rwqe() 189 if (unlikely(tail == wq->head)) { hfi1_get_rwqe() 195 wqe = get_rwqe_ptr(rq, tail); hfi1_get_rwqe() 197 * Even though we update the tail index in memory, the verbs hfi1_get_rwqe() 201 if (++tail >= rq->size) hfi1_get_rwqe() 202 tail = 0; hfi1_get_rwqe() 203 wq->tail = tail; hfi1_get_rwqe() 222 if (n < tail) hfi1_get_rwqe() 223 n += rq->size - tail; hfi1_get_rwqe() 225 n -= tail; hfi1_get_rwqe()
|
H A D | qp.c | 398 qp->r_rq.wq->tail = 0; reset_qp() 516 u32 tail; hfi1_error_qp() local 525 tail = wq->tail; hfi1_error_qp() 526 if (tail >= qp->r_rq.size) hfi1_error_qp() 527 tail = 0; hfi1_error_qp() 528 while (tail != head) { hfi1_error_qp() 529 wc.wr_id = get_rwqe_ptr(&qp->r_rq, tail)->wr_id; hfi1_error_qp() 530 if (++tail >= qp->r_rq.size) hfi1_error_qp() 531 tail = 0; hfi1_error_qp() 534 wq->tail = tail; hfi1_error_qp() 962 u32 tail; hfi1_compute_aeth() local 968 tail = wq->tail; hfi1_compute_aeth() 969 if (tail >= qp->r_rq.size) hfi1_compute_aeth() 970 tail = 0; hfi1_compute_aeth() 977 credits = head - tail; hfi1_compute_aeth()
|
/linux-4.4.14/drivers/infiniband/hw/qib/ |
H A D | qib_cq.c | 71 if (unlikely(next == wc->tail)) { qib_cq_enter() 142 u32 tail; qib_poll_cq() local 153 tail = wc->tail; qib_poll_cq() 154 if (tail > (u32) cq->ibcq.cqe) qib_poll_cq() 155 tail = (u32) cq->ibcq.cqe; qib_poll_cq() 157 if (tail == wc->head) qib_poll_cq() 160 *entry = wc->kqueue[tail]; qib_poll_cq() 161 if (tail >= cq->ibcq.cqe) qib_poll_cq() 162 tail = 0; qib_poll_cq() 164 tail++; qib_poll_cq() 166 wc->tail = tail; qib_poll_cq() 243 * Allocate the completion queue entries and head/tail pointers. qib_create_cq() 310 wc->tail = 0; qib_create_cq() 378 cq->queue->head != cq->queue->tail) qib_req_notify_cq() 397 u32 head, tail, n; qib_resize_cq() local 431 * Make sure head and tail are sane since they qib_resize_cq() 438 tail = old_wc->tail; qib_resize_cq() 439 if (tail > (u32) cq->ibcq.cqe) qib_resize_cq() 440 tail = (u32) cq->ibcq.cqe; qib_resize_cq() 441 if (head < tail) qib_resize_cq() 442 n = cq->ibcq.cqe + 1 + head - tail; qib_resize_cq() 444 n = head - tail; qib_resize_cq() 449 for (n = 0; tail != head; n++) { qib_resize_cq() 451 wc->uqueue[n] = old_wc->uqueue[tail]; qib_resize_cq() 453 wc->kqueue[n] = old_wc->kqueue[tail]; qib_resize_cq() 454 if (tail == (u32) cq->ibcq.cqe) qib_resize_cq() 455 tail = 0; qib_resize_cq() 457 tail++; qib_resize_cq() 461 wc->tail = 0; qib_resize_cq()
|
H A D | qib_srq.c | 72 if (next == wq->tail) { qib_post_srq_receive() 172 srq->rq.wq->tail = 0; qib_create_srq() 222 u32 sz, size, n, head, tail; qib_modify_srq() local 260 * validate head and tail pointer values and compute qib_modify_srq() 265 tail = owq->tail; qib_modify_srq() 266 if (head >= srq->rq.size || tail >= srq->rq.size) { qib_modify_srq() 271 if (n < tail) qib_modify_srq() 272 n += srq->rq.size - tail; qib_modify_srq() 274 n -= tail; qib_modify_srq() 281 while (tail != head) { qib_modify_srq() 285 wqe = get_rwqe_ptr(&srq->rq, tail); qib_modify_srq() 292 if (++tail >= srq->rq.size) qib_modify_srq() 293 tail = 0; qib_modify_srq() 298 wq->tail = 0; qib_modify_srq()
|
H A D | qib_ruc.c | 147 u32 tail; qib_get_rwqe() local 167 tail = wq->tail; qib_get_rwqe() 168 /* Validate tail before using it since it is user writable. */ qib_get_rwqe() 169 if (tail >= rq->size) qib_get_rwqe() 170 tail = 0; qib_get_rwqe() 171 if (unlikely(tail == wq->head)) { qib_get_rwqe() 177 wqe = get_rwqe_ptr(rq, tail); qib_get_rwqe() 179 * Even though we update the tail index in memory, the verbs qib_get_rwqe() 183 if (++tail >= rq->size) qib_get_rwqe() 184 tail = 0; qib_get_rwqe() 185 wq->tail = tail; qib_get_rwqe() 204 if (n < tail) qib_get_rwqe() 205 n += rq->size - tail; qib_get_rwqe() 207 n -= tail; qib_get_rwqe()
|
H A D | qib_sdma.c | 174 * Reset our notion of head and tail. sdma_sw_clean_up_task() 541 u16 tail; qib_sdma_verbs_send() local 572 tail = ppd->sdma_descq_tail; qib_sdma_verbs_send() 573 descqp = &ppd->sdma_descq[tail].qw[0]; qib_sdma_verbs_send() 577 /* increment the tail */ qib_sdma_verbs_send() 578 if (++tail == ppd->sdma_descq_cnt) { qib_sdma_verbs_send() 579 tail = 0; qib_sdma_verbs_send() 584 tx->txreq.start_idx = tail; qib_sdma_verbs_send() 611 /* increment the tail */ qib_sdma_verbs_send() 612 if (++tail == ppd->sdma_descq_cnt) { qib_sdma_verbs_send() 613 tail = 0; qib_sdma_verbs_send() 639 if (!tail) qib_sdma_verbs_send() 649 tx->txreq.next_descq_idx = tail; qib_sdma_verbs_send() 650 ppd->dd->f_sdma_update_tail(ppd, tail); qib_sdma_verbs_send() 657 if (!tail) qib_sdma_verbs_send() 658 tail = ppd->sdma_descq_cnt - 1; qib_sdma_verbs_send() 660 tail--; qib_sdma_verbs_send() 661 if (tail == ppd->sdma_descq_tail) qib_sdma_verbs_send() 663 unmap_desc(ppd, tail); qib_sdma_verbs_send() 728 u16 head, tail, cnt; dump_sdma_state() local 731 tail = ppd->sdma_descq_tail; dump_sdma_state() 738 "SDMA ppd->sdma_descq_tail: %u\n", tail); dump_sdma_state() 743 while (head != tail) { dump_sdma_state()
|
H A D | qib_qp.c | 413 qp->r_rq.wq->tail = 0; qib_reset_qp() 532 u32 tail; qib_error_qp() local 541 tail = wq->tail; qib_error_qp() 542 if (tail >= qp->r_rq.size) qib_error_qp() 543 tail = 0; qib_error_qp() 544 while (tail != head) { qib_error_qp() 545 wc.wr_id = get_rwqe_ptr(&qp->r_rq, tail)->wr_id; qib_error_qp() 546 if (++tail >= qp->r_rq.size) qib_error_qp() 547 tail = 0; qib_error_qp() 550 wq->tail = tail; qib_error_qp() 926 u32 tail; qib_compute_aeth() local 932 tail = wq->tail; qib_compute_aeth() 933 if (tail >= qp->r_rq.size) qib_compute_aeth() 934 tail = 0; qib_compute_aeth() 940 credits = head - tail; qib_compute_aeth()
|
/linux-4.4.14/net/sunrpc/ |
H A D | xdr.c | 136 struct kvec *tail = xdr->tail; xdr_inline_pages() local 146 tail->iov_base = buf + offset; xdr_inline_pages() 147 tail->iov_len = buflen - offset; xdr_inline_pages() 313 * moved into the inlined pages and/or the tail. 318 struct kvec *head, *tail; xdr_shrink_bufhead() local 322 tail = buf->tail; xdr_shrink_bufhead() 329 /* Shift the tail first */ xdr_shrink_bufhead() 330 if (tail->iov_len != 0) { xdr_shrink_bufhead() 331 if (tail->iov_len > len) { xdr_shrink_bufhead() 332 copy = tail->iov_len - len; xdr_shrink_bufhead() 333 memmove((char *)tail->iov_base + len, xdr_shrink_bufhead() 334 tail->iov_base, copy); xdr_shrink_bufhead() 336 /* Copy from the inlined pages into the tail */ xdr_shrink_bufhead() 341 if (offs >= tail->iov_len) xdr_shrink_bufhead() 343 else if (copy > tail->iov_len - offs) xdr_shrink_bufhead() 344 copy = tail->iov_len - offs; xdr_shrink_bufhead() 346 _copy_from_pages((char *)tail->iov_base + offs, xdr_shrink_bufhead() 350 /* Do we also need to copy data from the head into the tail ? */ xdr_shrink_bufhead() 353 if (copy > tail->iov_len) xdr_shrink_bufhead() 354 copy = tail->iov_len; xdr_shrink_bufhead() 355 memcpy(tail->iov_base, xdr_shrink_bufhead() 389 * moved into the tail. 394 struct kvec *tail; xdr_shrink_pagelen() local 399 tail = buf->tail; xdr_shrink_pagelen() 404 /* Shift the tail first */ xdr_shrink_pagelen() 406 unsigned int free_space = tailbuf_len - tail->iov_len; xdr_shrink_pagelen() 410 tail->iov_len += free_space; xdr_shrink_pagelen() 413 if (tail->iov_len > len) { xdr_shrink_pagelen() 414 char *p = (char *)tail->iov_base + len; xdr_shrink_pagelen() 415 memmove(p, tail->iov_base, tail->iov_len - len); xdr_shrink_pagelen() 417 copy = tail->iov_len; xdr_shrink_pagelen() 418 /* Copy from the inlined pages into the tail */ xdr_shrink_pagelen() 419 _copy_from_pages((char *)tail->iov_base, xdr_shrink_pagelen() 463 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; xdr_init_encode() 591 * head, tail, and page lengths are adjusted to correspond. 600 * simple case of truncating from one position in the tail to another. 607 struct kvec *tail = buf->tail; xdr_truncate_encode() local 617 fraglen = min_t(int, buf->len - len, tail->iov_len); xdr_truncate_encode() 618 tail->iov_len -= fraglen; xdr_truncate_encode() 620 if (tail->iov_len) { xdr_truncate_encode() 621 xdr->p = tail->iov_base + tail->iov_len; xdr_truncate_encode() 695 struct kvec *iov = buf->tail; xdr_write_pages() 770 xdr_set_iov(xdr, xdr->buf->tail, xdr->buf->len); xdr_set_next_page() 779 xdr_set_iov(xdr, xdr->buf->tail, xdr->buf->len); xdr_set_next_buffer() 925 /* Truncate page data and move it into the tail */ xdr_align_pages() 939 * bytes is moved into the XDR tail[]. 956 xdr->iov = iov = buf->tail; xdr_read_pages() 963 * Position current pointer at beginning of tail, and xdr_read_pages() 981 * bytes is moved into the XDR tail[]. The current pointer is then 988 * Position current pointer at beginning of tail, and xdr_enter_page() 1002 buf->tail[0] = empty_iov; xdr_buf_from_iov() 1050 if (base < buf->tail[0].iov_len) { xdr_buf_subsegment() 1051 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; xdr_buf_subsegment() 1052 subbuf->tail[0].iov_len = min_t(unsigned int, len, xdr_buf_subsegment() 1053 buf->tail[0].iov_len - base); xdr_buf_subsegment() 1054 len -= subbuf->tail[0].iov_len; xdr_buf_subsegment() 1057 base -= buf->tail[0].iov_len; xdr_buf_subsegment() 1058 subbuf->tail[0].iov_len = 0; xdr_buf_subsegment() 1082 if (buf->tail[0].iov_len) { xdr_buf_trim() 1083 cur = min_t(size_t, buf->tail[0].iov_len, trim); xdr_buf_trim() 1084 buf->tail[0].iov_len -= cur; xdr_buf_trim() 1121 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); __read_bytes_from_xdr_buf() 1122 memcpy(obj, subbuf->tail[0].iov_base, this_len); __read_bytes_from_xdr_buf() 1152 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); __write_bytes_to_xdr_buf() 1153 memcpy(subbuf->tail[0].iov_base, obj, this_len); __write_bytes_to_xdr_buf() 1194 * entirely in the head or the tail, set object to point to it; otherwise 1195 * try to find space for it at the end of the tail, copy it there, and 1210 /* ..or is the obj contained entirely in the tail? */ xdr_buf_read_netobj() 1211 obj->data = subbuf.tail[0].iov_base; xdr_buf_read_netobj() 1212 if (subbuf.tail[0].iov_len == obj->len) xdr_buf_read_netobj() 1215 /* use end of tail as storage for obj: xdr_buf_read_netobj() 1219 * tail.) */ xdr_buf_read_netobj() 1222 if (buf->tail[0].iov_len != 0) xdr_buf_read_netobj() 1223 obj->data = buf->tail[0].iov_base + buf->tail[0].iov_len; xdr_buf_read_netobj() 1388 base = buf->page_len; /* align to start of tail */ xdr_xcode_array2() 1391 /* process tail */ xdr_xcode_array2() 1394 c = buf->tail->iov_base + base; xdr_xcode_array2() 1442 buf->head->iov_len + buf->page_len + buf->tail->iov_len) xdr_encode_array2() 1501 if (offset < buf->tail[0].iov_len) { xdr_process_buf() 1502 thislen = buf->tail[0].iov_len - offset; xdr_process_buf() 1505 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); xdr_process_buf()
|
/linux-4.4.14/arch/x86/include/asm/ |
H A D | spinlock.h | 80 old.tickets.tail = new.tickets.head + TICKET_LOCK_INC; __ticket_check_and_clear_slowpath() 81 new.tickets.tail = old.tickets.tail; __ticket_check_and_clear_slowpath() 90 return __tickets_equal(lock.tickets.head, lock.tickets.tail); arch_spin_value_unlocked() 95 * the queue, and the other indicating the current tail. The lock is acquired 96 * by atomically noting the tail and incrementing it by one (thus adding 98 * becomes equal to the the initial value of the tail. 100 * We use an xadd covering *both* parts of the lock, to increment the tail and 102 * issues and should be optimal for the uncontended case. Note the tail must be 108 register struct __raw_tickets inc = { .tail = TICKET_LOCK_INC }; arch_spin_lock() 111 if (likely(inc.head == inc.tail)) arch_spin_lock() 119 if (__tickets_equal(inc.head, inc.tail)) arch_spin_lock() 123 __ticket_lock_spinning(lock, inc.tail); arch_spin_lock() 136 if (!__tickets_equal(old.tickets.head, old.tickets.tail)) arch_spin_trylock() 168 return !__tickets_equal(tmp.tail, tmp.head); arch_spin_is_locked() 176 return (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC; arch_spin_is_contended() 196 if (__tickets_equal(tmp.head, tmp.tail) || arch_spin_unlock_wait()
|
H A D | spinlock_types.h | 33 __ticket_t head, tail; member in struct:arch_spinlock::__anon3102::__raw_tickets
|
/linux-4.4.14/include/asm-generic/ |
H A D | qspinlock_types.h | 42 * 16-17: tail index 43 * 18-31: tail cpu (+1) 48 * 9-10: tail index 49 * 11-31: tail cpu (+1)
|
/linux-4.4.14/drivers/of/ |
H A D | pdt.c | 139 struct property *head, *tail; of_pdt_build_prop_list() local 141 head = tail = of_pdt_build_one_prop(node, NULL, of_pdt_build_prop_list() 144 tail->next = of_pdt_build_one_prop(node, NULL, NULL, NULL, 0); of_pdt_build_prop_list() 145 tail = tail->next; of_pdt_build_prop_list() 146 while(tail) { of_pdt_build_prop_list() 147 tail->next = of_pdt_build_one_prop(node, tail->name, of_pdt_build_prop_list() 149 tail = tail->next; of_pdt_build_prop_list()
|
H A D | overlay.c | 389 /* add to the tail of the overlay list */ of_overlay_create() 458 * Newly applied overlays are inserted at the tail of the overlay list, 459 * so a top most overlay is the one that is closest to the tail. 463 * the one closest to the tail. If another overlay has affected this 464 * device node and is closest to the tail, then removal is not permited. 542 /* the tail of list is guaranteed to be safe to remove */ of_overlay_destroy_all()
|
/linux-4.4.14/fs/affs/ |
H A D | inode.c | 20 struct affs_tail *tail; affs_iget() local 48 tail = AFFS_TAIL(sb, bh); affs_iget() 49 prot = be32_to_cpu(tail->protect); affs_iget() 74 id = be16_to_cpu(tail->uid); affs_iget() 82 id = be16_to_cpu(tail->gid); affs_iget() 90 switch (be32_to_cpu(tail->stype)) { affs_iget() 96 if (be32_to_cpu(tail->stype) == ST_USERDIR || affs_iget() 125 size = be32_to_cpu(tail->size); affs_iget() 134 if (tail->link_chain) affs_iget() 149 = (be32_to_cpu(tail->change.days) * (24 * 60 * 60) + affs_iget() 150 be32_to_cpu(tail->change.mins) * 60 + affs_iget() 151 be32_to_cpu(tail->change.ticks) / 50 + affs_iget() 170 struct affs_tail *tail; affs_write_inode() local 184 tail = AFFS_TAIL(sb, bh); affs_write_inode() 185 if (tail->stype == cpu_to_be32(ST_ROOT)) { affs_write_inode() 188 tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect); affs_write_inode() 189 tail->size = cpu_to_be32(inode->i_size); affs_write_inode() 190 secs_to_datestamp(inode->i_mtime.tv_sec,&tail->change); affs_write_inode() 201 tail->uid = cpu_to_be16(uid); affs_write_inode() 203 tail->gid = cpu_to_be16(gid); affs_write_inode()
|
/linux-4.4.14/drivers/scsi/bfa/ |
H A D | bfa_cs.h | 67 u32 tail; member in struct:bfa_trc_mod_s 100 trcm->head = trcm->tail = trcm->stopped = 0; bfa_trc_init() 113 int tail = trcm->tail; __bfa_trc() local 114 struct bfa_trc_s *trc = &trcm->trc[tail]; __bfa_trc() 124 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); __bfa_trc() 125 if (trcm->tail == trcm->head) __bfa_trc() 133 int tail = trcm->tail; __bfa_trc32() local 134 struct bfa_trc_s *trc = &trcm->trc[tail]; __bfa_trc32() 144 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); __bfa_trc32() 145 if (trcm->tail == trcm->head) __bfa_trc32() 183 * bfa_q_deq_tail - dequeue an element from tail of the queue
|
/linux-4.4.14/net/sched/ |
H A D | sch_choke.c | 72 unsigned int tail; member in struct:choke_sched_data 82 return (q->tail - q->head) & q->tab_mask; choke_len() 102 if (q->head == q->tail) choke_zap_head_holes() 107 /* Move tail pointer backwards to reuse holes */ choke_zap_tail_holes() 111 q->tail = (q->tail - 1) & q->tab_mask; choke_zap_tail_holes() 112 if (q->head == q->tail) choke_zap_tail_holes() 114 } while (q->tab[q->tail] == NULL); choke_zap_tail_holes() 127 if (idx == q->tail) choke_drop_by_idx() 226 * Will return NULL if queue is empty (q->head == q->tail) 254 if (q->head == q->tail) choke_match_random() 326 q->tab[q->tail] = skb; choke_enqueue() 327 q->tail = (q->tail + 1) & q->tab_mask; choke_enqueue() 352 if (q->head == q->tail) { choke_dequeue() 388 while (q->head != q->tail) { choke_reset() 400 q->head = q->tail = 0; choke_reset() 458 unsigned int oqlen = sch->q.qlen, tail = 0; choke_change() local 461 while (q->head != q->tail) { choke_change() 467 if (tail < mask) { choke_change() 468 ntab[tail++] = skb; choke_change() 478 q->tail = tail; choke_change() 495 if (q->head == q->tail) choke_change() 562 return (q->head != q->tail) ? q->tab[q->head] : NULL; choke_peek_head()
|
H A D | sch_sfq.c | 133 struct sfq_slot *tail; /* current slot in round */ member in struct:sfq_sched_data 255 /* remove one skb from tail of slot queue */ slot_dequeue_tail() 283 /* add skb to slot queue (tail add) */ slot_queue_add() 300 /* Queue is full! Find the longest slot and drop tail packet from it */ sfq_drop() 318 x = q->tail->next; sfq_drop() 320 q->tail->next = slot->next; sfq_drop() 446 if (q->tail == NULL) { /* It is the first flow */ sfq_enqueue() 449 slot->next = q->tail->next; sfq_enqueue() 450 q->tail->next = x; sfq_enqueue() 456 q->tail = slot; sfq_enqueue() 485 if (q->tail == NULL) sfq_dequeue() 489 a = q->tail->next; sfq_dequeue() 492 q->tail = slot; sfq_dequeue() 507 q->tail = NULL; /* no more active slots */ sfq_dequeue() 510 q->tail->next = next_a; sfq_dequeue() 557 q->tail = NULL; sfq_rehash() 588 if (q->tail == NULL) { /* It is the first flow */ sfq_rehash() 591 slot->next = q->tail->next; sfq_rehash() 592 q->tail->next = x; sfq_rehash() 594 q->tail = slot; sfq_rehash() 610 if (!q->filter_list && q->tail) sfq_perturbation() 728 q->tail = NULL; sfq_init()
|
/linux-4.4.14/fs/reiserfs/ |
H A D | tail_conversion.c | 12 * access to tail : when one is going to read tail it must make sure, that is 18 * tail. -ENOSPC if no disk space for conversion 195 * reads tail through page cache, insert direct item. When direct item 197 * what we expect from it (number of cut bytes). But when tail remains 213 char *tail; indirect2direct() local 215 loff_t pos, pos1; /* position of first byte of the tail */ indirect2direct() 239 * we are protected by i_mutex. The tail can not disapper, not indirect2direct() 241 * we are in truncate or packing tail in file_release indirect2direct() 244 tail = (char *)kmap(page); /* this can schedule */ indirect2direct() 259 reiserfs_panic(sb, "vs-5530", "tail position " indirect2direct() 270 * we want a pointer to the first byte of the tail in the page. indirect2direct() 274 tail = tail + (pos & (PAGE_CACHE_SIZE - 1)); indirect2direct() 281 /* Insert tail as new direct item in the tree */ indirect2direct() 283 tail ? tail : NULL) < 0) { indirect2direct()
|
H A D | ioctl.c | 17 * 1) REISERFS_IOC_UNPACK - try to unpack tail from direct item into indirect 168 * Function try to convert tail from direct item into indirect. 202 * we unpack by finding the page with the tail, and calling reiserfs_unpack() 204 * reiserfs_get_block to unpack the tail for us. reiserfs_unpack()
|
H A D | file.c | 19 * This implies an unnecessary copy of the tail and an unnecessary indirect item 21 * It avoids unnecessary tail packings (balances) for files that are written in 26 * small enough to have a tail, and the tail is currently in an 27 * unformatted node, the tail is converted back into a direct item. 29 * We use reiserfs_truncate_file to pack the tail, since it already has
|
/linux-4.4.14/drivers/net/ethernet/intel/fm10k/ |
H A D | fm10k_mbx.c | 34 fifo->tail = 0; fm10k_fifo_init() 45 return fifo->tail - fifo->head; fm10k_fifo_used() 56 return fifo->size + fifo->head - fifo->tail; fm10k_fifo_unused() 67 return fifo->head == fifo->tail; fm10k_fifo_empty() 83 * fm10k_fifo_tail_offset - returns indices of tail with given offset 85 * @offset: offset to add to tail 87 * This function returns the indices into the fifo based on tail + offset 91 return (fifo->tail + offset) & (fifo->size - 1); fm10k_fifo_tail_offset() 137 fifo->head = fifo->tail; fm10k_fifo_drop_all() 141 * fm10k_mbx_index_len - Convert a head/tail index into a length value 144 * @tail: head index 146 * This function takes the head and tail index and determines the length 149 static u16 fm10k_mbx_index_len(struct fm10k_mbx_info *mbx, u16 head, u16 tail) fm10k_mbx_index_len() argument 151 u16 len = tail - head; fm10k_mbx_index_len() 154 if (len > tail) fm10k_mbx_index_len() 161 * fm10k_mbx_tail_add - Determine new tail value with added offset 165 * This function takes the local tail index and recomputes it for 170 u16 tail = (mbx->tail + offset + 1) & ((mbx->mbmem_len << 1) - 1); fm10k_mbx_tail_add() local 173 return (tail > mbx->tail) ? --tail : ++tail; fm10k_mbx_tail_add() 177 * fm10k_mbx_tail_sub - Determine new tail value with subtracted offset 181 * This function takes the local tail index and recomputes it for 186 u16 tail = (mbx->tail - offset - 1) & ((mbx->mbmem_len << 1) - 1); fm10k_mbx_tail_sub() local 189 return (tail < mbx->tail) ? ++tail : --tail; fm10k_mbx_tail_sub() 229 * pushed onto the tail of the Rx queue. 233 u32 *tail = mbx->rx.buffer + fm10k_fifo_tail_offset(&mbx->rx, 0); fm10k_mbx_pushed_tail_len() local 235 /* pushed tail is only valid if pushed is set */ fm10k_mbx_pushed_tail_len() 239 return FM10K_TLV_DWORD_LEN(*tail); fm10k_mbx_pushed_tail_len() 246 * @tail_offset: additional offset to add to tail pointer 251 * the tail you can use tail_offset to adjust the pointer. 257 u32 *tail = fifo->buffer + end; fm10k_fifo_write_copy() local 269 memcpy(tail, msg, end << 2); fm10k_fifo_write_copy() 273 * fm10k_fifo_enqueue - Enqueues the message to the tail of the FIFO 278 * contained in the first DWORD of the message and will place at the tail 296 /* memory barrier to guarantee FIFO is written before tail update */ fm10k_fifo_enqueue() 299 /* Update Tx FIFO tail */ fm10k_fifo_enqueue() 300 fifo->tail += len; fm10k_fifo_enqueue() 343 * tail and len determines the length to copy. 351 u16 end, len, tail, mask; fm10k_mbx_write_copy() local 356 /* determine data length and mbmem tail index */ fm10k_mbx_write_copy() 359 tail = fm10k_mbx_tail_sub(mbx, len); fm10k_mbx_write_copy() 360 if (tail > mask) fm10k_mbx_write_copy() 361 tail++; fm10k_mbx_write_copy() 373 /* adjust tail to match offset for FIFO */ fm10k_mbx_write_copy() 374 tail &= mask; fm10k_mbx_write_copy() 375 if (!tail) fm10k_mbx_write_copy() 376 tail++; fm10k_mbx_write_copy() 379 fm10k_write_reg(hw, mbmem + tail++, *(head++)); fm10k_mbx_write_copy() 390 * This function will push the tail index forward based on the remote 398 u16 mbmem_len, len, ack = fm10k_mbx_index_len(mbx, head, mbx->tail); fm10k_mbx_pull_head() 410 /* update tail and record number of bytes in transit */ fm10k_mbx_pull_head() 411 mbx->tail = fm10k_mbx_tail_add(mbx, len - ack); fm10k_mbx_pull_head() 441 u32 *tail = fifo->buffer; fm10k_mbx_read_copy() local 452 tail += end; fm10k_mbx_read_copy() 455 for (end = fifo->size - end; len; tail = fifo->buffer) { fm10k_mbx_read_copy() 463 *(tail++) = fm10k_read_reg(hw, mbmem + head++); fm10k_mbx_read_copy() 467 /* memory barrier to guarantee FIFO is written before tail update */ fm10k_mbx_read_copy() 472 * fm10k_mbx_push_tail - Pushes up to 15 DWORDs on to tail of FIFO 475 * @tail: tail index of message 477 * This function will first validate the tail index and size for the 484 u16 tail) fm10k_mbx_push_tail() 487 u16 len, seq = fm10k_mbx_index_len(mbx, mbx->head, tail); fm10k_mbx_push_tail() 516 fifo->tail += len; fm10k_mbx_push_tail() 630 u16 len = mbx->tail_len - fm10k_mbx_index_len(mbx, head, mbx->tail); fm10k_mbx_update_local_crc() 731 memmove(fifo->buffer, fifo->buffer + fifo->tail, mbx->pushed << 2); fm10k_mbx_dequeue_rx() 733 /* shift head and tail based on the memory we moved */ fm10k_mbx_dequeue_rx() 734 fifo->tail -= fifo->head; fm10k_mbx_dequeue_rx() 741 * fm10k_mbx_enqueue_tx - Enqueues the message to the tail of the Tx FIFO 747 * contained in the first DWORD of the message and will place at the tail 865 FM10K_MSG_HDR_FIELD_SET(mbx->tail, TAIL) | fm10k_mbx_create_data_hdr() 891 FM10K_MSG_HDR_FIELD_SET(mbx->tail, TAIL) | fm10k_mbx_create_disconnect_hdr() 913 FM10K_MSG_HDR_FIELD_SET(mbx->tail, HEAD); fm10k_mbx_create_fake_disconnect_hdr() 964 u16 type, rsvd0, head, tail, size; fm10k_mbx_validate_msg_hdr() local 969 tail = FM10K_MSG_HDR_FIELD_GET(*hdr, TAIL); fm10k_mbx_validate_msg_hdr() 979 if (tail != mbx->head) fm10k_mbx_validate_msg_hdr() 987 if (fm10k_mbx_index_len(mbx, head, mbx->tail) > mbx->tail_len) fm10k_mbx_validate_msg_hdr() 990 /* validate that tail is moving correctly */ fm10k_mbx_validate_msg_hdr() 991 if (!tail || (tail == FM10K_MSG_HDR_MASK(TAIL))) fm10k_mbx_validate_msg_hdr() 993 if (fm10k_mbx_index_len(mbx, mbx->head, tail) < mbx->mbmem_len) fm10k_mbx_validate_msg_hdr() 1006 /* neither create nor error include a tail offset */ fm10k_mbx_validate_msg_hdr() 1007 if (tail) fm10k_mbx_validate_msg_hdr() 1077 ack = fm10k_mbx_index_len(mbx, head, mbx->tail); fm10k_mbx_reset_work() 1095 mbx->rx.tail = 0; fm10k_mbx_reset_work() 1189 /* align our tail index to remote head index */ fm10k_mbx_process_connect() 1190 mbx->tail = head; fm10k_mbx_process_connect() 1207 u16 head, tail; fm10k_mbx_process_data() local 1212 tail = FM10K_MSG_HDR_FIELD_GET(*hdr, TAIL); fm10k_mbx_process_data() 1216 mbx->tail = head; fm10k_mbx_process_data() 1221 err = fm10k_mbx_push_tail(hw, mbx, tail); fm10k_mbx_process_data() 1259 /* we have already verified mbx->head == tail so we know this is 0 */ fm10k_mbx_process_disconnect() 1275 if (head != mbx->tail) fm10k_mbx_process_disconnect() 1315 /* reset tail index and size to prepare for reconnect */ fm10k_mbx_process_error() 1316 mbx->tail = head; fm10k_mbx_process_error() 1331 return fm10k_mbx_create_reply(hw, mbx, mbx->tail); fm10k_mbx_process_error() 1560 * evenly splitting it. In order to allow for easy masking of head/tail 1602 /* initialize tail and head */ fm10k_pfvf_mbx_init() 1603 mbx->tail = 1; fm10k_pfvf_mbx_init() 1643 mbx->mbx_hdr = FM10K_MSG_HDR_FIELD_SET(mbx->tail, SM_TAIL) | fm10k_sm_mbx_create_data_hdr() 1660 mbx->mbx_hdr = FM10K_MSG_HDR_FIELD_SET(mbx->tail, SM_TAIL) | fm10k_sm_mbx_create_connect_hdr() 1681 /* initialize tail and head */ fm10k_sm_mbx_connect_reset() 1682 mbx->tail = 1; fm10k_sm_mbx_connect_reset() 1784 u16 tail, head, ver; fm10k_sm_mbx_validate_fifo_hdr() local 1786 tail = FM10K_MSG_HDR_FIELD_GET(*hdr, SM_TAIL); fm10k_sm_mbx_validate_fifo_hdr() 1796 if (!tail || tail > FM10K_SM_MBX_FIFO_LEN) fm10k_sm_mbx_validate_fifo_hdr() 1798 if (mbx->tail < head) fm10k_sm_mbx_validate_fifo_hdr() 1800 if (tail < mbx->head) fm10k_sm_mbx_validate_fifo_hdr() 1801 tail += mbx->mbmem_len - 1; fm10k_sm_mbx_validate_fifo_hdr() 1802 if (fm10k_mbx_index_len(mbx, head, mbx->tail) > mbx->tail_len) fm10k_sm_mbx_validate_fifo_hdr() 1804 if (fm10k_mbx_index_len(mbx, mbx->head, tail) < mbx->mbmem_len) fm10k_sm_mbx_validate_fifo_hdr() 1888 u16 tail) fm10k_sm_mbx_receive() 1894 /* push tail in front of head */ fm10k_sm_mbx_receive() 1895 if (tail < mbx->head) fm10k_sm_mbx_receive() 1896 tail += mbmem_len; fm10k_sm_mbx_receive() 1899 err = fm10k_mbx_push_tail(hw, mbx, tail); fm10k_sm_mbx_receive() 1934 /* push head behind tail */ fm10k_sm_mbx_transmit() 1935 if (mbx->tail < head) fm10k_sm_mbx_transmit() 1949 mbx->tail = fm10k_mbx_tail_sub(mbx, mbx->tail_len - tail_len); fm10k_sm_mbx_transmit() 1954 if (mbx->tail > mbmem_len) fm10k_sm_mbx_transmit() 1955 mbx->tail -= mbmem_len; fm10k_sm_mbx_transmit() 2028 fm10k_sm_mbx_create_reply(hw, mbx, mbx->tail); fm10k_sm_mbx_process_reset() 2043 u16 head, tail; fm10k_sm_mbx_process_version_1() local 2047 tail = FM10K_MSG_HDR_FIELD_GET(*hdr, SM_TAIL); fm10k_sm_mbx_process_version_1() 2062 len = fm10k_sm_mbx_receive(hw, mbx, tail); fm10k_sm_mbx_process_version_1() 482 fm10k_mbx_push_tail(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx, u16 tail) fm10k_mbx_push_tail() argument 1886 fm10k_sm_mbx_receive(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx, u16 tail) fm10k_sm_mbx_receive() argument
|
/linux-4.4.14/drivers/input/joystick/iforce/ |
H A D | iforce-serio.c | 44 if (iforce->xmit.head == iforce->xmit.tail) { iforce_serial_xmit() 54 serio_write(iforce->serio, iforce->xmit.buf[iforce->xmit.tail]); iforce_serial_xmit() 55 cs ^= iforce->xmit.buf[iforce->xmit.tail]; iforce_serial_xmit() 56 XMIT_INC(iforce->xmit.tail, 1); iforce_serial_xmit() 58 for (i=iforce->xmit.buf[iforce->xmit.tail]; i >= 0; --i) { iforce_serial_xmit() 59 serio_write(iforce->serio, iforce->xmit.buf[iforce->xmit.tail]); iforce_serial_xmit() 60 cs ^= iforce->xmit.buf[iforce->xmit.tail]; iforce_serial_xmit() 61 XMIT_INC(iforce->xmit.tail, 1); iforce_serial_xmit()
|
H A D | iforce-usb.c | 37 if (iforce->xmit.head == iforce->xmit.tail) { iforce_usb_xmit() 43 ((char *)iforce->out->transfer_buffer)[0] = iforce->xmit.buf[iforce->xmit.tail]; iforce_usb_xmit() 44 XMIT_INC(iforce->xmit.tail, 1); iforce_usb_xmit() 45 n = iforce->xmit.buf[iforce->xmit.tail]; iforce_usb_xmit() 46 XMIT_INC(iforce->xmit.tail, 1); iforce_usb_xmit() 52 c = CIRC_CNT_TO_END(iforce->xmit.head, iforce->xmit.tail, XMIT_SIZE); iforce_usb_xmit() 56 &iforce->xmit.buf[iforce->xmit.tail], iforce_usb_xmit() 63 XMIT_INC(iforce->xmit.tail, n); iforce_usb_xmit()
|
H A D | iforce-packets.c | 55 int head, tail; iforce_send_packet() local 59 * Update head and tail of xmit buffer iforce_send_packet() 64 tail = iforce->xmit.tail; iforce_send_packet() 67 if (CIRC_SPACE(head, tail, XMIT_SIZE) < n+2) { iforce_send_packet() 74 empty = head == tail; iforce_send_packet() 85 c = CIRC_SPACE_TO_END(head, tail, XMIT_SIZE); iforce_send_packet()
|
/linux-4.4.14/sound/core/seq/ |
H A D | seq_fifo.c | 56 f->tail = NULL; snd_seq_fifo_new() 133 if (f->tail != NULL) snd_seq_fifo_event_in() 134 f->tail->next = cell; snd_seq_fifo_event_in() 135 f->tail = cell; snd_seq_fifo_event_in() 159 /* reset tail if this was the last element */ fifo_cell_out() 160 if (f->tail == cell) fifo_cell_out() 161 f->tail = NULL; fifo_cell_out() 257 f->tail = NULL; snd_seq_fifo_resize()
|
H A D | seq_prioq.c | 67 f->tail = NULL; snd_seq_prioq_new() 165 if (f->tail && !prior) { snd_seq_prioq_cell_in() 166 if (compare_timestamp(&cell->event, &f->tail->event)) { snd_seq_prioq_cell_in() 167 /* add new cell to tail of the fifo */ snd_seq_prioq_cell_in() 168 f->tail->next = cell; snd_seq_prioq_cell_in() 169 f->tail = cell; snd_seq_prioq_cell_in() 211 f->tail = cell; snd_seq_prioq_cell_in() 233 /* reset tail if this was the last element */ snd_seq_prioq_cell_out() 234 if (f->tail == cell) snd_seq_prioq_cell_out() 235 f->tail = NULL; snd_seq_prioq_cell_out() 309 if (cell == f->tail) snd_seq_prioq_leave() 310 f->tail = cell->next; snd_seq_prioq_leave() 423 if (cell == f->tail) snd_seq_prioq_remove_events() 424 f->tail = cell->next; snd_seq_prioq_remove_events()
|
H A D | seq_prioq.h | 31 struct snd_seq_event_cell *tail; /* pointer to tail of prioq */ member in struct:snd_seq_prioq
|
H A D | seq_fifo.h | 33 struct snd_seq_event_cell *tail; /* pointer to tail of fifo */ member in struct:snd_seq_fifo
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/ |
H A D | llog_swab.c | 128 struct llog_rec_tail *tail = NULL; lustre_swab_llog_rec() local 143 tail = &lsc->lsc_tail; lustre_swab_llog_rec() 153 tail = &lur->lur_tail; lustre_swab_llog_rec() 163 tail = &lur->lur_tail; lustre_swab_llog_rec() 185 tail = &ext->cr_tail; lustre_swab_llog_rec() 187 tail = &cr->cr_tail; lustre_swab_llog_rec() 189 tail = (struct llog_rec_tail *)((char *)tail + lustre_swab_llog_rec() 200 tail = &cur->cur_tail; lustre_swab_llog_rec() 231 tail = &lsr->lsr_tail; lustre_swab_llog_rec() 247 tail = &llh->llh_tail; lustre_swab_llog_rec() 255 tail = &lid->lid_tail; lustre_swab_llog_rec() 264 tail = &lgr->lgr_tail; lustre_swab_llog_rec() 274 if (tail) { lustre_swab_llog_rec() 275 __swab32s(&tail->lrt_len); lustre_swab_llog_rec() 276 __swab32s(&tail->lrt_index); lustre_swab_llog_rec()
|
H A D | obd_mount.c | 784 char *tail; lmd_parse_mgssec() local 790 tail = strchr(ptr, ','); lmd_parse_mgssec() 791 if (tail == NULL) lmd_parse_mgssec() 794 length = tail - ptr; lmd_parse_mgssec() 807 char *tail; lmd_parse_string() local 816 tail = strchr(ptr, ','); lmd_parse_string() 817 if (tail == NULL) lmd_parse_string() 820 length = tail - ptr; lmd_parse_string() 836 char *tail = *ptr; lmd_parse_mgs() local 842 while (class_parse_nid_quiet(tail, &nid, &tail) == 0) lmd_parse_mgs() 844 length = tail - *ptr; lmd_parse_mgs() 866 *ptr = tail; lmd_parse_mgs() 982 char *tail = strchr(s1 + 6, ','); lmd_parse() local 984 if (tail == NULL) lmd_parse() 987 length = tail - s1; lmd_parse()
|
/linux-4.4.14/arch/alpha/lib/ |
H A D | clear_user.S | 57 beq $1, $tail # .. e1 : 71 $tail: 72 bne $2, 1f # e1 : is there a tail to do? 86 and $1, 7, $2 # e1 : number of bytes in tail
|
/linux-4.4.14/drivers/tty/ |
H A D | bfin_jtag_comm.c | 58 #define circ_empty(circ) ((circ)->head == (circ)->tail) 59 #define circ_free(circ) CIRC_SPACE((circ)->head, (circ)->tail, CIRC_SIZE) 60 #define circ_cnt(circ) CIRC_CNT((circ)->head, (circ)->tail, CIRC_SIZE) 86 inbound_len, bfin_jc_write_buf.tail, bfin_jc_write_buf.head); bfin_jc_emudat_manager() 117 int tail = bfin_jc_write_buf.tail; bfin_jc_emudat_manager() local 121 circ_byte(&bfin_jc_write_buf, tail + 0), bfin_jc_emudat_manager() 122 circ_byte(&bfin_jc_write_buf, tail + 1), bfin_jc_emudat_manager() 123 circ_byte(&bfin_jc_write_buf, tail + 2), bfin_jc_emudat_manager() 124 circ_byte(&bfin_jc_write_buf, tail + 3) bfin_jc_emudat_manager() 126 bfin_jc_write_buf.tail += ate; bfin_jc_emudat_manager() 233 bfin_jc_write_buf.head = bfin_jc_write_buf.tail = 0; bfin_jc_init()
|
H A D | n_tty.c | 642 size_t tail; __process_echoes() local 647 tail = ldata->echo_tail; __process_echoes() 648 while (ldata->echo_commit != tail) { __process_echoes() 649 c = echo_buf(ldata, tail); __process_echoes() 659 op = echo_buf(ldata, tail + 1); __process_echoes() 665 num_chars = echo_buf(ldata, tail + 2); __process_echoes() 691 tail += 3; __process_echoes() 696 tail += 2; __process_echoes() 702 tail += 2; __process_echoes() 714 tail += 2; __process_echoes() 735 tail += 2; __process_echoes() 752 tail += 1; __process_echoes() 758 * data at the tail to prevent a subsequent overrun */ __process_echoes() 759 while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) { __process_echoes() 760 if (echo_buf(ldata, tail) == ECHO_OP_START) { __process_echoes() 761 if (echo_buf(ldata, tail + 1) == ECHO_OP_ERASE_TAB) __process_echoes() 762 tail += 3; __process_echoes() 764 tail += 2; __process_echoes() 766 tail++; __process_echoes() 769 ldata->echo_tail = tail; __process_echoes() 1049 size_t tail = ldata->read_head; eraser() local 1058 while (tail != ldata->canon_head) { eraser() 1059 tail--; eraser() 1060 c = read_buf(ldata, tail); eraser() 1330 size_t tail = ldata->canon_head; n_tty_receive_char_special() local 1335 while (tail != ldata->read_head) { n_tty_receive_char_special() 1336 echo_char(read_buf(ldata, tail), tty); n_tty_receive_char_special() 1337 tail++; n_tty_receive_char_special() 1721 size_t tail = smp_load_acquire(&ldata->read_tail); n_tty_receive_buf_common() local 1723 room = N_TTY_BUF_SIZE - (ldata->read_head - tail); n_tty_receive_buf_common() 1728 overflow = ldata->icanon && ldata->canon_head == tail; n_tty_receive_buf_common() 1967 * drain the space from the tail pointer to the (physical) end of the 1988 size_t tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); copy_from_read_buf() local 1991 n = min(head - ldata->read_tail, N_TTY_BUF_SIZE - tail); copy_from_read_buf() 1994 retval = copy_to_user(*b, read_buf_addr(ldata, tail), n); copy_from_read_buf() 1996 is_eof = n == 1 && read_buf(ldata, tail) == EOF_CHAR(tty); copy_from_read_buf() 1997 tty_audit_add_data(tty, read_buf_addr(ldata, tail), n, copy_from_read_buf() 2040 size_t tail; canon_copy_from_read_buf() local 2049 tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); canon_copy_from_read_buf() 2050 size = min_t(size_t, tail + n, N_TTY_BUF_SIZE); canon_copy_from_read_buf() 2052 n_tty_trace("%s: nr:%zu tail:%zu n:%zu size:%zu\n", canon_copy_from_read_buf() 2053 __func__, *nr, tail, n, size); canon_copy_from_read_buf() 2055 eol = find_next_bit(ldata->read_flags, size, tail); canon_copy_from_read_buf() 2056 more = n - (size - tail); canon_copy_from_read_buf() 2065 size = N_TTY_BUF_SIZE - tail; canon_copy_from_read_buf() 2066 n = eol - tail; canon_copy_from_read_buf() 2080 ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), size); canon_copy_from_read_buf() 2085 ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), n); canon_copy_from_read_buf() 2167 size_t tail; n_tty_read() local 2204 tail = ldata->read_tail; n_tty_read() 2293 if (tail != ldata->read_tail) n_tty_read() 2468 size_t nr, head, tail; inq_canon() local 2473 tail = ldata->read_tail; inq_canon() 2474 nr = head - tail; inq_canon() 2476 while (head != tail) { inq_canon() 2477 if (test_bit(tail & (N_TTY_BUF_SIZE - 1), ldata->read_flags) && inq_canon() 2478 read_buf(ldata, tail) == __DISABLED_CHAR) inq_canon() 2480 tail++; inq_canon()
|
H A D | tty_buffer.c | 132 buf->tail = &buf->sentinel; tty_buffer_free_all() 258 b = buf->tail; __tty_buffer_request_room() 270 buf->tail = n; __tty_buffer_request_room() 313 struct tty_buffer *tb = port->buf.tail; tty_insert_flip_string_fixed_flag() 348 struct tty_buffer *tb = port->buf.tail; tty_insert_flip_string_flags() 380 smp_store_release(&buf->tail->commit, buf->tail->used); tty_schedule_flip() 403 struct tty_buffer *tb = port->buf.tail; tty_prepare_flip_string() 533 buf->tail = &buf->sentinel; tty_buffer_init()
|
H A D | moxa.c | 1880 u16 head, tail, tx_mask, spage, epage; MoxaPortWriteData() local 1888 tail = readw(ofsAddr + TXwptr); MoxaPortWriteData() 1890 c = (head > tail) ? (head - tail - 1) : (head - tail + tx_mask); MoxaPortWriteData() 1899 if (head > tail) MoxaPortWriteData() 1900 len = head - tail - 1; MoxaPortWriteData() 1902 len = tx_mask + 1 - tail; MoxaPortWriteData() 1904 ofs = baseAddr + DynPage_addr + bufhead + tail; MoxaPortWriteData() 1907 tail = (tail + len) & tx_mask; MoxaPortWriteData() 1911 pageno = spage + (tail >> 13); MoxaPortWriteData() 1912 pageofs = tail & Page_mask; MoxaPortWriteData() 1926 tail = (tail + total) & tx_mask; MoxaPortWriteData() 1928 writew(tail, ofsAddr + TXwptr); MoxaPortWriteData() 1939 u16 tail, rx_mask, spage, epage; MoxaPortReadData() local 1945 tail = readw(ofsAddr + RXwptr); MoxaPortReadData() 1949 count = (tail >= head) ? (tail - head) : (tail - head + rx_mask + 1); MoxaPortReadData() 1960 len = (tail >= head) ? (tail - head) : MoxaPortReadData()
|
/linux-4.4.14/drivers/crypto/caam/ |
H A D | jr.c | 165 int hw_idx, sw_idx, i, head, tail; caam_jr_dequeue() local 178 sw_idx = tail = jrp->tail; caam_jr_dequeue() 181 for (i = 0; CIRC_CNT(head, tail + i, JOBR_DEPTH) >= 1; i++) { caam_jr_dequeue() 182 sw_idx = (tail + i) & (JOBR_DEPTH - 1); caam_jr_dequeue() 189 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); caam_jr_dequeue() 220 * the tail. Otherwise, increment tail by 1 plus the caam_jr_dequeue() 223 if (sw_idx == tail) { caam_jr_dequeue() 225 tail = (tail + 1) & (JOBR_DEPTH - 1); caam_jr_dequeue() 226 } while (CIRC_CNT(head, tail, JOBR_DEPTH) >= 1 && caam_jr_dequeue() 227 jrp->entinfo[tail].desc_addr_dma == 0); caam_jr_dequeue() 229 jrp->tail = tail; caam_jr_dequeue() 330 int head, tail, desc_size; caam_jr_enqueue() local 343 tail = ACCESS_ONCE(jrp->tail); caam_jr_enqueue() 346 CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) { caam_jr_enqueue() 434 jrp->tail = 0; caam_jr_init()
|
H A D | intern.h | 54 int inp_ring_write_index; /* Input index "tail" */ 58 int out_ring_read_index; /* Output index "tail" */ 59 int tail; /* entinfo (s/w ring) tail index */ member in struct:caam_drv_private_jr
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
H A D | intel_lrc.h | 53 * intel_logical_ring_advance() - advance the ringbuffer tail 56 * The tail is only updated in our logical ringbuffer struct. 60 ringbuf->tail &= ringbuf->size - 1; intel_logical_ring_advance() 70 iowrite32(data, ringbuf->virtual_start + ringbuf->tail); intel_logical_ring_emit() 71 ringbuf->tail += 4; intel_logical_ring_emit()
|
H A D | intel_ringbuffer.h | 105 u32 tail; member in struct:intel_ringbuffer 441 iowrite32(data, ringbuf->virtual_start + ringbuf->tail); intel_ring_emit() 442 ringbuf->tail += 4; intel_ring_emit() 447 ringbuf->tail &= ringbuf->size - 1; intel_ring_advance() 449 int __intel_ring_space(int head, int tail, int size); 474 return ringbuf->tail; intel_ring_get_tail()
|
/linux-4.4.14/drivers/dma/ioat/ |
H A D | dma.c | 134 "%s: head: %#x tail: %#x issued: %#x count: %#x\n", __ioat_issue_pending() 135 __func__, ioat_chan->head, ioat_chan->tail, __ioat_issue_pending() 175 "%s: head: %#x tail: %#x issued: %#x\n", __ioat_start_null_desc() 176 __func__, ioat_chan->head, ioat_chan->tail, ioat_chan->issued); __ioat_start_null_desc() 207 /* set the tail to be re-issued */ __ioat_restart_chan() 208 ioat_chan->issued = ioat_chan->tail; __ioat_restart_chan() 213 "%s: head: %#x tail: %#x issued: %#x count: %#x\n", __ioat_restart_chan() 214 __func__, ioat_chan->head, ioat_chan->tail, __ioat_restart_chan() 220 desc = ioat_get_ring_ent(ioat_chan, ioat_chan->tail); __ioat_restart_chan() 400 u16 curr_idx = (ioat_chan->tail+i) & (curr_size-1); reshape_ring() 401 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); reshape_ring() 409 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); reshape_ring() 414 u16 new_idx = (ioat_chan->tail+i) & reshape_ring() 427 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); reshape_ring() 442 u16 curr_idx = (ioat_chan->tail+i) & (curr_size-1); reshape_ring() 443 u16 new_idx = (ioat_chan->tail+i) & (new_size-1); reshape_ring() 453 ent = ioat_get_ring_ent(ioat_chan, ioat_chan->tail+i); reshape_ring() 458 hw = ring[(ioat_chan->tail+new_size-1) & (new_size-1)]->hw; reshape_ring() 459 next = ring[(ioat_chan->tail+new_size) & (new_size-1)]; reshape_ring() 492 ioat_chan->tail, ioat_chan->issued); 517 ioat_chan->tail, ioat_chan->issued); 629 int idx = ioat_chan->tail, i; __cleanup() 632 dev_dbg(to_dev(ioat_chan), "%s: head: %#x tail: %#x issued: %#x\n", __cleanup() 633 __func__, ioat_chan->head, ioat_chan->tail, ioat_chan->issued); __cleanup() 684 /* finish all descriptor reads before incrementing tail */ __cleanup() 686 ioat_chan->tail = idx + i; __cleanup() 755 /* cleanup so tail points to descriptor that caused the error */ ioat_eh() 765 desc = ioat_get_ring_ent(ioat_chan, ioat_chan->tail); ioat_eh()
|
/linux-4.4.14/scripts/ |
H A D | kernel-doc-xml-ref | 117 my $tail = ""; 120 $tail = $2; 122 return "<link linkend=\"$key\">$head</link>$tail"; 138 my ($head, $tail) = split_pointer($arg); 139 return "<link linkend=\"$key\">$head</link>$tail"; 161 my ($head, $tail) = split_pointer($type); 162 return "<link linkend=\"$keyname\">$head</link>$tail";
|
H A D | extract-ikconfig | 22 tail -c+$(($pos+8)) "$1" | zcat > $tmp1 2> /dev/null 36 tail -c+$pos "$img" | $3 > $tmp2 2> /dev/null
|
H A D | extract-vmlinux | 33 tail -c+$pos "$img" | $3 > $tmp 2> /dev/null
|
/linux-4.4.14/tools/testing/selftests/powerpc/pmu/ebb/ |
H A D | trace.c | 32 tb->tail = tb->data; trace_buffer_allocate() 66 p = tb->tail; trace_alloc() 67 newtail = tb->tail + bytes; trace_alloc() 71 tb->tail = newtail; trace_alloc() 277 printf(" tail %p\n", tb->tail); trace_buffer_print() 287 while (trace_check_bounds(tb, p) && p < tb->tail) { trace_buffer_print()
|
H A D | trace.h | 28 void *tail; member in struct:trace_buffer
|
/linux-4.4.14/arch/ia64/hp/sim/ |
H A D | simserial.c | 117 if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) { rs_put_char() 145 if (info->xmit.head == info->xmit.tail || tty->stopped) { transmit_chars() 147 printk("transmit_chars: head=%d, tail=%d, stopped=%d\n", transmit_chars() 148 info->xmit.head, info->xmit.tail, tty->stopped); transmit_chars() 156 * First from current to tail if possible. transmit_chars() 160 count = min(CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE), transmit_chars() 161 SERIAL_XMIT_SIZE - info->xmit.tail); transmit_chars() 162 console->write(console, info->xmit.buf+info->xmit.tail, count); transmit_chars() 164 info->xmit.tail = (info->xmit.tail+count) & (SERIAL_XMIT_SIZE-1); transmit_chars() 169 count = CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); transmit_chars() 172 info->xmit.tail += count; transmit_chars() 182 if (info->xmit.head == info->xmit.tail || tty->stopped || rs_flush_chars() 201 c = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); rs_write() 218 if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) && rs_write() 229 return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); rs_write_room() 236 return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); rs_chars_in_buffer() 245 info->xmit.head = info->xmit.tail = 0; rs_flush_buffer() 388 state->xmit.head = state->xmit.tail = 0; activate()
|
/linux-4.4.14/kernel/ |
H A D | softirq.c | 443 struct tasklet_struct **tail; member in struct:tasklet_head 455 *__this_cpu_read(tasklet_vec.tail) = t; __tasklet_schedule() 456 __this_cpu_write(tasklet_vec.tail, &(t->next)); __tasklet_schedule() 468 *__this_cpu_read(tasklet_hi_vec.tail) = t; __tasklet_hi_schedule() 469 __this_cpu_write(tasklet_hi_vec.tail, &(t->next)); __tasklet_hi_schedule() 492 __this_cpu_write(tasklet_vec.tail, this_cpu_ptr(&tasklet_vec.head)); tasklet_action() 514 *__this_cpu_read(tasklet_vec.tail) = t; tasklet_action() 515 __this_cpu_write(tasklet_vec.tail, &(t->next)); tasklet_action() 528 __this_cpu_write(tasklet_hi_vec.tail, this_cpu_ptr(&tasklet_hi_vec.head)); tasklet_hi_action() 550 *__this_cpu_read(tasklet_hi_vec.tail) = t; tasklet_hi_action() 551 __this_cpu_write(tasklet_hi_vec.tail, &(t->next)); tasklet_hi_action() 639 per_cpu(tasklet_vec, cpu).tail = for_each_possible_cpu() 641 per_cpu(tasklet_hi_vec, cpu).tail = for_each_possible_cpu() 694 /* If this was the tail element, move the tail ptr */ tasklet_kill_immediate() 696 per_cpu(tasklet_vec, cpu).tail = i; tasklet_kill_immediate() 709 if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) { takeover_tasklets() 710 *__this_cpu_read(tasklet_vec.tail) = per_cpu(tasklet_vec, cpu).head; takeover_tasklets() 711 this_cpu_write(tasklet_vec.tail, per_cpu(tasklet_vec, cpu).tail); takeover_tasklets() 713 per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head; takeover_tasklets() 717 if (&per_cpu(tasklet_hi_vec, cpu).head != per_cpu(tasklet_hi_vec, cpu).tail) { takeover_tasklets() 718 *__this_cpu_read(tasklet_hi_vec.tail) = per_cpu(tasklet_hi_vec, cpu).head; takeover_tasklets() 719 __this_cpu_write(tasklet_hi_vec.tail, per_cpu(tasklet_hi_vec, cpu).tail); takeover_tasklets() 721 per_cpu(tasklet_hi_vec, cpu).tail = &per_cpu(tasklet_hi_vec, cpu).head; takeover_tasklets()
|
/linux-4.4.14/fs/9p/ |
H A D | vfs_dir.c | 47 * @tail: end offset of current dirread buffer 56 int tail; member in struct:p9_rdir 133 if (rdir->tail == rdir->head) { v9fs_dir_readdir() 145 rdir->tail = n; v9fs_dir_readdir() 147 while (rdir->head < rdir->tail) { v9fs_dir_readdir() 150 rdir->tail - rdir->head, &st); v9fs_dir_readdir() 194 if (rdir->tail == rdir->head) { v9fs_dir_readdir_dotl() 201 rdir->tail = err; v9fs_dir_readdir_dotl() 204 while (rdir->head < rdir->tail) { v9fs_dir_readdir_dotl() 207 rdir->tail - rdir->head, v9fs_dir_readdir_dotl()
|
/linux-4.4.14/arch/arm64/crypto/ |
H A D | aes-ce-ccm-glue.c | 185 u32 tail = walk.nbytes % AES_BLOCK_SIZE; ccm_encrypt() local 188 tail = 0; ccm_encrypt() 191 walk.nbytes - tail, ctx->key_enc, ccm_encrypt() 194 len -= walk.nbytes - tail; ccm_encrypt() 195 err = blkcipher_walk_done(&desc, &walk, tail); ccm_encrypt() 250 u32 tail = walk.nbytes % AES_BLOCK_SIZE; ccm_decrypt() local 253 tail = 0; ccm_decrypt() 256 walk.nbytes - tail, ctx->key_enc, ccm_decrypt() 259 len -= walk.nbytes - tail; ccm_decrypt() 260 err = blkcipher_walk_done(&desc, &walk, tail); ccm_decrypt()
|
/linux-4.4.14/drivers/mfd/ |
H A D | pcf50633-adc.c | 88 int head, tail; adc_enqueue_request() local 93 tail = adc->queue_tail; adc_enqueue_request() 95 if (adc->queue[tail]) { adc_enqueue_request() 101 adc->queue[tail] = req; adc_enqueue_request() 102 if (head == tail) adc_enqueue_request() 104 adc->queue_tail = (tail + 1) & (PCF50633_MAX_ADC_FIFO_DEPTH - 1); adc_enqueue_request()
|
/linux-4.4.14/drivers/net/wireless/b43/ |
H A D | pio.c | 346 u8 *tail = wl->pio_tailspace; tx_write_2byte_queue() local 352 tail[0] = data[data_len - 1]; tx_write_2byte_queue() 353 tail[1] = 0; tx_write_2byte_queue() 354 b43_block_write(dev, tail, 2, tx_write_2byte_queue() 400 u8 *tail = wl->pio_tailspace; tx_write_4byte_queue() local 403 memset(tail, 0, 4); tx_write_4byte_queue() 410 tail[0] = data[data_len - 3]; tx_write_4byte_queue() 411 tail[1] = data[data_len - 2]; tx_write_4byte_queue() 412 tail[2] = data[data_len - 1]; tx_write_4byte_queue() 416 tail[0] = data[data_len - 2]; tx_write_4byte_queue() 417 tail[1] = data[data_len - 1]; tx_write_4byte_queue() 420 tail[0] = data[data_len - 1]; tx_write_4byte_queue() 424 b43_block_write(dev, tail, 4, tx_write_4byte_queue() 722 u8 *tail = wl->pio_tailspace; pio_rx_frame() local 726 b43_block_read(dev, tail, 4, pio_rx_frame() 731 skb->data[len + padding - 3] = tail[0]; pio_rx_frame() 732 skb->data[len + padding - 2] = tail[1]; pio_rx_frame() 733 skb->data[len + padding - 1] = tail[2]; pio_rx_frame() 736 skb->data[len + padding - 2] = tail[0]; pio_rx_frame() 737 skb->data[len + padding - 1] = tail[1]; pio_rx_frame() 740 skb->data[len + padding - 1] = tail[0]; pio_rx_frame() 749 u8 *tail = wl->pio_tailspace; pio_rx_frame() local 753 b43_block_read(dev, tail, 2, pio_rx_frame() 756 skb->data[len + padding - 1] = tail[0]; pio_rx_frame()
|
/linux-4.4.14/sound/core/seq/oss/ |
H A D | seq_oss_readq.c | 62 q->head = q->tail = 0; snd_seq_oss_readq_new() 91 q->head = q->tail = 0; snd_seq_oss_readq_clear() 135 memcpy(&q->q[q->tail], ev, sizeof(*ev)); snd_seq_oss_readq_put_event() 136 q->tail = (q->tail + 1) % q->maxlen; snd_seq_oss_readq_put_event() 168 (q->qlen > 0 || q->head == q->tail), snd_seq_oss_readq_wait()
|
H A D | seq_oss_readq.h | 35 int head, tail; member in struct:seq_oss_readq
|
/linux-4.4.14/drivers/input/serio/ |
H A D | serio_raw.c | 33 unsigned int tail, head; member in struct:serio_raw 149 empty = serio_raw->head == serio_raw->tail; serio_raw_fetch_byte() 151 *c = serio_raw->queue[serio_raw->tail]; serio_raw_fetch_byte() 152 serio_raw->tail = (serio_raw->tail + 1) % SERIO_RAW_QUEUE_LEN; serio_raw_fetch_byte() 173 if (serio_raw->head == serio_raw->tail && serio_raw_read() 191 serio_raw->head != serio_raw->tail || serio_raw_read() 251 if (serio_raw->head != serio_raw->tail) serio_raw_poll() 283 if (likely(head != serio_raw->tail)) { serio_raw_interrupt()
|
H A D | userio.c | 42 u8 tail; member in struct:userio_device 65 if (userio->head == userio->tail) userio_device_write() 141 userio->tail, userio_char_read() 145 memcpy(buf, &userio->buf[userio->tail], copylen); userio_char_read() 146 userio->tail = (userio->tail + copylen) % userio_char_read() 167 userio->head != userio->tail); userio_char_read() 257 if (userio->head != userio->tail) userio_char_poll()
|
H A D | sa1111ps2.c | 53 unsigned int tail; member in struct:ps2if 98 if (ps2if->head == ps2if->tail) { ps2_txint() 102 sa1111_writel(ps2if->buf[ps2if->tail], ps2if->base + PS2DATA); ps2_txint() 103 ps2if->tail = (ps2if->tail + 1) & (sizeof(ps2if->buf) - 1); ps2_txint() 128 if (ps2if->head == ps2if->tail) ps2_write() 131 if (head != ps2if->tail) { ps2_write()
|
/linux-4.4.14/drivers/acpi/ |
H A D | utils.c | 63 u8 *tail = NULL; acpi_extract_package() local 193 tail = buffer->pointer + tail_offset; acpi_extract_package() 218 *pointer = tail; acpi_extract_package() 219 *((u64 *) tail) = acpi_extract_package() 222 tail += sizeof(u64); acpi_extract_package() 224 *tail = (char)0; acpi_extract_package() 225 tail += sizeof(char); acpi_extract_package() 238 *pointer = tail; acpi_extract_package() 239 memcpy(tail, element->string.pointer, acpi_extract_package() 242 tail += element->string.length * sizeof(char); acpi_extract_package() 244 *tail = (char)0; acpi_extract_package() 245 tail += sizeof(char); acpi_extract_package() 249 *pointer = tail; acpi_extract_package() 250 memcpy(tail, element->buffer.pointer, acpi_extract_package() 253 tail += element->buffer.length; acpi_extract_package()
|
/linux-4.4.14/drivers/gpu/drm/mga/ |
H A D | mga_dma.c | 84 primary->tail = 0; mga_do_dma_reset() 106 u32 head, tail; mga_do_dma_flush() local 120 if (primary->tail == primary->last_flush) { mga_do_dma_flush() 125 tail = primary->tail + dev_priv->primary->offset; mga_do_dma_flush() 139 primary->last_flush = primary->tail; mga_do_dma_flush() 143 if (head <= tail) mga_do_dma_flush() 144 primary->space = primary->size - primary->tail; mga_do_dma_flush() 146 primary->space = head - tail; mga_do_dma_flush() 149 DRM_DEBUG(" tail = 0x%06lx\n", (unsigned long)(tail - dev_priv->primary->offset)); mga_do_dma_flush() 153 MGA_WRITE(MGA_PRIMEND, tail | dev_priv->dma_access); mga_do_dma_flush() 161 u32 head, tail; mga_do_dma_wrap_start() local 173 tail = primary->tail + dev_priv->primary->offset; mga_do_dma_wrap_start() 175 primary->tail = 0; mga_do_dma_wrap_start() 187 DRM_DEBUG(" tail = 0x%06x\n", primary->tail); mga_do_dma_wrap_start() 192 MGA_WRITE(MGA_PRIMEND, tail | dev_priv->dma_access); mga_do_dma_wrap_start() 275 dev_priv->tail = entry; mga_freelist_init() 301 dev_priv->head = dev_priv->tail = NULL; mga_freelist_cleanup() 327 drm_mga_freelist_t *tail = dev_priv->tail; mga_freelist_get() local 334 DRM_DEBUG(" tail=0x%06lx %d\n", mga_freelist_get() 335 tail->age.head ? mga_freelist_get() 336 (unsigned long)(tail->age.head - dev_priv->primary->offset) : 0, mga_freelist_get() 337 tail->age.wrap); mga_freelist_get() 341 if (TEST_AGE(&tail->age, head, wrap)) { mga_freelist_get() 342 prev = dev_priv->tail->prev; mga_freelist_get() 343 next = dev_priv->tail; mga_freelist_get() 346 dev_priv->tail = prev; mga_freelist_get() 371 prev = dev_priv->tail; mga_freelist_put() 899 dev_priv->prim.tail = 0; mga_do_init_dma()
|
H A D | mga_drv.h | 54 u32 tail; member in struct:drm_mga_primary_buffer 84 drm_mga_freelist_t *tail; member in struct:drm_mga_private 273 write = dev_priv->prim.tail; \ 283 write = dev_priv->prim.tail; \ 288 dev_priv->prim.tail = write; \ 290 DRM_INFO("ADVANCE_DMA() tail=0x%05x sp=0x%x\n", \ 298 DRM_INFO(" tail=0x%06x head=0x%06lx\n", \ 299 dev_priv->prim.tail, \ 351 entry->age.head = (dev_priv->prim.tail + \
|
/linux-4.4.14/drivers/s390/block/ |
H A D | dasd_eer.c | 91 int tail; member in struct:eerbuffer 105 if (eerb->head < eerb->tail) dasd_eer_get_free_bytes() 106 return eerb->tail - eerb->head - 1; dasd_eer_get_free_bytes() 107 return eerb->buffersize - eerb->head + eerb->tail -1; dasd_eer_get_free_bytes() 117 if (eerb->head >= eerb->tail) dasd_eer_get_filled_bytes() 118 return eerb->head - eerb->tail; dasd_eer_get_filled_bytes() 119 return eerb->buffersize - eerb->tail + eerb->head; dasd_eer_get_filled_bytes() 166 tailindex = eerb->tail / PAGE_SIZE; dasd_eer_read_buffer() 167 localtail = eerb->tail % PAGE_SIZE; dasd_eer_read_buffer() 172 eerb->tail += len; dasd_eer_read_buffer() 173 if (eerb->tail == eerb->buffersize) dasd_eer_read_buffer() 174 eerb->tail = 0; /* wrap around */ dasd_eer_read_buffer() 175 BUG_ON(eerb->tail > eerb->buffersize); dasd_eer_read_buffer() 195 eerb->tail += eerb->residual; dasd_eer_start_record() 196 if (eerb->tail >= eerb->buffersize) dasd_eer_start_record() 197 eerb->tail -= eerb->buffersize; dasd_eer_start_record() 202 eerb->tail += tailcount; dasd_eer_start_record() 203 if (eerb->tail >= eerb->buffersize) dasd_eer_start_record() 204 eerb->tail -= eerb->buffersize; dasd_eer_start_record() 623 eerb->head != eerb->tail); dasd_eer_read() 659 if (eerb->head != eerb->tail) dasd_eer_poll()
|
/linux-4.4.14/drivers/soc/qcom/ |
H A D | smd.c | 224 __le32 tail; member in struct:smd_channel_info 246 __le32 tail; member in struct:smd_channel_info_word 372 SET_TX_CHANNEL_INFO(channel, tail, 0); qcom_smd_channel_reset() 386 unsigned tail; qcom_smd_channel_get_rx_avail() local 389 tail = GET_RX_CHANNEL_INFO(channel, tail); qcom_smd_channel_get_rx_avail() 391 return (head - tail) & (channel->fifo_size - 1); qcom_smd_channel_get_rx_avail() 456 * tail. 462 unsigned tail; qcom_smd_channel_peek() local 466 tail = GET_RX_CHANNEL_INFO(channel, tail); qcom_smd_channel_peek() 468 len = min_t(size_t, count, channel->fifo_size - tail); qcom_smd_channel_peek() 471 channel->rx_fifo + tail, qcom_smd_channel_peek() 487 * Advance the rx tail by count bytes. 492 unsigned tail; qcom_smd_channel_advance() local 494 tail = GET_RX_CHANNEL_INFO(channel, tail); qcom_smd_channel_advance() 495 tail += count; qcom_smd_channel_advance() 496 tail &= (channel->fifo_size - 1); qcom_smd_channel_advance() 497 SET_RX_CHANNEL_INFO(channel, tail, tail); qcom_smd_channel_advance() 506 unsigned tail; qcom_smd_channel_recv_single() local 514 tail = GET_RX_CHANNEL_INFO(channel, tail); qcom_smd_channel_recv_single() 517 if (tail + channel->pkt_size >= channel->fifo_size) { qcom_smd_channel_recv_single() 521 ptr = channel->rx_fifo + tail; qcom_smd_channel_recv_single() 529 /* Only forward the tail if the client consumed the data */ qcom_smd_channel_recv_single() 585 /* Indicate that we have seen and updated tail */ qcom_smd_channel_intr() 660 unsigned tail; qcom_smd_get_tx_avail() local 664 tail = GET_TX_CHANNEL_INFO(channel, tail); qcom_smd_get_tx_avail() 666 return mask - ((head - tail) & mask); qcom_smd_get_tx_avail()
|
/linux-4.4.14/drivers/crypto/qat/qat_common/ |
H A D | adf_transport_debug.c | 92 int head, tail, empty; adf_ring_show() local 96 tail = READ_CSR_RING_TAIL(csr, bank->bank_number, adf_ring_show() 105 seq_printf(sfile, "head %x, tail %x, empty: %d\n", adf_ring_show() 106 head, tail, (empty & 1 << ring->ring_number) adf_ring_show() 215 int head, tail, empty; adf_bank_show() local 222 tail = READ_CSR_RING_TAIL(csr, bank->bank_number, adf_bank_show() 227 "ring num %02d, head %04x, tail %04x, empty: %d\n", adf_bank_show() 228 ring->ring_number, head, tail, adf_bank_show()
|
/linux-4.4.14/drivers/gpu/drm/msm/ |
H A D | msm_rd.c | 20 * tail -f /sys/kernel/debug/dri/<minor>/rd > logfile.rd 64 (CIRC_CNT((circ)->head, (circ)->tail, BUF_SZ)) 66 (CIRC_CNT_TO_END((circ)->head, (circ)->tail, BUF_SZ)) 69 (CIRC_SPACE((circ)->head, (circ)->tail, BUF_SZ)) 71 (CIRC_SPACE_TO_END((circ)->head, (circ)->tail, BUF_SZ)) 132 const char *fptr = &fifo->buf[fifo->tail]; rd_read() 147 fifo->tail = (fifo->tail + n) & (BUF_SZ - 1); rd_read()
|
/linux-4.4.14/arch/powerpc/lib/ |
H A D | vmx-helper.c | 44 * This function must return 0 because we tail call optimise when calling 67 * All calls to this function will be optimised into tail calls. We are
|
/linux-4.4.14/drivers/staging/unisys/visorbus/ |
H A D | visorchannel.c | 47 spinlock_t remove_lock; /* protect tail writes in chan_hdr */ 398 if (sig_hdr.head == sig_hdr.tail) signalremove_inner() 401 sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots; signalremove_inner() 402 if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) signalremove_inner() 410 if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail)) signalremove_inner() 447 if (sig_hdr.head == sig_hdr.tail) visorchannel_signalempty() 465 if (sig_hdr.head == sig_hdr.tail) { signalinsert_inner() 516 u32 head, tail; visorchannel_signalqueue_slots_avail() local 521 tail = sig_hdr.tail; visorchannel_signalqueue_slots_avail() 522 if (head < tail) visorchannel_signalqueue_slots_avail() 524 slots_used = (head - tail); visorchannel_signalqueue_slots_avail() 562 seq_printf(seq, " Tail = %lu\n", (ulong)q->tail); sigqueue_debug()
|
/linux-4.4.14/drivers/tty/serial/jsm/ |
H A D | jsm_tty.c | 528 u16 tail; jsm_input() local 558 tail = ch->ch_r_tail & rmask; jsm_input() 560 data_len = (head - tail) & rmask; jsm_input() 578 ch->ch_r_head = tail; jsm_input() 593 "Port %d throttled, not reading any data. head: %x tail: %x\n", jsm_input() 594 ch->ch_portnum, head, tail); jsm_input() 609 s = ((head >= tail) ? head : RQUEUESIZE) - tail; jsm_input() 628 if (*(ch->ch_equeue +tail +i) & UART_LSR_BI) jsm_input() 629 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK); jsm_input() 630 else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE) jsm_input() 631 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY); jsm_input() 632 else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE) jsm_input() 633 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME); jsm_input() 635 tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL); jsm_input() 638 tty_insert_flip_string(port, ch->ch_rqueue + tail, s); jsm_input() 640 tail += s; jsm_input() 643 tail &= rmask; jsm_input() 646 ch->ch_r_tail = tail & rmask; jsm_input() 647 ch->ch_e_tail = tail & rmask; jsm_input()
|
H A D | jsm_neo.c | 292 u16 tail; neo_copy_data_from_uart_to_queue() local 297 /* cache head and tail of queue */ neo_copy_data_from_uart_to_queue() 299 tail = ch->ch_r_tail & RQUEUEMASK; neo_copy_data_from_uart_to_queue() 306 if ((qleft = tail - head - 1) < 0) neo_copy_data_from_uart_to_queue() 455 ch->ch_rqueue[tail], ch->ch_equeue[tail]); neo_copy_data_from_uart_to_queue() 457 ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK; neo_copy_data_from_uart_to_queue() 489 u16 tail; neo_copy_data_from_queue_to_uart() local 518 writeb(circ->buf[circ->tail], &ch->ch_neo_uart->txrx); neo_copy_data_from_queue_to_uart() 520 "Tx data: %x\n", circ->buf[circ->tail]); neo_copy_data_from_queue_to_uart() 521 circ->tail = (circ->tail + 1) & (UART_XMIT_SIZE - 1); neo_copy_data_from_queue_to_uart() 535 /* cache head and tail of queue */ neo_copy_data_from_queue_to_uart() 537 tail = circ->tail & (UART_XMIT_SIZE - 1); neo_copy_data_from_queue_to_uart() 545 s = ((head >= tail) ? head : UART_XMIT_SIZE) - tail; neo_copy_data_from_queue_to_uart() 551 memcpy_toio(&ch->ch_neo_uart->txrxburst, circ->buf + tail, s); neo_copy_data_from_queue_to_uart() 553 tail = (tail + s) & (UART_XMIT_SIZE - 1); neo_copy_data_from_queue_to_uart() 559 /* Update the final tail */ neo_copy_data_from_queue_to_uart() 560 circ->tail = tail & (UART_XMIT_SIZE - 1); neo_copy_data_from_queue_to_uart()
|
H A D | jsm_cls.c | 365 u16 tail; cls_copy_data_from_uart_to_queue() local 373 /* cache head and tail of queue */ cls_copy_data_from_uart_to_queue() 375 tail = ch->ch_r_tail & RQUEUEMASK; cls_copy_data_from_uart_to_queue() 382 qleft = tail - head - 1; cls_copy_data_from_uart_to_queue() 425 tail = (tail + 1) & RQUEUEMASK; cls_copy_data_from_uart_to_queue() 426 ch->ch_r_tail = tail; cls_copy_data_from_uart_to_queue() 460 u16 tail; cls_copy_data_from_queue_to_uart() local 485 /* cache tail of queue */ cls_copy_data_from_queue_to_uart() 486 tail = circ->tail & (UART_XMIT_SIZE - 1); cls_copy_data_from_queue_to_uart() 493 writeb(circ->buf[tail], &ch->ch_cls_uart->txrx); cls_copy_data_from_queue_to_uart() 494 tail = (tail + 1) & (UART_XMIT_SIZE - 1); cls_copy_data_from_queue_to_uart() 500 /* Update the final tail */ cls_copy_data_from_queue_to_uart() 501 circ->tail = tail & (UART_XMIT_SIZE - 1); cls_copy_data_from_queue_to_uart()
|
/linux-4.4.14/arch/x86/platform/geode/ |
H A D | alix.c | 132 const char *tail; alix_present() local 150 tail = p + alix_sig_len; alix_present() 151 if ((tail[0] == '2' || tail[0] == '3' || tail[0] == '6')) { alix_present()
|
/linux-4.4.14/fs/ |
H A D | aio.c | 57 unsigned tail; member in struct:aio_ring 148 unsigned tail; member in struct:kioctx::__anon11342 446 /* Compensate for the ring buffer's head/tail overlap entry */ aio_setup_ring() 518 ring->head = ring->tail = 0; aio_setup_ring() 939 unsigned tail) refill_reqs_available() 945 if (head <= tail) refill_reqs_available() 946 events_in_ring = tail - head; refill_reqs_available() 948 events_in_ring = ctx->nr_events - (head - tail); refill_reqs_available() 977 * part is that head cannot pass tail since we prevent user_refill_reqs_available() 978 * aio_complete() from updating tail by holding user_refill_reqs_available() 987 refill_reqs_available(ctx, head, ctx->tail); user_refill_reqs_available() 1065 unsigned tail, pos, head; aio_complete() local 1087 * ctx->completion_lock to prevent other code from messing with the tail aio_complete() 1092 tail = ctx->tail; aio_complete() 1093 pos = tail + AIO_EVENTS_OFFSET; aio_complete() 1095 if (++tail >= ctx->nr_events) aio_complete() 1096 tail = 0; aio_complete() 1110 ctx, tail, iocb, iocb->ki_user_iocb, iocb->ki_user_data, aio_complete() 1116 smp_wmb(); /* make event visible before updating tail */ aio_complete() 1118 ctx->tail = tail; aio_complete() 1122 ring->tail = tail; aio_complete() 1128 refill_reqs_available(ctx, head, tail); aio_complete() 1131 pr_debug("added to ring %p at [%u]\n", iocb, tail); aio_complete() 1145 * We have to order our ring_info tail store above and test aio_complete() 1166 unsigned head, tail, pos; aio_read_events_ring() local 1182 tail = ring->tail; aio_read_events_ring() 1186 * Ensure that once we've read the current tail pointer, that aio_read_events_ring() 1187 * we also see the events that were stored up to the tail. aio_read_events_ring() 1191 pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events); aio_read_events_ring() 1193 if (head == tail) aio_read_events_ring() 1197 tail %= ctx->nr_events; aio_read_events_ring() 1204 avail = (head <= tail ? tail : ctx->nr_events) - head; aio_read_events_ring() 1205 if (head == tail) aio_read_events_ring() 1236 pr_debug("%li h%u t%u\n", ret, head, tail); aio_read_events_ring() 938 refill_reqs_available(struct kioctx *ctx, unsigned head, unsigned tail) refill_reqs_available() argument
|
/linux-4.4.14/drivers/net/ethernet/apm/xgene/ |
H A D | xgene_enet_main.c | 58 u32 tail = buf_pool->tail; xgene_enet_refill_bufpool() local 70 raw_desc = &buf_pool->raw_desc16[tail]; xgene_enet_refill_bufpool() 75 buf_pool->rx_skb[tail] = skb; xgene_enet_refill_bufpool() 87 tail = (tail + 1) & slots; xgene_enet_refill_bufpool() 91 buf_pool->tail = tail; xgene_enet_refill_bufpool() 115 u32 tail = buf_pool->tail; xgene_enet_delete_bufpool() local 121 tail = (tail - 1) & slots; xgene_enet_delete_bufpool() 122 raw_desc = &buf_pool->raw_desc16[tail]; xgene_enet_delete_bufpool() 130 buf_pool->tail = tail; xgene_enet_delete_bufpool() 285 return &ring->cp_ring->frag_dma_addr[ring->tail * MAX_SKB_FRAGS]; xgene_get_frag_dma_array() 297 u16 tail = tx_ring->tail; xgene_enet_setup_tx_desc() local 305 raw_desc = &tx_ring->raw_desc[tail]; xgene_enet_setup_tx_desc() 306 tail = (tail + 1) & (tx_ring->slots - 1); xgene_enet_setup_tx_desc() 334 exp_desc = (void *)&tx_ring->raw_desc[tail]; xgene_enet_setup_tx_desc() 335 tail = (tail + 1) & (tx_ring->slots - 1); xgene_enet_setup_tx_desc() 421 SET_VAL(USERINFO, tx_ring->tail)); xgene_enet_setup_tx_desc() 422 tx_ring->cp_ring->cp_skb[tx_ring->tail] = skb; xgene_enet_setup_tx_desc() 424 tx_ring->tail = tail; xgene_enet_setup_tx_desc()
|
/linux-4.4.14/net/ipv4/ |
H A D | tcp_probe.c | 82 unsigned long head, tail; member in struct:__anon14961 88 return (tcp_probe.head - tcp_probe.tail) & (bufsize - 1); tcp_probe_used() 179 tcp_probe.head = tcp_probe.tail = 0; tcpprobe_open() 189 = tcp_probe.log + tcp_probe.tail; tcpprobe_sprint() 221 if (tcp_probe.head == tcp_probe.tail) { tcpprobe_read() 230 tcp_probe.tail = (tcp_probe.tail + 1) & (bufsize - 1); tcpprobe_read()
|
H A D | tcp_cdg.c | 82 u8 tail; member in struct:cdg 195 ca->gsum.min += gmin - ca->gradients[ca->tail].min; tcp_cdg_grad() 196 ca->gsum.max += gmax - ca->gradients[ca->tail].max; tcp_cdg_grad() 197 ca->gradients[ca->tail].min = gmin; tcp_cdg_grad() 198 ca->gradients[ca->tail].max = gmax; tcp_cdg_grad() 199 ca->tail = (ca->tail + 1) & (window - 1); tcp_cdg_grad() 216 else if (ca->tail == 0) tcp_cdg_grad() 219 grad = (grad * window) / (int)ca->tail; tcp_cdg_grad()
|
/linux-4.4.14/net/core/ |
H A D | gen_stats.c | 70 d->tail = (struct nlattr *)skb_tail_pointer(skb); __acquires() 75 if (d->tail) __acquires() 165 if (d->tail) { gnet_stats_copy_basic() 209 if (d->tail) { gnet_stats_copy_rate_est() 286 if (d->tail) gnet_stats_copy_queue() 317 if (d->tail) gnet_stats_copy_app() 344 if (d->tail) gnet_stats_finish_copy() 345 d->tail->nla_len = skb_tail_pointer(d->skb) - (u8 *)d->tail; gnet_stats_finish_copy()
|
H A D | skbuff.c | 100 pr_emerg("%s: text:%p len:%d put:%d head:%p data:%p tail:%#lx end:%#lx dev:%s\n", skb_panic() 102 (unsigned long)skb->tail, (unsigned long)skb->end, skb_panic() 173 * the tail pointer in struct sk_buff! __alloc_skb_head() 175 memset(skb, 0, offsetof(struct sk_buff, tail)); __alloc_skb_head() 196 * tail room of at least size bytes. The object has a reference count 243 * the tail pointer in struct sk_buff! __alloc_skb() 245 memset(skb, 0, offsetof(struct sk_buff, tail)); __alloc_skb() 253 skb->end = skb->tail + size; __alloc_skb() 298 * MUST add room at tail (SKB_DATA_ALIGN(skb_shared_info)) 315 memset(skb, 0, offsetof(struct sk_buff, tail)); __build_skb() 321 skb->end = skb->tail + size; __build_skb() 831 C(tail); __skb_clone() 973 /* {transport,network,mac}_header and tail are relative to skb->head */ skb_headers_offset_update() 1028 /* Set the tail pointer and length */ skb_copy() 1068 /* Set the tail pointer and length */ __pskb_copy_fclone() 1107 * @ntail: room to add at tail 1181 skb->tail += off; pskb_expand_head() 1221 * @newtailroom: new free bytes at tail 1253 /* Set the tail pointer and length */ skb_copy_expand() 1277 * skb_pad - zero pad the tail of an skb 1299 ntail = skb->data_len + pad - (skb->end - skb->tail); skb_pad() 1323 * pskb_put - add data to the tail of a potentially fragmented buffer 1325 * @tail: tail fragment of the buffer to use 1329 * fragmented buffer. @tail must be the last fragment of @skb -- or 1335 unsigned char *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len) pskb_put() argument 1337 if (tail != skb) { pskb_put() 1341 return skb_put(tail, len); pskb_put() 1358 skb->tail += len; skb_put() 1360 if (unlikely(skb->tail > skb->end)) skb_put() 1406 * Cut the length of a buffer down by removing data from the tail. If 1504 * __pskb_pull_tail - advance tail of skb header 1506 * @delta: number of bytes to advance tail 1509 * it expands header moving its tail forward and copying necessary 1515 * or value of new tail of skb in the case of success. 1521 /* Moves tail of skb head forward, copying data from fragmented part, 1530 /* If skb has not enough free space at tail, get new one __pskb_pull_tail() 1532 * room at tail, reallocate without expansion only if skb is cloned. __pskb_pull_tail() 1534 int i, k, eat = (skb->tail + delta) - skb->end; __pskb_pull_tail() 1638 skb->tail += delta; __pskb_pull_tail() 2343 * skb_dequeue_tail - remove from the tail of the queue 2346 * Remove the tail of the list. The list lock is taken so the function 2347 * may be used safely with other locking list functions. The tail item is 2400 * skb_queue_tail - queue a buffer at the list tail 2404 * Queue a buffer at the tail of the list. This function takes the 2573 * @tgt: buffer into which tail data gets added 3003 struct sk_buff *tail = NULL; skb_segment() local 3104 tail->next = nskb; skb_segment() 3107 tail = nskb; skb_segment() 3206 segs->prev = tail; skb_segment() 3213 swap(tail->truesize, head_skb->truesize); skb_segment() 3214 swap(tail->destructor, head_skb->destructor); skb_segment() 3215 swap(tail->sk, head_skb->sk); skb_segment()
|
/linux-4.4.14/drivers/usb/host/ |
H A D | uhci-debug.c | 145 goto tail; uhci_show_urbp() 160 tail: uhci_show_urbp() 216 goto tail; uhci_show_qh() 233 goto tail; uhci_show_qh() 251 goto tail; uhci_show_qh() 257 tail: uhci_show_qh() 395 goto tail; uhci_sprint_schedule() 408 goto tail; uhci_sprint_schedule() 448 goto tail; uhci_sprint_schedule() 489 goto tail; uhci_sprint_schedule() 515 goto tail; uhci_sprint_schedule() 544 tail: uhci_sprint_schedule()
|
/linux-4.4.14/drivers/ptp/ |
H A D | ptp_private.h | 37 int tail; member in struct:timestamp_event_queue 63 * that a writer might concurrently increment the tail does not 68 int cnt = q->tail - q->head; queue_cnt()
|
/linux-4.4.14/drivers/hid/ |
H A D | hidraw.c | 55 if (list->head == list->tail) { hidraw_read() 59 while (list->head == list->tail) { hidraw_read() 87 len = list->buffer[list->tail].len > count ? hidraw_read() 88 count : list->buffer[list->tail].len; hidraw_read() 90 if (list->buffer[list->tail].value) { hidraw_read() 91 if (copy_to_user(buffer, list->buffer[list->tail].value, len)) { hidraw_read() 98 kfree(list->buffer[list->tail].value); hidraw_read() 99 list->buffer[list->tail].value = NULL; hidraw_read() 100 list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1); hidraw_read() 262 if (list->head != list->tail) hidraw_poll() 496 if (new_head == list->tail) hidraw_report_event()
|
H A D | uhid.c | 44 __u8 tail; member in struct:uhid_device 64 if (newhead != uhid->tail) { uhid_queue() 651 if (uhid->head == uhid->tail) uhid_char_read() 655 uhid->head != uhid->tail); uhid_char_read() 664 if (uhid->head == uhid->tail) { uhid_char_read() 669 if (copy_to_user(buffer, uhid->outq[uhid->tail], len)) { uhid_char_read() 672 kfree(uhid->outq[uhid->tail]); uhid_char_read() 673 uhid->outq[uhid->tail] = NULL; uhid_char_read() 676 uhid->tail = (uhid->tail + 1) % UHID_BUFSIZE; uhid_char_read() 746 if (uhid->head != uhid->tail) uhid_char_poll()
|
/linux-4.4.14/drivers/gpu/drm/r128/ |
H A D | r128_drv.h | 74 u32 tail; member in struct:drm_r128_ring_buffer 90 drm_r128_freelist_t *tail; member in struct:drm_r128_private 419 ring->space = (GET_RING_HEAD(dev_priv) - ring->tail) * sizeof(u32); r128_update_ring_snapshot() 488 write = dev_priv->ring.tail; \ 501 DRM_INFO("ADVANCE_RING() wr=0x%06x tail=0x%06x\n", \ 502 write, dev_priv->ring.tail); \ 507 if (((dev_priv->ring.tail + _nr) & tail_mask) != write) \ 510 ((dev_priv->ring.tail + _nr) & tail_mask), \ 513 dev_priv->ring.tail = write; \ 518 DRM_INFO("COMMIT_RING() tail=0x%06x\n", \ 519 dev_priv->ring.tail); \ 521 R128_WRITE(R128_PM4_BUFFER_DL_WPTR, dev_priv->ring.tail); \
|
/linux-4.4.14/arch/sparc/kernel/ |
H A D | signal_32.c | 231 void __user *tail; setup_frame() local 252 tail = sf + 1; setup_frame() 260 __siginfo_fpu_t __user *fp = tail; setup_frame() 261 tail += sizeof(*fp); setup_frame() 268 __siginfo_rwin_t __user *rwp = tail; setup_frame() 269 tail += sizeof(*rwp); setup_frame() 326 void __user *tail; setup_rt_frame() local 344 tail = sf + 1; setup_rt_frame() 356 __siginfo_fpu_t __user *fp = tail; setup_rt_frame() 357 tail += sizeof(*fp); setup_rt_frame() 364 __siginfo_rwin_t __user *rwp = tail; setup_rt_frame() 365 tail += sizeof(*rwp); setup_rt_frame()
|
H A D | signal32.c | 423 void __user *tail; setup_frame32() local 448 tail = (sf + 1); setup_frame32() 473 __siginfo_fpu_t __user *fp = tail; setup_frame32() 474 tail += sizeof(*fp); setup_frame32() 481 __siginfo_rwin_t __user *rwp = tail; setup_frame32() 482 tail += sizeof(*rwp); setup_frame32() 554 void __user *tail; setup_rt_frame32() local 579 tail = (sf + 1); setup_rt_frame32() 604 __siginfo_fpu_t __user *fp = tail; setup_rt_frame32() 605 tail += sizeof(*fp); setup_rt_frame32() 612 __siginfo_rwin_t __user *rwp = tail; setup_rt_frame32() 613 tail += sizeof(*rwp); setup_rt_frame32()
|
H A D | sun4v_ivec.S | 14 /* Head offset in %g2, tail offset in %g4. 64 /* Head offset in %g2, tail offset in %g4. */ 122 /* Head offset in %g2, tail offset in %g4. */ 211 * the head equal to the tail. We'll just trap again otherwise. 233 /* Head offset in %g2, tail offset in %g4. */ 322 * the head equal to the tail. We'll just trap again otherwise.
|
/linux-4.4.14/drivers/isdn/gigaset/ |
H A D | ser-gigaset.c | 671 unsigned tail, head, n; gigaset_tty_receive() local 683 tail = inbuf->tail; gigaset_tty_receive() 686 head, tail, count); gigaset_tty_receive() 688 if (head <= tail) { gigaset_tty_receive() 690 n = min_t(unsigned, count, RBUFSIZE - tail); gigaset_tty_receive() 691 memcpy(inbuf->data + tail, buf, n); gigaset_tty_receive() 692 tail = (tail + n) % RBUFSIZE; gigaset_tty_receive() 698 /* tail < head and some data left */ gigaset_tty_receive() 699 n = head - tail - 1; gigaset_tty_receive() 706 memcpy(inbuf->data + tail, buf, count); gigaset_tty_receive() 707 tail += count; gigaset_tty_receive() 710 gig_dbg(DEBUG_INTR, "setting tail to %u", tail); gigaset_tty_receive() 711 inbuf->tail = tail; gigaset_tty_receive()
|
H A D | common.c | 299 unsigned head, tail; clear_events() local 305 tail = cs->ev_tail; clear_events() 307 while (tail != head) { clear_events() 313 cs->ev_head = tail; clear_events() 337 unsigned next, tail; gigaset_add_event() local 344 tail = cs->ev_tail; gigaset_add_event() 345 next = (tail + 1) % MAX_EVENTS; gigaset_add_event() 349 event = cs->events + tail; gigaset_add_event() 553 inbuf->tail = 0; gigaset_inbuf_init() 569 unsigned n, head, tail, bytesleft; gigaset_fill_inbuf() local 577 tail = inbuf->tail; gigaset_fill_inbuf() 579 gig_dbg(DEBUG_INTR, "buffer state: %u -> %u", head, tail); gigaset_fill_inbuf() 582 if (head > tail) gigaset_fill_inbuf() 583 n = head - 1 - tail; gigaset_fill_inbuf() 585 n = (RBUFSIZE - 1) - tail; gigaset_fill_inbuf() 587 n = RBUFSIZE - tail; gigaset_fill_inbuf() 596 memcpy(inbuf->data + tail, src, n); gigaset_fill_inbuf() 598 tail = (tail + n) % RBUFSIZE; gigaset_fill_inbuf() 601 gig_dbg(DEBUG_INTR, "setting tail to %u", tail); gigaset_fill_inbuf() 602 inbuf->tail = tail; gigaset_fill_inbuf() 836 cs->inbuf->tail = 0; cleanup_cs()
|
/linux-4.4.14/drivers/tty/serial/ |
H A D | bfin_uart.c | 157 xmit->tail = (xmit->tail + uart->tx_count) & (UART_XMIT_SIZE - 1); bfin_serial_stop_tx() 341 while ((UART_GET_LSR(uart) & THRE) && xmit->tail != xmit->head) { bfin_serial_tx_chars() 342 UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); bfin_serial_tx_chars() 343 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); bfin_serial_tx_chars() 393 uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE); bfin_serial_dma_tx_chars() 394 if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail)) bfin_serial_dma_tx_chars() 395 uart->tx_count = UART_XMIT_SIZE - xmit->tail; bfin_serial_dma_tx_chars() 396 blackfin_dcache_flush_range((unsigned long)(xmit->buf+xmit->tail), bfin_serial_dma_tx_chars() 397 (unsigned long)(xmit->buf+xmit->tail+uart->tx_count)); bfin_serial_dma_tx_chars() 404 set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail)); bfin_serial_dma_tx_chars() 421 CIRC_CNT(uart->rx_dma_buf.head, uart->rx_dma_buf.tail, bfin_serial_dma_rx_chars() 448 for (i = uart->rx_dma_buf.tail; ; i++) { bfin_serial_dma_rx_chars() 476 * be smaller than current buffer tail, which cause garbages bfin_serial_rx_dma_timeout() 490 * current buffer tail and small. bfin_serial_rx_dma_timeout() 492 if (pos > uart->rx_dma_buf.tail || bfin_serial_rx_dma_timeout() 493 uart->rx_dma_nrows < (uart->rx_dma_buf.tail/DMA_RX_XCOUNT)) { bfin_serial_rx_dma_timeout() 496 uart->rx_dma_buf.tail = uart->rx_dma_buf.head; bfin_serial_rx_dma_timeout() 521 if (!(xmit->tail == 0 && xmit->head == 0)) { bfin_serial_dma_tx_int() 522 xmit->tail = (xmit->tail + uart->tx_count) & (UART_XMIT_SIZE - 1); bfin_serial_dma_tx_int() 552 if (pos > uart->rx_dma_buf.tail || bfin_serial_dma_rx_int() 553 uart->rx_dma_nrows < (uart->rx_dma_buf.tail/DMA_RX_XCOUNT)) { bfin_serial_dma_rx_int() 556 uart->rx_dma_buf.tail = uart->rx_dma_buf.head; bfin_serial_dma_rx_int() 615 uart->rx_dma_buf.tail = 0; bfin_serial_startup()
|
H A D | sunhv.c | 48 long status = sun4v_con_putchar(xmit->buf[xmit->tail]); transmit_chars_putchar() 53 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); transmit_chars_putchar() 61 unsigned long ra = __pa(xmit->buf + xmit->tail); transmit_chars_write() 64 len = CIRC_CNT_TO_END(xmit->head, xmit->tail, transmit_chars_write() 69 xmit->tail = (xmit->tail + sent) & (UART_XMIT_SIZE - 1); transmit_chars_write()
|
H A D | sn_console.c | 530 int xmit_count, tail, head, loops, ii; sn_transmit_chars() local 558 tail = xmit->tail; sn_transmit_chars() 559 start = &xmit->buf[tail]; sn_transmit_chars() 561 /* twice around gets the tail to the end of the buffer and sn_transmit_chars() 563 loops = (head < tail) ? 2 : 1; sn_transmit_chars() 566 xmit_count = (head < tail) ? sn_transmit_chars() 567 (UART_XMIT_SIZE - tail) : (head - tail); sn_transmit_chars() 584 tail += result; sn_transmit_chars() 585 tail &= UART_XMIT_SIZE - 1; sn_transmit_chars() 586 xmit->tail = tail; sn_transmit_chars() 587 start = &xmit->buf[tail]; sn_transmit_chars() 914 int ltail = port->sc_port.state->xmit.tail; sn_sal_console_write() 919 * lock. We wait ~20 secs after the head and tail ptrs sn_sal_console_write() 941 port->sc_port.state->xmit.tail)) { sn_sal_console_write() 945 port->sc_port.state->xmit.tail; sn_sal_console_write()
|
H A D | atmel_serial.c | 646 if (!CIRC_SPACE(ring->head, ring->tail, ATMEL_SERIAL_RINGSIZE)) atmel_buffer_rx_char() 751 atmel_uart_write_char(port, xmit->buf[xmit->tail]); atmel_tx_chars() 752 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); atmel_tx_chars() 779 xmit->tail += atmel_port->tx_len; atmel_complete_tx_dma() 780 xmit->tail &= UART_XMIT_SIZE - 1; atmel_complete_tx_dma() 795 * xmit->tail to the end of xmit->buf, now we have to transmit the atmel_complete_tx_dma() 849 xmit->tail, atmel_tx_dma() 864 phys_addr = sg_dma_address(sg_tx) + xmit->tail; atmel_tx_dma() 881 * xmit->tail correctly atmel_tx_dma() 1036 * ring->tail points to the beginning of data to be read by the atmel_rx_from_dma() 1048 * However ring->tail must always points inside the dma buffer: atmel_rx_from_dma() 1049 * 0 <= ring->tail <= sg_dma_len(&atmel_port->sg_rx) - 1 atmel_rx_from_dma() 1052 * where head is lower than tail. In such a case, we first read from atmel_rx_from_dma() 1053 * tail to the end of the buffer then reset tail. atmel_rx_from_dma() 1055 if (ring->head < ring->tail) { atmel_rx_from_dma() 1056 count = sg_dma_len(&atmel_port->sg_rx) - ring->tail; atmel_rx_from_dma() 1058 tty_insert_flip_string(tport, ring->buf + ring->tail, count); atmel_rx_from_dma() 1059 ring->tail = 0; atmel_rx_from_dma() 1063 /* Finally we read data from tail to head */ atmel_rx_from_dma() 1064 if (ring->tail < ring->head) { atmel_rx_from_dma() 1065 count = ring->head - ring->tail; atmel_rx_from_dma() 1067 tty_insert_flip_string(tport, ring->buf + ring->tail, count); atmel_rx_from_dma() 1071 ring->tail = ring->head; atmel_rx_from_dma() 1346 xmit->tail += pdc->ofs; atmel_tx_pdc() 1347 xmit->tail &= UART_XMIT_SIZE - 1; atmel_tx_pdc() 1363 count = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); atmel_tx_pdc() 1367 pdc->dma_addr + xmit->tail); atmel_tx_pdc() 1410 while (ring->head != ring->tail) { atmel_rx_from_ring() 1416 c = ((struct atmel_uart_char *)ring->buf)[ring->tail]; atmel_rx_from_ring() 1418 ring->tail = (ring->tail + 1) & (ATMEL_SERIAL_RINGSIZE - 1); atmel_rx_from_ring() 1494 unsigned int tail; atmel_rx_from_pdc() local 1503 tail = pdc->ofs; atmel_rx_from_pdc() 1517 if (likely(head != tail)) { atmel_rx_from_pdc() 1524 * explicitly set tail to 0. So head will atmel_rx_from_pdc() 1525 * always be greater than tail. atmel_rx_from_pdc() 1527 count = head - tail; atmel_rx_from_pdc() 2022 atmel_port->rx_ring.tail = 0; atmel_shutdown()
|
H A D | serial-tegra.c | 384 tegra_uart_write(tup, xmit->buf[xmit->tail], UART_TX); tegra_uart_fill_tx_fifo() 385 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); tegra_uart_fill_tx_fifo() 414 xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); tegra_uart_tx_dma_complete() 432 tx_phys_addr = tup->tx_dma_buf_phys + xmit->tail; tegra_uart_start_tx_dma() 452 unsigned long tail; tegra_uart_start_next_tx() local 456 tail = (unsigned long)&xmit->buf[xmit->tail]; tegra_uart_start_next_tx() 457 count = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); tegra_uart_start_next_tx() 463 else if (BYTES_TO_ALIGN(tail) > 0) tegra_uart_start_next_tx() 464 tegra_uart_start_pio_tx(tup, BYTES_TO_ALIGN(tail)); tegra_uart_start_next_tx() 509 xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); tegra_uart_stop_tx()
|
H A D | tilegx.c | 156 ch = xmit->buf[xmit->tail]; handle_transmit() 159 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); handle_transmit() 282 ch = xmit->buf[xmit->tail]; tilegx_start_tx() 285 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); tilegx_start_tx()
|
H A D | sirfsoc_uart.c | 186 tran_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); sirfsoc_uart_tx_with_dma() 187 tran_start = (unsigned long)(xmit->buf + xmit->tail); sirfsoc_uart_tx_with_dma() 242 xmit->buf + xmit->tail, sirfsoc_uart_tx_with_dma() 434 xmit->buf[xmit->tail]); sirfsoc_uart_pio_tx_chars() 435 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); sirfsoc_uart_pio_tx_chars() 452 xmit->tail = (xmit->tail + sirfport->transfer_size) & sirfsoc_uart_tx_dma_complete_callback() 605 sirfport->rx_dma_items.xmit.tail = sirfsoc_uart_start_next_rx_dma() 974 sirfport->rx_dma_items.xmit.tail = sirfsoc_uart_startup() 1028 !CIRC_CNT(xmit->head, xmit->tail, sirfsoc_uart_shutdown() 1197 count = CIRC_CNT_TO_END(xmit->head, xmit->tail, sirfsoc_uart_rx_dma_hrtimer_callback() 1201 (const unsigned char *)&xmit->buf[xmit->tail], count); sirfsoc_uart_rx_dma_hrtimer_callback() 1205 xmit->tail = (xmit->tail + inserted) & sirfsoc_uart_rx_dma_hrtimer_callback() 1207 count = CIRC_CNT_TO_END(xmit->head, xmit->tail, sirfsoc_uart_rx_dma_hrtimer_callback() 1401 sirfport->rx_dma_items.xmit.tail = 0; sirfsoc_uart_probe()
|
H A D | men_z135_uart.c | 306 int tail; men_z135_handle_tx() local 352 tail = xmit->tail & (UART_XMIT_SIZE - 1); men_z135_handle_tx() 354 s = ((head >= tail) ? head : UART_XMIT_SIZE) - tail; men_z135_handle_tx() 357 memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n); men_z135_handle_tx() 358 xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1); men_z135_handle_tx()
|
/linux-4.4.14/drivers/tty/serial/8250/ |
H A D | 8250_dma.c | 33 xmit->tail += dma->tx_size; __dma_tx_complete() 34 xmit->tail &= UART_XMIT_SIZE - 1; __dma_tx_complete() 79 dma->tx_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE); serial8250_tx_dma() 82 dma->tx_addr + xmit->tail, serial8250_tx_dma()
|
/linux-4.4.14/drivers/crypto/ |
H A D | n2_core.h | 179 * RET1: queue tail offset 187 * ARG1: New tail offset 222 unsigned long *tail); 224 unsigned long tail);
|
/linux-4.4.14/crypto/ |
H A D | eseqiv.c | 33 char tail[]; member in struct:eseqiv_request_ctx 47 memcpy(req->giv, PTR_ALIGN((u8 *)reqctx->tail, eseqiv_complete2() 85 subreq = (void *)(reqctx->tail + ctx->reqoff); eseqiv_givencrypt() 102 giv = PTR_ALIGN((u8 *)reqctx->tail, eseqiv_givencrypt()
|
H A D | authencesn.c | 45 char tail[]; member in struct:authenc_esn_request_ctx 107 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, crypto_authenc_esn_genicv_tail() 140 u8 *hash = PTR_ALIGN((u8 *)areq_ctx->tail, crypto_authenc_esn_genicv() 142 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); crypto_authenc_esn_genicv() 197 struct ablkcipher_request *abreq = (void *)(areq_ctx->tail crypto_authenc_esn_encrypt() 237 struct ablkcipher_request *abreq = (void *)(areq_ctx->tail crypto_authenc_esn_decrypt_tail() 240 u8 *ohash = PTR_ALIGN((u8 *)areq_ctx->tail, crypto_authenc_esn_decrypt_tail() 281 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ctx->reqoff); crypto_authenc_esn_decrypt() 284 u8 *ohash = PTR_ALIGN((u8 *)areq_ctx->tail, crypto_authenc_esn_decrypt() 305 goto tail; crypto_authenc_esn_decrypt() 324 tail: crypto_authenc_esn_decrypt()
|
H A D | authenc.c | 42 char tail[]; member in struct:authenc_request_ctx 125 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); authenc_geniv_ahash_done() 146 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); crypto_authenc_genicv() 147 u8 *hash = areq_ctx->tail; crypto_authenc_genicv() 204 struct ablkcipher_request *abreq = (void *)(areq_ctx->tail + crypto_authenc_encrypt() 242 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); crypto_authenc_decrypt_tail() 243 struct ablkcipher_request *abreq = (void *)(areq_ctx->tail + crypto_authenc_decrypt_tail() 295 struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); crypto_authenc_decrypt() 296 u8 *hash = areq_ctx->tail; crypto_authenc_decrypt()
|
/linux-4.4.14/mm/ |
H A D | swap.c | 94 * and could skip the tail refcounting(in _mapcount). 102 * So if we see PageHeadHuge set, and we have the tail page pin, 108 * tail pin cannot be the last reference left on the head page, 111 * there's any tail pin left. In turn all tail pinsmust be always 115 * So if we see PageSlab set, and we have the tail page pin, 122 * If @page is a THP tail, we must read the tail page put_unrefcounted_compound_page() 137 * If this is the tail of a slab THP page, put_unrefcounted_compound_page() 138 * the tail pin must not be the last reference put_unrefcounted_compound_page() 140 * be cleared before all tail pins (which skips put_unrefcounted_compound_page() 141 * the _mapcount tail refcounting) have been put_unrefcounted_compound_page() 144 * If this is the tail of a hugetlbfs page, put_unrefcounted_compound_page() 145 * the tail pin may be the last reference on put_unrefcounted_compound_page() 156 * @page was a THP tail. The split @page_head put_unrefcounted_compound_page() 189 * tail page. That is because we put_refcounted_compound_page() 191 * split THP tail and page_head was put_refcounted_compound_page() 258 * 1. a tail hugetlbfs page, or put_compound_page() 259 * 2. a tail THP page, or put_compound_page() 288 * This takes care of get_page() if run on a tail page __get_page_tail() 315 * tail. The split page_head has been __get_page_tail() 473 * reclaim. If it still appears to be reclaimable, move it to the tail of the 738 * head of the list, rather than the tail, to give the flusher 749 * 5. inactive, clean -> inactive, tail 791 * We moves tha page into tail of inactive. lru_deactivate_file_fn()
|
H A D | gup.c | 1108 * For a futex to be placed on a THP tail page, get_futex_key requires a 1122 struct page *head, *page, *tail; gup_huge_pmd() local 1131 tail = page; gup_huge_pmd() 1153 * Any tail pages need their mapcount reference taken before we gup_huge_pmd() 1158 if (PageTail(tail)) gup_huge_pmd() 1159 get_huge_page_tail(tail); gup_huge_pmd() 1160 tail++; gup_huge_pmd() 1169 struct page *head, *page, *tail; gup_huge_pud() local 1178 tail = page; gup_huge_pud() 1200 if (PageTail(tail)) gup_huge_pud() 1201 get_huge_page_tail(tail); gup_huge_pud() 1202 tail++; gup_huge_pud() 1213 struct page *head, *page, *tail; gup_huge_pgd() local 1221 tail = page; gup_huge_pgd() 1243 if (PageTail(tail)) gup_huge_pgd() 1244 get_huge_page_tail(tail); gup_huge_pgd() 1245 tail++; gup_huge_pgd()
|
/linux-4.4.14/net/sunrpc/xprtrdma/ |
H A D | rpc_rdma.c | 102 size_t tlen = buf->tail[0].iov_len; rpcrdma_tail_pullup() 105 /* Do not include the tail if it is only an XDR pad */ rpcrdma_tail_pullup() 109 /* xdr_write_pages() adds a pad at the beginning of the tail rpcrdma_tail_pullup() 111 * tail's actual content to land at the next XDR position rpcrdma_tail_pullup() 118 src = buf->tail[0].iov_base; rpcrdma_tail_pullup() 186 /* When encoding the read list, the tail is always sent inline */ rpcrdma_convert_iovs() 190 if (xdrbuf->tail[0].iov_len) { rpcrdma_convert_iovs() 193 if (xdrbuf->tail[0].iov_len < 4 && xprt_rdma_pad_optimize) rpcrdma_convert_iovs() 199 seg[n].mr_offset = xdrbuf->tail[0].iov_base; rpcrdma_convert_iovs() 200 seg[n].mr_len = xdrbuf->tail[0].iov_len; rpcrdma_convert_iovs() 383 if (rqst->rq_snd_buf.tail[0].iov_len) { rpcrdma_inline_pullup() 384 curlen = rqst->rq_snd_buf.tail[0].iov_len; rpcrdma_inline_pullup() 385 if (destp + copy_len != rqst->rq_snd_buf.tail[0].iov_base) { rpcrdma_inline_pullup() 387 rqst->rq_snd_buf.tail[0].iov_base, curlen); rpcrdma_inline_pullup() 390 dprintk("RPC: %s: tail destp 0x%p len %d\n", rpcrdma_inline_pullup() 668 if (copy_len && rqst->rq_rcv_buf.tail[0].iov_len) { rpcrdma_inline_fixup() 670 if (curlen > rqst->rq_rcv_buf.tail[0].iov_len) rpcrdma_inline_fixup() 671 curlen = rqst->rq_rcv_buf.tail[0].iov_len; rpcrdma_inline_fixup() 672 if (rqst->rq_rcv_buf.tail[0].iov_base != srcp) rpcrdma_inline_fixup() 673 memmove(rqst->rq_rcv_buf.tail[0].iov_base, srcp, curlen); rpcrdma_inline_fixup() 674 dprintk("RPC: %s: tail srcp 0x%p len %d curlen %d\n", rpcrdma_inline_fixup() 676 rqst->rq_rcv_buf.tail[0].iov_len = curlen; rpcrdma_inline_fixup() 679 rqst->rq_rcv_buf.tail[0].iov_len = 0; rpcrdma_inline_fixup() 683 unsigned char *p = rqst->rq_rcv_buf.tail[0].iov_base; rpcrdma_inline_fixup() 685 p[rqst->rq_rcv_buf.tail[0].iov_len++] = 0; rpcrdma_inline_fixup()
|
H A D | svc_rdma_recvfrom.c | 113 /* Set up tail */ rdma_build_arg_xdr() 114 rqstp->rq_arg.tail[0].iov_base = NULL; rdma_build_arg_xdr() 115 rqstp->rq_arg.tail[0].iov_len = 0; rdma_build_arg_xdr() 381 dprintk("svcrdma: large tail unsupported\n"); rdma_copy_tail() 385 /* Fit as much of the tail on the current page as possible */ rdma_copy_tail() 441 head->arg.tail[0] = rqstp->rq_arg.tail[0]; rdma_read_chunks() 546 /* Rebuild rq_arg head and tail. */ rdma_read_complete() 548 rqstp->rq_arg.tail[0] = head->arg.tail[0]; rdma_read_complete() 561 + rqstp->rq_arg.tail[0].iov_len; rdma_read_complete() 648 + rqstp->rq_arg.tail[0].iov_len; svc_rdma_recvfrom()
|
H A D | svc_rdma_sendto.c | 64 (xdr->head[0].iov_len + xdr->page_len + xdr->tail[0].iov_len)) { map_xdr() 94 if (xdr->tail[0].iov_len) { map_xdr() 95 vec->sge[sge_no].iov_base = xdr->tail[0].iov_base; map_xdr() 96 vec->sge[sge_no].iov_len = xdr->tail[0].iov_len; map_xdr() 103 xdr->head[0].iov_len, xdr->tail[0].iov_len); map_xdr() 127 /* This offset is in the tail */ dma_map_xdr() 130 xdr->tail[0].iov_base & ~PAGE_MASK; dma_map_xdr() 131 page = virt_to_page(xdr->tail[0].iov_base); dma_map_xdr() 311 u32 xfer_len = rqstp->rq_res.page_len + rqstp->rq_res.tail[0].iov_len; send_write_chunks() 367 return rqstp->rq_res.page_len + rqstp->rq_res.tail[0].iov_len; send_write_chunks() 535 * xdr_buf.tail gets a separate sge, but resides in the send_reply()
|
/linux-4.4.14/fs/adfs/ |
H A D | dir_f.h | 40 * Directory tail
|
/linux-4.4.14/arch/blackfin/kernel/ |
H A D | entry.S | 24 * Hw IRQs are off on entry, and we don't want the scheduling tail
|
/linux-4.4.14/drivers/staging/rtl8188eu/include/ |
H A D | rtw_event.h | 102 int tail; member in struct:c2hevent_queue 111 int tail; member in struct:network_queue
|
/linux-4.4.14/drivers/staging/rtl8712/ |
H A D | rtl871x_event.h | 99 /*volatile*/ int tail; member in struct:c2hevent_queue 108 /*volatile*/ int tail; member in struct:network_queue
|
H A D | rtl8712_recv.h | 122 tail -----> 124 len = (unsigned int )(tail - data);
|
/linux-4.4.14/drivers/thunderbolt/ |
H A D | nhi_regs.h | 47 * 08: ring tail (set by NHI) 57 * 10: ring tail (set by NHI)
|
H A D | nhi.c | 120 return ((ring->head + 1) % ring->size) == ring->tail; ring_full() 125 return ring->head == ring->tail; ring_empty() 181 if (!(ring->descriptors[ring->tail].flags ring_work() 188 frame->size = ring->descriptors[ring->tail].length; ring_work() 189 frame->eof = ring->descriptors[ring->tail].eof; ring_work() 190 frame->sof = ring->descriptors[ring->tail].sof; ring_work() 191 frame->flags = ring->descriptors[ring->tail].flags; ring_work() 210 ring->tail = (ring->tail + 1) % ring->size; ring_work() 274 ring->tail = 0; ring_alloc() 374 ring->tail = 0; ring_stop()
|
/linux-4.4.14/security/selinux/ |
H A D | netlink.c | 83 tmp = skb->tail; selnl_notify() 88 nlh->nlmsg_len = skb->tail - tmp; selnl_notify()
|
H A D | netnode.c | 176 struct sel_netnode *tail; sel_netnode_insert() local 177 tail = list_entry( sel_netnode_insert() 181 list_del_rcu(&tail->list); sel_netnode_insert() 182 kfree_rcu(tail, rcu); sel_netnode_insert()
|
H A D | netport.c | 124 struct sel_netport *tail; sel_netport_insert() local 125 tail = list_entry( sel_netport_insert() 130 list_del_rcu(&tail->list); sel_netport_insert() 131 kfree_rcu(tail, rcu); sel_netport_insert()
|
/linux-4.4.14/arch/sparc/mm/ |
H A D | gup.c | 73 struct page *head, *page, *tail; gup_huge_pmd() local 85 tail = page; gup_huge_pmd() 106 /* Any tail page need their mapcount reference taken before we gup_huge_pmd() 110 if (PageTail(tail)) gup_huge_pmd() 111 get_huge_page_tail(tail); gup_huge_pmd() 112 tail++; gup_huge_pmd()
|
/linux-4.4.14/arch/s390/mm/ |
H A D | gup.c | 58 struct page *head, *page, *tail; gup_huge_pmd() local 70 tail = page; gup_huge_pmd() 92 * Any tail page need their mapcount reference taken before we gup_huge_pmd() 96 if (PageTail(tail)) gup_huge_pmd() 97 get_huge_page_tail(tail); gup_huge_pmd() 98 tail++; gup_huge_pmd()
|
/linux-4.4.14/drivers/input/ |
H A D | evdev.c | 53 unsigned int tail; member in struct:evdev_client 55 spinlock_t buffer_lock; /* protects access to buffer, head and tail */ 120 head = client->tail; __evdev_flush_queue() 121 client->packet_head = client->tail; __evdev_flush_queue() 126 for (i = client->tail; i != client->head; i = (i + 1) & mask) { __evdev_flush_queue() 175 if (unlikely(client->head == client->tail)) { __evdev_queue_syn_dropped() 177 client->tail = (client->head - 1) & (client->bufsize - 1); __evdev_queue_syn_dropped() 178 client->packet_head = client->tail; __evdev_queue_syn_dropped() 220 if (client->head != client->tail) { evdev_set_clk_type() 221 client->packet_head = client->head = client->tail; evdev_set_clk_type() 237 if (unlikely(client->head == client->tail)) { __pass_event() 242 client->tail = (client->head - 2) & (client->bufsize - 1); __pass_event() 244 client->buffer[client->tail].time = event->time; __pass_event() 245 client->buffer[client->tail].type = EV_SYN; __pass_event() 246 client->buffer[client->tail].code = SYN_DROPPED; __pass_event() 247 client->buffer[client->tail].value = 0; __pass_event() 249 client->packet_head = client->tail; __pass_event() 575 have_event = client->packet_head != client->tail; evdev_fetch_next_event() 577 *event = client->buffer[client->tail++]; evdev_fetch_next_event() 578 client->tail &= client->bufsize - 1; evdev_fetch_next_event() 602 if (client->packet_head == client->tail && evdev_read() 627 client->packet_head != client->tail || evdev_read() 651 if (client->packet_head != client->tail) evdev_poll()
|
H A D | joydev.c | 66 int tail; member in struct:joydev_client 68 spinlock_t buffer_lock; /* protects access to buffer, head and tail */ 109 if (client->tail == client->head) joydev_pass_event() 319 have_event = client->head != client->tail; joydev_fetch_next_event() 321 *event = client->buffer[client->tail++]; joydev_fetch_next_event() 322 client->tail &= JOYDEV_BUFFER_SIZE - 1; joydev_fetch_next_event() 357 client->tail = client->head; joydev_0x_read() 373 client->head != client->tail; joydev_data_pending()
|
/linux-4.4.14/drivers/video/fbdev/i810/ |
H A D | i810_accel.c | 62 u32 head, count = WAIT_COUNT, tail; wait_for_space() local 65 tail = par->cur_tail; wait_for_space() 68 if ((tail == head) || wait_for_space() 69 (tail > head && wait_for_space() 70 (par->iring.size - tail + head) >= space) || wait_for_space() 71 (tail < head && (head - tail) >= space)) { wait_for_space() 116 * space. Returns the tail of the buffer 132 * This advances the tail of the ringbuffer, effectively 433 * the head and tail pointers = 0
|
/linux-4.4.14/arch/um/drivers/ |
H A D | line.c | 42 n = line->head - line->tail; write_room() 97 line->tail = line->buffer; buffer_data() 103 end = line->buffer + LINE_BUFSIZE - line->tail; buffer_data() 106 memcpy(line->tail, buf, len); buffer_data() 107 line->tail += len; buffer_data() 111 memcpy(line->tail, buf, end); buffer_data() 114 line->tail = line->buffer + len - end; buffer_data() 133 if ((line->buffer == NULL) || (line->head == line->tail)) flush_buffer() 136 if (line->tail < line->head) { flush_buffer() 147 * must flush only from the beginning to ->tail. flush_buffer() 156 count = line->tail - line->head; flush_buffer() 164 return line->head == line->tail; flush_buffer() 198 if (line->head != line->tail) line_write() 265 line->tail = line->buffer; line_write_interrupt()
|
H A D | line.h | 49 * LINE_BUFSIZE, head to the start of the ring, tail to the end.*/ 52 char *tail; member in struct:line
|
/linux-4.4.14/net/bluetooth/cmtp/ |
H A D | core.c | 214 unsigned int size, tail; cmtp_process_transmit() local 227 tail = session->mtu - nskb->len; cmtp_process_transmit() 228 if (tail < 5) { cmtp_process_transmit() 231 tail = session->mtu; cmtp_process_transmit() 234 size = min_t(uint, ((tail < 258) ? (tail - 2) : (tail - 3)), skb->len); cmtp_process_transmit()
|
/linux-4.4.14/drivers/net/wimax/i2400m/ |
H A D | tx.c | 104 * until the tail and continue at the head of it. 233 * i2400m_tx_skip_tail() Marks unusable FIFO tail space 296 * Calculate how much tail room is available 303 * | tail room | 345 * @try_head: specify either to allocate head room or tail room space 348 * The caller must always try to allocate tail room space first by 350 * is not enough tail room space but there is enough head room space, 357 * space. TAIL_FULL if there is no space at the tail but there is at 366 * | tail room | | data | 380 * A, we only try from the tail room; if it is not enough, we just 382 * skip the tail room and try to allocate from the head. 389 * N ___________ tail room is zero 400 * During such a time, where tail room is zero in the TX FIFO and if there 415 * is no tail room to accommodate the payload and calls 416 * i2400m_tx_skip_tail() to skip the tail space. Now i2400m_tx() calls 418 * i2400m_tx_fifo_push() that returns TAIL_FULL, since there is no tail space 448 /* Is there space at the tail? */ i2400m_tx_fifo_push() 452 * If the tail room space is not enough to push the message i2400m_tx_fifo_push() 457 * in tail room of the TX FIFO to accommodate the message. i2400m_tx_fifo_push() 465 d_printf(2, dev, "fifo push %zu/%zu: tail full\n", i2400m_tx_fifo_push() 483 * Mark the tail of the FIFO buffer as 'to-skip' 515 d_printf(2, dev, "skip tail: skipping %zu bytes @%zu\n", i2400m_tx_skip_tail() 582 d_printf(2, dev, "new TX message: tail full, trying head\n"); i2400m_tx_new() 627 tail (and taking padding into consideration). */ i2400m_tx_close() 635 * to move it so the tail is next to the payloads, move it and i2400m_tx_close() 771 d_printf(2, dev, "pl append: tail full\n"); i2400m_tx()
|
/linux-4.4.14/drivers/scsi/be2iscsi/ |
H A D | be.h | 43 u16 tail, head; member in struct:be_queue_info 71 return q->dma_mem.va + q->tail * q->entry_size; queue_tail_node() 81 index_inc(&q->tail, q->len); queue_tail_inc()
|
/linux-4.4.14/drivers/hid/usbhid/ |
H A D | hiddev.c | 62 int tail; member in struct:hiddev_list 360 if (list->head == list->tail) { hiddev_read() 363 while (list->head == list->tail) { hiddev_read() 396 while (list->head != list->tail && hiddev_read() 399 if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE) { hiddev_read() 402 event.hid = list->buffer[list->tail].usage_code; hiddev_read() 403 event.value = list->buffer[list->tail].value; hiddev_read() 411 if (list->buffer[list->tail].field_index != HID_FIELD_INDEX_NONE || hiddev_read() 414 if (copy_to_user(buffer + retval, list->buffer + list->tail, sizeof(struct hiddev_usage_ref))) { hiddev_read() 421 list->tail = (list->tail + 1) & (HIDDEV_BUFFER_SIZE - 1); hiddev_read() 439 if (list->head != list->tail) hiddev_poll()
|
H A D | usbhid.h | 77 unsigned char ctrlhead, ctrltail; /* Control fifo head & tail */ 84 unsigned char outhead, outtail; /* Output pipe fifo head & tail */
|
/linux-4.4.14/net/tipc/ |
H A D | msg.c | 124 struct sk_buff *tail = NULL; tipc_buf_append() local 145 TIPC_SKB_CB(head)->tail = NULL; tipc_buf_append() 147 skb_walk_frags(head, tail) { skb_walk_frags() 148 TIPC_SKB_CB(head)->tail = tail; skb_walk_frags() 162 tail = TIPC_SKB_CB(head)->tail; 166 tail->next = frag; 170 TIPC_SKB_CB(head)->tail = frag; 178 TIPC_SKB_CB(head)->tail = NULL; 338 * tipc_msg_bundle(): Append contents of a buffer to tail of an existing one 424 * tipc_msg_make_bundle(): Create bundle buf and append message to its tail
|
/linux-4.4.14/sound/isa/msnd/ |
H A D | msnd_midi.c | 87 u16 tail; snd_msndmidi_input_drop() local 89 tail = readw(mpu->dev->MIDQ + JQS_wTail); snd_msndmidi_input_drop() 90 writew(tail, mpu->dev->MIDQ + JQS_wHead); snd_msndmidi_input_drop()
|
/linux-4.4.14/arch/tile/gxio/ |
H A D | mpipe.c | 245 unsigned int head = list->tail; gxio_mpipe_rules_begin() 306 list->tail = list->head + rule->size; gxio_mpipe_rules_begin() 326 if (list->tail == 0) gxio_mpipe_rules_add_channel() 344 if (list->tail == 0) gxio_mpipe_rules_set_headroom() 358 offsetof(gxio_mpipe_rules_list_t, rules) + list->tail; gxio_mpipe_rules_commit() 383 /* Initialize the "tail". */ gxio_mpipe_iqueue_init()
|
/linux-4.4.14/net/caif/ |
H A D | cfpkt_skbuff.c | 190 /* Check whether we need to add space at the tail */ cfpkt_add_body() 198 /* Check whether we need to change the SKB before writing to the tail */ cfpkt_add_body() 318 if (dst->tail + neededtailspace > dst->end) { cfpkt_append() 319 /* Create a dumplicate of 'dst' with more tail space */ cfpkt_append() 335 dst->tail += addlen; cfpkt_append() 372 skb2->tail += len2nd; cfpkt_split()
|
/linux-4.4.14/drivers/gpu/drm/savage/ |
H A D | savage_bci.c | 215 dev_priv->head.next = &dev_priv->tail; savage_freelist_init() 219 dev_priv->tail.next = NULL; savage_freelist_init() 220 dev_priv->tail.prev = &dev_priv->head; savage_freelist_init() 221 dev_priv->tail.buf = NULL; savage_freelist_init() 242 drm_savage_buf_priv_t *tail = dev_priv->tail.prev; savage_freelist_get() local 256 DRM_DEBUG(" tail=0x%04x %d\n", tail->age.event, tail->age.wrap); savage_freelist_get() 259 if (tail->buf && (TEST_AGE(&tail->age, event, wrap) || event == 0)) { savage_freelist_get() 260 drm_savage_buf_priv_t *next = tail->next; savage_freelist_get() 261 drm_savage_buf_priv_t *prev = tail->prev; savage_freelist_get() 264 tail->next = tail->prev = NULL; savage_freelist_get() 265 return tail->buf; savage_freelist_get() 268 DRM_DEBUG("returning NULL, tail->buf=%p!\n", tail->buf); savage_freelist_get()
|
/linux-4.4.14/drivers/net/wireless/ath/ath9k/ |
H A D | dynack.h | 28 * @t_rb: ring buffer tail 49 * @t_rb: ring buffer tail
|
/linux-4.4.14/block/ |
H A D | blk-exec.c | 41 * @at_head: insert request at head or tail of queue 93 * @at_head: insert request at head or tail of queue
|
/linux-4.4.14/net/decnet/netfilter/ |
H A D | dn_rtmsg.c | 49 old_tail = skb->tail; dnrmg_build_message() 60 nlh->nlmsg_len = skb->tail - old_tail; dnrmg_build_message()
|
/linux-4.4.14/net/mac80211/ |
H A D | wpa.c | 38 int tail; ieee80211_tx_h_michael_mic_add() local 65 tail = MICHAEL_MIC_LEN; ieee80211_tx_h_michael_mic_add() 67 tail += IEEE80211_TKIP_ICV_LEN; ieee80211_tx_h_michael_mic_add() 69 if (WARN(skb_tailroom(skb) < tail || ieee80211_tx_h_michael_mic_add() 71 "mmic: not enough head/tail (%d/%d,%d/%d)\n", ieee80211_tx_h_michael_mic_add() 73 skb_tailroom(skb), tail)) ieee80211_tx_h_michael_mic_add() 193 int len, tail; tkip_encrypt_skb() local 207 tail = 0; tkip_encrypt_skb() 209 tail = IEEE80211_TKIP_ICV_LEN; tkip_encrypt_skb() 211 if (WARN_ON(skb_tailroom(skb) < tail || tkip_encrypt_skb() 407 int hdrlen, len, tail; ccmp_encrypt_skb() local 431 tail = 0; ccmp_encrypt_skb() 433 tail = mic_len; ccmp_encrypt_skb() 435 if (WARN_ON(skb_tailroom(skb) < tail || ccmp_encrypt_skb() 635 int hdrlen, len, tail; gcmp_encrypt_skb() local 658 tail = 0; gcmp_encrypt_skb() 660 tail = IEEE80211_GCMP_MIC_LEN; gcmp_encrypt_skb() 662 if (WARN_ON(skb_tailroom(skb) < tail || gcmp_encrypt_skb()
|
/linux-4.4.14/drivers/scsi/aic7xxx/ |
H A D | queue.h | 35 * singly-linked tail queues, lists, tail queues, and circular queues. 47 * A singly-linked tail queue is headed by a pair of pointers, one to the 48 * head of the list and the other to the tail of the list. The elements are 52 * end of the list. Elements being removed from the head of the tail queue 54 * A singly-linked tail queue may only be traversed in the forward direction. 55 * Singly-linked tail queues are ideal for applications with large datasets 65 * A tail queue is headed by a pair of pointers, one to the head of the 66 * list and the other to the tail of the list. The elements are doubly 70 * the list. A tail queue may be traversed in either direction. 73 * list and the other to the tail of the list. The elements are doubly
|
/linux-4.4.14/fs/xfs/libxfs/ |
H A D | xfs_dir2_block.c | 341 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_addname() 463 * Update the tail (entry count). xfs_dir2_block_addname() 556 * Clean up the bestfree array and log the header, tail, and entry. xfs_dir2_block_addname() 589 * Log the block tail. 615 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_lookup() 663 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_lookup_int() 765 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_removename() 804 * Fix up the block tail. xfs_dir2_block_removename() 845 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_replace() 909 xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_leaf_to_block() 916 xfs_dir2_leaf_tail_t *ltp; /* leaf tail structure */ xfs_dir2_leaf_to_block() 1002 * Initialize the block tail. xfs_dir2_leaf_to_block() 1054 xfs_dir2_block_tail_t *btp; /* block tail pointer */ xfs_dir2_sf_to_block() 1128 * Compute size of block "tail" area. xfs_dir2_sf_to_block() 1134 * Say we're using the leaf and tail area. xfs_dir2_sf_to_block() 1142 * Fill in the tail. xfs_dir2_sf_to_block() 1250 * Log the leaf entry area and tail. xfs_dir2_sf_to_block()
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | perf_cpum_sf.c | 77 unsigned long *tail; /* last sample-data-block-table */ member in struct:sf_buffer 188 unsigned long *new, *tail; realloc_sampling_buffer() local 190 if (!sfb->sdbt || !sfb->tail) realloc_sampling_buffer() 193 if (!is_link_entry(sfb->tail)) realloc_sampling_buffer() 198 * The tail variables always points to the "tail" (last and table-link) realloc_sampling_buffer() 201 tail = sfb->tail; realloc_sampling_buffer() 206 if (sfb->sdbt != get_next_sdbt(tail)) { realloc_sampling_buffer() 209 "tail=%p\n", realloc_sampling_buffer() 210 (void *) sfb->sdbt, (void *) tail); realloc_sampling_buffer() 218 if (require_table_link(tail)) { realloc_sampling_buffer() 225 /* Link current page to tail of chain */ realloc_sampling_buffer() 226 *tail = (unsigned long)(void *) new + 1; realloc_sampling_buffer() 227 tail = new; realloc_sampling_buffer() 235 rc = alloc_sample_data_block(tail, gfp_flags); realloc_sampling_buffer() 239 tail++; realloc_sampling_buffer() 243 *tail = (unsigned long) sfb->sdbt + 1; realloc_sampling_buffer() 244 sfb->tail = tail; realloc_sampling_buffer() 280 sfb->tail = sfb->sdbt; alloc_sampling_buffer() 281 *sfb->tail = (unsigned long)(void *) sfb->sdbt + 1; alloc_sampling_buffer()
|
/linux-4.4.14/drivers/usb/musb/ |
H A D | cppi_dma.c | 114 c->tail = NULL; cppi_pool_init() 655 tx->tail = bd; cppi_next_tx_segment() 766 struct cppi_descriptor *bd, *tail; cppi_next_rx_segment() local 836 for (i = 0, tail = NULL; bd && i < n_bds; i++, tail = bd) { cppi_next_rx_segment() 843 tail->next = bd; cppi_next_rx_segment() 844 tail->hw_next = bd->dma; cppi_next_rx_segment() 866 if (!tail) { cppi_next_rx_segment() 872 tail->next = NULL; cppi_next_rx_segment() 873 tail->hw_next = 0; cppi_next_rx_segment() 876 rx->tail = tail; cppi_next_rx_segment() 884 tail->hw_options |= CPPI_EOP_SET; cppi_next_rx_segment() 890 tail = rx->last_processed; cppi_next_rx_segment() 891 if (tail) { cppi_next_rx_segment() 892 tail->next = bd; cppi_next_rx_segment() 893 tail->hw_next = bd->dma; cppi_next_rx_segment() 1106 rx->head, rx->tail, cppi_rx_scan() 1135 rx->tail = NULL; cppi_rx_scan() 1242 tx_ch->tail = NULL; cppi_interrupt() 1410 cppi_ch->tail = NULL; cppi_channel_abort()
|
/linux-4.4.14/drivers/misc/mic/scif/ |
H A D | scif_rb.c | 25 #define scif_rb_ring_cnt(head, tail, size) CIRC_CNT(head, tail, size) 26 #define scif_rb_ring_space(head, tail, size) CIRC_SPACE(head, tail, size)
|
/linux-4.4.14/drivers/infiniband/hw/mlx4/ |
H A D | cq.c | 580 unsigned tail, struct mlx4_cqe *cqe, int is_eth) use_tunnel_data() 585 qp->sqp_proxy_rcv[tail].map, use_tunnel_data() 588 hdr = (struct mlx4_ib_proxy_sqp_hdr *) (qp->sqp_proxy_rcv[tail].addr); use_tunnel_data() 615 cur = wq->head - wq->tail; mlx4_ib_qp_sw_comp() 621 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; mlx4_ib_qp_sw_comp() 624 wq->tail++; mlx4_ib_qp_sw_comp() 670 unsigned tail = 0; mlx4_ib_poll_one() local 752 wq->tail += (u16) (wqe_ctr - (u16) wq->tail); mlx4_ib_poll_one() 754 wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; mlx4_ib_poll_one() 755 ++wq->tail; mlx4_ib_poll_one() 768 tail = wq->tail & (wq->wqe_cnt - 1); mlx4_ib_poll_one() 769 wc->wr_id = wq->wrid[tail]; mlx4_ib_poll_one() 770 ++wq->tail; mlx4_ib_poll_one() 859 return use_tunnel_data(*cur_qp, cq, wc, tail, mlx4_ib_poll_one() 579 use_tunnel_data(struct mlx4_ib_qp *qp, struct mlx4_ib_cq *cq, struct ib_wc *wc, unsigned tail, struct mlx4_cqe *cqe, int is_eth) use_tunnel_data() argument
|
/linux-4.4.14/drivers/net/ethernet/intel/i40e/ |
H A D | i40e_adminq.c | 53 /* set head and tail registers in our local struct */ i40e_adminq_init_regs() 55 hw->aq.asq.tail = I40E_VF_ATQT1; i40e_adminq_init_regs() 60 hw->aq.arq.tail = I40E_VF_ARQT1; i40e_adminq_init_regs() 66 hw->aq.asq.tail = I40E_PF_ATQT; i40e_adminq_init_regs() 71 hw->aq.arq.tail = I40E_PF_ARQT; i40e_adminq_init_regs() 309 wr32(hw, hw->aq.asq.tail, 0); i40e_config_asq_regs() 338 wr32(hw, hw->aq.arq.tail, 0); i40e_config_arq_regs() 346 /* Update tail in the HW to post pre-allocated buffers */ i40e_config_arq_regs() 347 wr32(hw, hw->aq.arq.tail, hw->aq.num_arq_entries - 1); i40e_config_arq_regs() 494 wr32(hw, hw->aq.asq.tail, 0); i40e_shutdown_asq() 528 wr32(hw, hw->aq.arq.tail, 0); i40e_shutdown_arq() 845 /* bump the tail */ i40e_asq_send_command() 853 wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); i40e_asq_send_command() 1014 /* set tail = the last cleaned desc index. */ i40e_clean_arq_element() 1015 wr32(hw, hw->aq.arq.tail, ntc); i40e_clean_arq_element() 1016 /* ntc is updated to tail + 1 */ i40e_clean_arq_element()
|
/linux-4.4.14/drivers/net/irda/ |
H A D | bfin_sir.h | 35 int tail; member in struct:dma_rx_buf
|
H A D | bfin_sir.c | 317 for (i = port->rx_dma_buf.head; i < port->rx_dma_buf.tail; i++) bfin_sir_dma_rx_chars() 335 if (pos > port->rx_dma_buf.tail) { bfin_sir_rx_dma_timeout() 336 port->rx_dma_buf.tail = pos; bfin_sir_rx_dma_timeout() 338 port->rx_dma_buf.head = port->rx_dma_buf.tail; bfin_sir_rx_dma_timeout() 353 port->rx_dma_buf.tail = DMA_SIR_RX_XCNT * port->rx_dma_nrows; bfin_sir_dma_rx_int() 357 port->rx_dma_buf.tail = 0; bfin_sir_dma_rx_int() 359 port->rx_dma_buf.head = port->rx_dma_buf.tail; bfin_sir_dma_rx_int() 395 port->rx_dma_buf.tail = 0; bfin_sir_startup()
|
/linux-4.4.14/drivers/net/wireless/ath/ath10k/ |
H A D | swap.h | 39 struct ath10k_swap_code_seg_tail tail; member in union:ath10k_swap_code_seg_item
|
H A D | swap.c | 56 if (memcmp(swap_item->tail.magic_signature, swap_magic, ath10k_swap_code_seg_fill() 62 __le32_to_cpu(swap_item->tail.bmi_write_addr); ath10k_swap_code_seg_fill()
|
/linux-4.4.14/drivers/net/wireless/ath/wil6210/ |
H A D | wmi.c | 231 r->tail = wil_r(wil, RGF_MBOX + __wmi_send() 232 offsetof(struct wil6210_mbox_ctl, tx.tail)); __wmi_send() 233 if (next_head != r->tail) __wmi_send() 237 if (next_head == r->tail) { __wmi_send() 738 if (r->tail == r->head) wmi_recv_cmd() 741 wil_dbg_wmi(wil, "Mbox head %08x tail %08x\n", wmi_recv_cmd() 742 r->head, r->tail); wmi_recv_cmd() 743 /* read cmd descriptor from tail */ wmi_recv_cmd() 744 wil_memcpy_fromio_32(&d_tail, wil->csr + HOSTADDR(r->tail), wmi_recv_cmd() 775 wil_w(wil, r->tail + wmi_recv_cmd() 792 /* advance tail */ wmi_recv_cmd() 793 r->tail = r->base + ((r->tail - r->base + wmi_recv_cmd() 796 offsetof(struct wil6210_mbox_ctl, rx.tail), r->tail); wmi_recv_cmd() 1148 wil_dbg_misc(wil, "Rx init: status %d tail 0x%08x\n", wmi_rx_chain_add()
|
/linux-4.4.14/arch/x86/lib/ |
H A D | usercopy_64.c | 69 * it is not necessary to optimize tail handling.
|
/linux-4.4.14/arch/arc/lib/ |
H A D | memset.S | 58 b memset ;tail call so need to tinker with blink
|
/linux-4.4.14/include/net/ |
H A D | gen_stats.h | 17 struct nlattr * tail; member in struct:gnet_dump
|
/linux-4.4.14/arch/sparc/boot/ |
H A D | piggyback.c | 191 int image, tail; main() local 262 if ((tail = open(argv[4], O_RDONLY)) < 0) main() 264 while ((i = read(tail, buffer, 1024)) > 0) main() 269 if (close(tail) < 0) main()
|
/linux-4.4.14/arch/parisc/kernel/ |
H A D | real2.S | 173 mtctl %r0, %cr17 /* Clear IIASQ tail */ 177 mtctl %r1, %cr18 /* IIAOQ tail */ 207 mtctl %r0, %cr17 /* Clear IIASQ tail */ 211 mtctl %r1, %cr18 /* IIAOQ tail */
|
/linux-4.4.14/arch/powerpc/boot/ |
H A D | gunzip_util.h | 27 * - Finally use gunzip_finish() to extract the tail of the
|
/linux-4.4.14/arch/avr32/lib/ |
H A D | csum_partial_copy_generic.S | 57 /* handle additional bytes at the tail */
|
/linux-4.4.14/arch/arm/mach-omap1/ |
H A D | ams-delta-fiq-handler.S | 202 ldr r10, [r9, #BUF_TAIL_OFFSET] @ get buffer tail offset 208 add r12, r12, r10, LSL #2 @ calculate buffer tail address 210 str r8, [r12] @ append it to the buffer tail 212 add r10, r10, #1 @ increment buffer tail offset
|
/linux-4.4.14/arch/ia64/lib/ |
H A D | do_csum.S | 34 // The code hereafter also takes care of the "tail" part of the buffer 36 // allows us to commute operations. So we do the "head" and "tail" 38 // tail values, we feed them into the pipeline, very handy initialization. 44 // possible load latency and also to accommodate for head and tail. 145 mov tmask=-1 // initialize tail mask 169 shr.u tmask=tmask,tmp1 // build tail mask, mask off ]8,lastoff] 174 (p8) and hmask=hmask,tmask // apply tail mask to head mask if 1 word only
|
H A D | copy_user.S | 135 // the tail by copying byte-by-byte. 141 // failure_in3 does. If the byte-by-byte at the tail fails, it is 147 // tail of the 1st of the destination. 296 // To fix that, we simply copy the tail byte by byte. 453 // at the top we still need to fill the body and tail. 466 // Here we handle the head & tail part when we check for alignment. 512 // either go for the 16byte copy loop OR the ld8 in the tail part. 530 // executed any of the previous (tail) ones, so we don't need to do 580 cmp.ne p6,p0=dst1,enddst // Do we need to finish the tail ? 591 cmp.ne p6,p0=dst1,enddst // Do we need to finish the tail ?
|
/linux-4.4.14/net/ipv6/ |
H A D | esp6.c | 168 u8 *tail; esp6_output() local 215 tail = skb_tail_pointer(trailer); esp6_output() 217 memset(tail, 0, tfclen); esp6_output() 218 tail += tfclen; esp6_output() 223 tail[i] = i + 1; esp6_output() 225 tail[plen - 2] = plen - 2; esp6_output() 226 tail[plen - 1] = *skb_mac_header(skb); esp6_output()
|
/linux-4.4.14/drivers/firewire/ |
H A D | nosy.c | 75 struct packet *head, *tail; member in struct:packet_buffer 133 buffer->tail = (struct packet *) buffer->data; packet_buffer_init() 206 buffer->tail->length = length; packet_buffer_put() 208 if (&buffer->tail->data[length] < end) { packet_buffer_put() 209 memcpy(buffer->tail->data, data, length); packet_buffer_put() 210 buffer->tail = (struct packet *) &buffer->tail->data[length]; packet_buffer_put() 212 size_t split = end - buffer->tail->data; packet_buffer_put() 214 memcpy(buffer->tail->data, data, split); packet_buffer_put() 216 buffer->tail = (struct packet *) &buffer->data[length - split]; packet_buffer_put()
|
/linux-4.4.14/fs/jbd2/ |
H A D | recovery.c | 180 struct jbd2_journal_block_tail *tail; jbd2_descr_block_csum_verify() local 187 tail = (struct jbd2_journal_block_tail *)(buf + j->j_blocksize - jbd2_descr_block_csum_verify() 189 provided = tail->t_checksum; jbd2_descr_block_csum_verify() 190 tail->t_checksum = 0; jbd2_descr_block_csum_verify() 192 tail->t_checksum = provided; jbd2_descr_block_csum_verify() 817 struct jbd2_journal_revoke_tail *tail; jbd2_revoke_block_csum_verify() local 824 tail = (struct jbd2_journal_revoke_tail *)(buf + j->j_blocksize - jbd2_revoke_block_csum_verify() 826 provided = tail->r_checksum; jbd2_revoke_block_csum_verify() 827 tail->r_checksum = 0; jbd2_revoke_block_csum_verify() 829 tail->r_checksum = provided; jbd2_revoke_block_csum_verify()
|
/linux-4.4.14/arch/powerpc/oprofile/cell/ |
H A D | spu_task_sync.c | 50 * in the queue, i.e. head and tail can't be equal. spu_buff_add() 55 * is called to lock the buffer, head and tail. spu_buff_add() 59 if (spu_buff[spu].head >= spu_buff[spu].tail) { spu_buff_add() 60 if ((spu_buff[spu].head - spu_buff[spu].tail) spu_buff_add() 64 } else if (spu_buff[spu].tail > spu_buff[spu].head) { spu_buff_add() 65 if ((spu_buff[spu].tail - spu_buff[spu].head) spu_buff_add() 104 /* Hold the lock to make sure the head/tail sync_spu_buff() 117 spu_buff[spu].tail, sync_spu_buff() 121 spu_buff[spu].tail = curr_head; sync_spu_buff() 471 spu_buff[spu].tail = 0; oprofile_spu_buff_create()
|
/linux-4.4.14/drivers/scsi/arcmsr/ |
H A D | arcmsr_attr.c | 83 unsigned int tail = acb->rqbuf_getIndex; arcmsr_sysfs_iop_message_read() local 85 unsigned int cnt_to_end = CIRC_CNT_TO_END(head, tail, ARCMSR_MAX_QBUFFER); arcmsr_sysfs_iop_message_read() 87 allxfer_len = CIRC_CNT(head, tail, ARCMSR_MAX_QBUFFER); arcmsr_sysfs_iop_message_read() 92 memcpy(ptmpQbuffer, acb->rqbuffer + tail, allxfer_len); arcmsr_sysfs_iop_message_read() 94 memcpy(ptmpQbuffer, acb->rqbuffer + tail, cnt_to_end); arcmsr_sysfs_iop_message_read()
|
/linux-4.4.14/drivers/net/ethernet/cavium/thunder/ |
H A D | nicvf_queues.c | 196 int head, tail; nicvf_free_rbdr() local 209 tail = rbdr->tail; nicvf_free_rbdr() 212 while (head != tail) { nicvf_free_rbdr() 220 /* Free SKB of tail desc */ nicvf_free_rbdr() 221 desc = GET_RBDR_DESC(rbdr, tail); nicvf_free_rbdr() 236 int tail, qcount; nicvf_refill_rbdr() local 261 /* Start filling descs from tail */ nicvf_refill_rbdr() 262 tail = nicvf_queue_reg_read(nic, NIC_QSET_RBDR_0_1_TAIL, rbdr_idx) >> 3; nicvf_refill_rbdr() 264 tail++; nicvf_refill_rbdr() 265 tail &= (rbdr->dmem.q_len - 1); nicvf_refill_rbdr() 270 desc = GET_RBDR_DESC(rbdr, tail); nicvf_refill_rbdr() 365 sq->tail = 0; nicvf_init_snd_queue() 434 /* Save head and tail pointers for feeing up buffers */ nicvf_reclaim_rbdr() 438 rbdr->tail = nicvf_queue_reg_read(nic, nicvf_reclaim_rbdr() 842 qentry = sq->tail; nicvf_get_sq_desc() 844 sq->tail += desc_cnt; nicvf_get_sq_desc() 845 sq->tail &= (sq->dmem.q_len - 1); nicvf_get_sq_desc() 888 u64 head, tail; nicvf_sq_free_used_descs() local 894 tail = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_TAIL, qidx) >> 4; nicvf_sq_free_used_descs()
|
/linux-4.4.14/drivers/pnp/ |
H A D | quirks.c | 141 struct pnp_option *tail = NULL, *first_new_option = NULL; pnp_clone_dependent_set() local 147 tail = option; pnp_clone_dependent_set() 149 if (!tail) { pnp_clone_dependent_set() 171 list_add(&new_option->list, &tail->list); pnp_clone_dependent_set() 172 tail = new_option; pnp_clone_dependent_set()
|
/linux-4.4.14/arch/tile/include/arch/ |
H A D | mpipe.h | 287 * For writes, this specifies the current ring tail pointer prior to any 290 * masked based on the ring size. The new tail pointer after this post 304 * current view of the state of the tail pointer. 314 * For writes, this specifies the generation number of the tail being 315 * posted. Note that if tail+cnt wraps to the beginning of the ring, the
|
/linux-4.4.14/net/sunrpc/auth_gss/ |
H A D | svcauth_gss.c | 871 return buf->head[0].iov_len + buf->page_len + buf->tail[0].iov_len; total_buf_len() 1600 if (resbuf->tail[0].iov_base == NULL) { svcauth_gss_wrap_resp_integ() 1603 resbuf->tail[0].iov_base = resbuf->head[0].iov_base svcauth_gss_wrap_resp_integ() 1605 resbuf->tail[0].iov_len = 0; svcauth_gss_wrap_resp_integ() 1607 resv = &resbuf->tail[0]; svcauth_gss_wrap_resp_integ() 1646 * If there is currently tail data, make sure there is svcauth_gss_wrap_resp_priv() 1647 * room for the head, tail, and 2 * RPC_MAX_AUTH_SIZE in svcauth_gss_wrap_resp_priv() 1648 * the page, and move the current tail data such that svcauth_gss_wrap_resp_priv() 1650 * both the head and tail. svcauth_gss_wrap_resp_priv() 1652 if (resbuf->tail[0].iov_base) { svcauth_gss_wrap_resp_priv() 1653 BUG_ON(resbuf->tail[0].iov_base >= resbuf->head[0].iov_base svcauth_gss_wrap_resp_priv() 1655 BUG_ON(resbuf->tail[0].iov_base < resbuf->head[0].iov_base); svcauth_gss_wrap_resp_priv() 1656 if (resbuf->tail[0].iov_len + resbuf->head[0].iov_len svcauth_gss_wrap_resp_priv() 1659 memmove(resbuf->tail[0].iov_base + RPC_MAX_AUTH_SIZE, svcauth_gss_wrap_resp_priv() 1660 resbuf->tail[0].iov_base, svcauth_gss_wrap_resp_priv() 1661 resbuf->tail[0].iov_len); svcauth_gss_wrap_resp_priv() 1662 resbuf->tail[0].iov_base += RPC_MAX_AUTH_SIZE; svcauth_gss_wrap_resp_priv() 1665 * If there is no current tail data, make sure there is svcauth_gss_wrap_resp_priv() 1667 * allotted page, and set up tail information such that there svcauth_gss_wrap_resp_priv() 1669 * head and tail. svcauth_gss_wrap_resp_priv() 1671 if (resbuf->tail[0].iov_base == NULL) { svcauth_gss_wrap_resp_priv() 1674 resbuf->tail[0].iov_base = resbuf->head[0].iov_base svcauth_gss_wrap_resp_priv() 1676 resbuf->tail[0].iov_len = 0; svcauth_gss_wrap_resp_priv() 1682 p = (__be32 *)(resbuf->tail[0].iov_base + resbuf->tail[0].iov_len); svcauth_gss_wrap_resp_priv() 1684 resbuf->tail[0].iov_len += pad; svcauth_gss_wrap_resp_priv()
|
H A D | gss_krb5_crypto.c | 411 * of page 2, tail. Anything more is a bug. */ encryptor() 503 * of page 2, tail. Anything more is a bug. */ decryptor() 562 * The client auth_gss code moves any existing tail data into a 565 * tail have slack space of RPC_MAX_AUTH_SIZE before calling gss_wrap. 678 if (buf->tail[0].iov_base != NULL) { gss_krb5_aes_encrypt() 679 ecptr = buf->tail[0].iov_base + buf->tail[0].iov_len; gss_krb5_aes_encrypt() 681 buf->tail[0].iov_base = buf->head[0].iov_base gss_krb5_aes_encrypt() 683 buf->tail[0].iov_len = 0; gss_krb5_aes_encrypt() 684 ecptr = buf->tail[0].iov_base; gss_krb5_aes_encrypt() 689 buf->tail[0].iov_len += GSS_KRB5_TOK_HDR_LEN; gss_krb5_aes_encrypt() 694 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; gss_krb5_aes_encrypt() 750 buf->tail[0].iov_len += kctx->gk5e->cksumlength; gss_krb5_aes_encrypt()
|
/linux-4.4.14/drivers/net/ethernet/intel/i40evf/ |
H A D | i40e_adminq.c | 51 /* set head and tail registers in our local struct */ i40e_adminq_init_regs() 53 hw->aq.asq.tail = I40E_VF_ATQT1; i40e_adminq_init_regs() 58 hw->aq.arq.tail = I40E_VF_ARQT1; i40e_adminq_init_regs() 296 wr32(hw, hw->aq.asq.tail, 0); i40e_config_asq_regs() 325 wr32(hw, hw->aq.arq.tail, 0); i40e_config_arq_regs() 333 /* Update tail in the HW to post pre-allocated buffers */ i40e_config_arq_regs() 334 wr32(hw, hw->aq.arq.tail, hw->aq.num_arq_entries - 1); i40e_config_arq_regs() 481 wr32(hw, hw->aq.asq.tail, 0); i40e_shutdown_asq() 515 wr32(hw, hw->aq.arq.tail, 0); i40e_shutdown_arq() 778 /* bump the tail */ i40evf_asq_send_command() 786 wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); i40evf_asq_send_command() 948 /* set tail = the last cleaned desc index. */ i40evf_clean_arq_element() 949 wr32(hw, hw->aq.arq.tail, ntc); i40evf_clean_arq_element() 950 /* ntc is updated to tail + 1 */ i40evf_clean_arq_element()
|
/linux-4.4.14/drivers/net/wireless/mwifiex/ |
H A D | ie.c | 320 /* This function parses head and tail IEs, from cfg80211_beacon_data and sets 332 if (!info->tail || !info->tail_len) mwifiex_uap_parse_tail_ies() 345 hdr = (void *)(info->tail + parsed_len); mwifiex_uap_parse_tail_ies() 368 /* parse only WPA vendor IE from tail, WMM IE is configured by mwifiex_uap_parse_tail_ies() 373 info->tail, info->tail_len); mwifiex_uap_parse_tail_ies() 402 /* This function parses different IEs-head & tail IEs, beacon IEs,
|
/linux-4.4.14/drivers/net/ethernet/toshiba/ |
H A D | spider_net.c | 354 chain->tail = chain->ring; spider_net_init_chain() 448 * spider_net_enable_rxchtails - sets RX dmac chain tail addresses 451 * spider_net_enable_rxchtails sets the RX DMAC chain tail addresses in the 460 card->rx_chain.tail->bus_addr); spider_net_enable_rxchtails() 531 struct spider_net_descr *start = chain->tail; spider_net_alloc_rx_skbs() 677 if (descr->next == chain->tail->prev) { spider_net_prepare_tx_descr() 716 struct spider_net_descr *descr = card->tx_chain.tail; spider_net_set_low_watermark() 738 descr = card->tx_chain.tail; spider_net_set_low_watermark() 782 if (chain->tail == chain->head) { spider_net_release_tx_chain() 786 descr = chain->tail; spider_net_release_tx_chain() 823 chain->tail = descr->next; spider_net_release_tx_chain() 860 descr = card->tx_chain.tail; spider_net_kick_tx_dma() 913 * packets, including updating the queue tail pointer. 993 struct spider_net_descr *start= chain->tail; show_rx_chain() 1007 dev_info(dev, "Chain tail located at descr=%d, status=0x%x\n", show_rx_chain() 1121 /* Advance tail pointer past any empty and reaped descrs */ spider_net_resync_tail_ptr() 1122 descr = chain->tail; spider_net_resync_tail_ptr() 1131 chain->tail = descr; spider_net_resync_tail_ptr() 1154 struct spider_net_descr *descr = chain->tail; spider_net_decode_one_descr() 1166 /* descriptor definitively used -- move on tail */ spider_net_decode_one_descr() 1167 chain->tail = descr->next; spider_net_decode_one_descr() 1464 if (card->tx_chain.tail != card->tx_chain.head) spider_net_handle_error_irq() 1788 /* set chain tail address for RX chains and spider_net_enable_card() 1857 * tail -q -n +2 Seq_code1_0x088.txt Seq_code2_0x090.txt \
|
/linux-4.4.14/fs/nfsd/ |
H A D | nfsxdr.c | 442 /* need to pad the tail */ nfssvc_encode_readlinkres() 443 rqstp->rq_res.tail[0].iov_base = p; nfssvc_encode_readlinkres() 445 rqstp->rq_res.tail[0].iov_len = 4 - (resp->len&3); nfssvc_encode_readlinkres() 461 /* need to pad the tail */ nfssvc_encode_readres() 462 rqstp->rq_res.tail[0].iov_base = p; nfssvc_encode_readres() 464 rqstp->rq_res.tail[0].iov_len = 4 - (resp->count&3); nfssvc_encode_readres()
|
/linux-4.4.14/net/vmw_vsock/ |
H A D | vmci_transport_notify.c | 193 u64 tail; send_waiting_read() local 209 vmci_qpair_get_consume_indexes(vmci_trans(vsk)->qpair, &tail, &head); send_waiting_read() 235 u64 tail; send_waiting_write() local 245 vmci_qpair_get_produce_indexes(vmci_trans(vsk)->qpair, &tail, &head); send_waiting_write() 246 room_left = vmci_trans(vsk)->produce_size - tail; send_waiting_write() 252 waiting_info.offset = tail + room_needed + 1; send_waiting_write()
|
/linux-4.4.14/arch/x86/kernel/ |
H A D | tsc.c | 48 * writing a new data entry and a reader advances the tail when it observes a 72 struct cyc2ns_data *tail; /* 56 + 8 = 64 */ member in struct:cyc2ns 99 * If we're the outer most nested read; update the tail pointer cyc2ns_read_end() 112 this_cpu_write(cyc2ns.tail, head); cyc2ns_read_end() 134 * When we observe the tail write from cyc2ns_read_end(), cyc2ns_write_begin() 138 while (c2n->tail == data) cyc2ns_write_begin() 197 c2n->tail = c2n->data; cyc2ns_init() 202 struct cyc2ns_data *data, *tail; cycles_2_ns() local 208 * Notable, it allows us to only do the __count and tail update cycles_2_ns() 214 tail = this_cpu_read(cyc2ns.tail); cycles_2_ns() 216 if (likely(data == tail)) { cycles_2_ns() 230 this_cpu_write(cyc2ns.tail, data); cycles_2_ns()
|