/openbmc/linux/tools/testing/selftests/netfilter/ |
H A D | nft_queue.sh | 7 # Kselftest framework requirement - SKIP code is 4. 11 sfx=$(mktemp -u "XXXXXXXX") 12 ns1="ns1-$sfx" 13 ns2="ns2-$sfx" 14 nsrouter="nsrouter-$sfx" 26 rm -f "$TMPFILE0" 27 rm -f "$TMPFILE1" 28 rm -f "$TMPFILE2" "$TMPFILE3" 31 nft --version > /dev/null 2>&1 32 if [ $? -ne 0 ];then [all …]
|
/openbmc/linux/drivers/infiniband/hw/hfi1/ |
H A D | iowait.h | 1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 3 * Copyright(c) 2015 - 2018 Intel Corporation. 11 #include <linux/wait.h> 17 * typedef (*restart_t)() - restart callback 57 * @list: used to add/insert into QP/PQ wait lists 63 * @lock: lock protected head of wait queue 65 * @wait_dma: wait for sdma_busy == 0 66 * @wait_pio: wait for pio_busy == 0 71 * @flags: wait flags (one per QP) 72 * @wait: SE array for multiple legs [all …]
|
/openbmc/linux/drivers/net/wwan/iosm/ |
H A D | iosm_ipc_task_queue.h | 1 /* SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2020-21 Intel Corporation. 9 /* Number of available element for the input message queue of the IPC 15 * struct ipc_task_queue_args - Struct for Task queue elements 18 * @completion: OS object used to wait for the tasklet function to finish for 40 * struct ipc_task_queue - Struct for Task queue 41 * @q_lock: Protect the message queue of the ipc ipc_task 42 * @args: Message queue of the IPC ipc_task 43 * @q_rpos: First queue element to process. 44 * @q_wpos: First free element of the input queue. [all …]
|
H A D | iosm_ipc_task_queue.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2020-21 Intel Corporation. 10 * Calls event handler involves callback for each element in the message queue 15 unsigned int q_rpos = ipc_task->q_rpos; in ipc_task_queue_handler() 17 /* Loop over the input queue contents. */ in ipc_task_queue_handler() 18 while (q_rpos != ipc_task->q_wpos) { in ipc_task_queue_handler() 19 /* Get the current first queue element. */ in ipc_task_queue_handler() 20 struct ipc_task_queue_args *args = &ipc_task->args[q_rpos]; in ipc_task_queue_handler() 23 if (args->func) in ipc_task_queue_handler() 24 args->response = args->func(args->ipc_imem, args->arg, in ipc_task_queue_handler() [all …]
|
/openbmc/linux/kernel/sched/ |
H A D | wait.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 spin_lock_init(&wq_head->lock); in __init_waitqueue_head() 11 lockdep_set_class_and_name(&wq_head->lock, key, name); in __init_waitqueue_head() 12 INIT_LIST_HEAD(&wq_head->head); in __init_waitqueue_head() 21 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in add_wait_queue() 22 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue() 24 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue() 32 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in add_wait_queue_exclusive() 33 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue_exclusive() 35 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue_exclusive() [all …]
|
/openbmc/linux/include/linux/ |
H A D | sbitmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 6 * Copyright (C) 2013-2014 Jens Axboe 22 #include <linux/wait.h> 27 * struct sbitmap_word - Word in a &struct sbitmap. 41 * @swap_lock: serializes simultaneous updates of ->word and ->cleared 47 * struct sbitmap - Scalable bitmap. 49 * A &struct sbitmap is spread over multiple cachelines to avoid ping-pong. This 69 * @round_robin: Allocate bits in strict round-robin order. 81 * This is per-cpu, which allows multiple users to stick to different 91 * struct sbq_wait_state - Wait queue in a &struct sbitmap_queue. [all …]
|
H A D | uacce.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 17 * struct uacce_qfile_region - structure of queue file region 25 * struct uacce_ops - uacce device operations 27 * @get_queue: get a queue from the device 28 * @put_queue: free a queue to the device 29 * @start_queue: make the queue start work after get_queue 30 * @stop_queue: make the queue stop work before put_queue 32 * @mmap: mmap addresses of queue to user space 33 * @ioctl: ioctl for user space users of the queue 56 * struct uacce_interface - interface required for uacce_register() [all …]
|
H A D | wait.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 * Linux wait queue related types and methods 12 #include <uapi/linux/wait.h> 28 * A single wait-queue entry structure: 84 wq_entry->flags = 0; in init_waitqueue_entry() 85 wq_entry->private = p; in init_waitqueue_entry() 86 wq_entry->func = default_wake_function; in init_waitqueue_entry() 92 wq_entry->flags = 0; in init_waitqueue_func_entry() 93 wq_entry->private = NULL; in init_waitqueue_func_entry() 94 wq_entry->func = func; in init_waitqueue_func_entry() [all …]
|
/openbmc/linux/net/sunrpc/ |
H A D | sched.c | 1 // SPDX-License-Identifier: GPL-2.0-only 54 * rpciod-related stuff 62 if (current->flags & PF_WQ_WORKER) in rpc_task_gfp_mask() 70 if (cmpxchg(&task->tk_rpc_status, 0, rpc_status) == 0) in rpc_task_set_rpc_status() 78 unsigned long timeout = READ_ONCE(task->tk_timeout); in rpc_task_timeout() 83 return timeout - now; in rpc_task_timeout() 91 * queue->lock and bh_disabled in order to avoid races within 95 __rpc_disable_timer(struct rpc_wait_queue *queue, struct rpc_task *task) in __rpc_disable_timer() argument 97 if (list_empty(&task->u.tk_wait.timer_list)) in __rpc_disable_timer() 99 task->tk_timeout = 0; in __rpc_disable_timer() [all …]
|
/openbmc/linux/net/core/ |
H A D | stream.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * protocols. Even IP. Tonight 8-). 13 * Alan Cox <alan@lxorguk.ukuu.org.uk> (Borrowed comments 8-)) 21 #include <linux/wait.h> 25 * sk_stream_write_space - stream socket write_space callback. 32 struct socket *sock = sk->sk_socket; in sk_stream_write_space() 36 clear_bit(SOCK_NOSPACE, &sock->flags); in sk_stream_write_space() 39 wq = rcu_dereference(sk->sk_wq); in sk_stream_write_space() 41 wake_up_interruptible_poll(&wq->wait, EPOLLOUT | in sk_stream_write_space() 43 if (wq && wq->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN)) in sk_stream_write_space() [all …]
|
/openbmc/linux/drivers/usb/gadget/function/ |
H A D | uvc_queue.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * uvc_queue.c -- USB Video Class driver - Buffers management 5 * Copyright (C) 2005-2010 17 #include <linux/wait.h> 19 #include <media/v4l2-common.h> 20 #include <media/videobuf2-dma-sg.h> 21 #include <media/videobuf2-vmalloc.h> 25 /* ------------------------------------------------------------------------ 26 * Video buffers queue management. 32 * the videobuf2 queue operations by serializing calls to videobuf2 and a [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/ |
H A D | com.fuc | 27 // queue_put - add request to queue 29 // In : $r13 queue pointer 44 // store cmd/data on queue 59 // queue_get - fetch request from queue 61 // In : $r13 queue pointer 89 // nv_rd32 - read 32-bit value from nv register 107 // nv_wr32 - write 32-bit value to nv register 124 // wait_donez - wait on FUC_DONE bit to become clear 126 // In : $r10 bit to wait on 138 // wait_doneo - wait on FUC_DONE bit to become set [all …]
|
/openbmc/linux/fs/autofs/ |
H A D | waitq.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved 4 * Copyright 2001-2006 Ian Kent <raven@themaw.net> 19 mutex_lock(&sbi->wq_mutex); in autofs_catatonic_mode() 20 if (sbi->flags & AUTOFS_SBI_CATATONIC) { in autofs_catatonic_mode() 21 mutex_unlock(&sbi->wq_mutex); in autofs_catatonic_mode() 27 sbi->flags |= AUTOFS_SBI_CATATONIC; in autofs_catatonic_mode() 28 wq = sbi->queues; in autofs_catatonic_mode() 29 sbi->queues = NULL; /* Erase all wait queues */ in autofs_catatonic_mode() 31 nwq = wq->next; in autofs_catatonic_mode() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_base.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * __ice_vsi_get_qs_contig - Assign a contiguous chunk of queues to VSI 12 * @qs_cfg: gathered variables needed for PF->VSI queues assignment 14 * Return 0 on success and -ENOMEM in case of no left space in PF queue bitmap 20 mutex_lock(qs_cfg->qs_mutex); in __ice_vsi_get_qs_contig() 21 offset = bitmap_find_next_zero_area(qs_cfg->pf_map, qs_cfg->pf_map_size, in __ice_vsi_get_qs_contig() 22 0, qs_cfg->q_count, 0); in __ice_vsi_get_qs_contig() 23 if (offset >= qs_cfg->pf_map_size) { in __ice_vsi_get_qs_contig() 24 mutex_unlock(qs_cfg->qs_mutex); in __ice_vsi_get_qs_contig() 25 return -ENOMEM; in __ice_vsi_get_qs_contig() [all …]
|
/openbmc/linux/drivers/accel/habanalabs/common/ |
H A D | hw_queue.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright 2016-2019 HabanaLabs, Ltd. 13 * hl_queue_add_ptr - add to pi or ci and checks if it wraps around 18 * Add val to ptr. It can go until twice the queue length. 23 ptr &= ((HL_QUEUE_LENGTH << 1) - 1); in hl_hw_queue_add_ptr() 28 return atomic_read(ci) & ((queue_len << 1) - 1); in queue_ci_get() 33 int delta = (q->pi - queue_ci_get(&q->ci, queue_len)); in queue_free_slots() 36 return (queue_len - delta); in queue_free_slots() 38 return (abs(delta) - queue_len); in queue_free_slots() 43 struct hl_device *hdev = cs->ctx->hdev; in hl_hw_queue_update_ci() [all …]
|
/openbmc/qemu/util/ |
H A D | qemu-coroutine-lock.c | 24 * The lock-free mutex implementation is based on OSv 32 #include "qemu/queue.h" 36 void qemu_co_queue_init(CoQueue *queue) in qemu_co_queue_init() argument 38 QSIMPLEQ_INIT(&queue->entries); in qemu_co_queue_init() 41 void coroutine_fn qemu_co_queue_wait_impl(CoQueue *queue, QemuLockable *lock, in qemu_co_queue_wait_impl() argument 46 QSIMPLEQ_INSERT_HEAD(&queue->entries, self, co_queue_next); in qemu_co_queue_wait_impl() 48 QSIMPLEQ_INSERT_TAIL(&queue->entries, self, co_queue_next); in qemu_co_queue_wait_impl() 63 /* TODO: OSv implements wait morphing here, where the wakeup in qemu_co_queue_wait_impl() 65 * mutex's queue. This avoids the thundering herd effect. in qemu_co_queue_wait_impl() 74 bool qemu_co_enter_next_impl(CoQueue *queue, QemuLockable *lock) in qemu_co_enter_next_impl() argument [all …]
|
/openbmc/linux/drivers/s390/crypto/ |
H A D | ap_bus.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 89 * AP queue state machine states 103 * AP queue state machine events 112 * AP queue state wait behaviour 116 AP_SM_WAIT_HIGH_TIMEOUT, /* poll high freq, wait for timeout */ 117 AP_SM_WAIT_LOW_TIMEOUT, /* poll low freq, wait for timeout */ 118 AP_SM_WAIT_INTERRUPT, /* wait for thin interrupt (if available) */ 119 AP_SM_WAIT_NONE, /* no wait */ 124 * AP queue device states 128 AP_DEV_STATE_OPERATING, /* queue dev is working normal */ [all …]
|
/openbmc/linux/kernel/locking/ |
H A D | qspinlock_paravirt.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 16 * pv_wait(u8 *ptr, u8 val) -- suspends the vcpu if *ptr == val 17 * pv_kick(cpu) -- wakes a suspended vcpu 27 * Queue Node Adaptive Spinning 29 * A queue node vCPU will stop spinning if the vCPU in the previous node is 31 * mitigates the slight slowdown for non-overcommitted guest with this 32 * aggressive wait-early mechanism. 41 * Queue node uses: vcpu_running & vcpu_halted. 42 * Queue head uses: vcpu_running & vcpu_hashed. 63 * The pending bit is set by the queue head vCPU of the MCS wait queue in [all …]
|
H A D | qspinlock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. 6 * (C) Copyright 2013-2014,2018 Red Hat, Inc. 8 * (C) Copyright 2015 Hewlett-Packard Enterprise Development LP 33 * The basic principle of a queue-based spinlock can best be understood 34 * by studying a classic queue-based spinlock implementation called the 36 * Synchronization on Shared-Memory Multiprocessors by Mellor-Crummey and 47 * unlock the next pending (next->locked), we compress both these: {tail, 48 * next->locked} into a single u32 value. 52 * are at most 4 nesting levels, it can be encoded by a 2-bit number. Now [all …]
|
H A D | lock_events_list.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 29 LOCK_EVENT(pv_latency_wake) /* Average latency (ns) of kick-to-wakeup */ 31 LOCK_EVENT(pv_spurious_wakeup) /* # of spurious wakeups in non-head vCPUs */ 32 LOCK_EVENT(pv_wait_again) /* # of wait's after queue head vCPU kick */ 33 LOCK_EVENT(pv_wait_early) /* # of early vCPU wait's */ 34 LOCK_EVENT(pv_wait_head) /* # of vCPU wait's at the queue head */ 35 LOCK_EVENT(pv_wait_node) /* # of vCPU wait's at non-head queue node */ 45 LOCK_EVENT(lock_slowpath) /* # of locking ops via MCS lock queue */ 59 LOCK_EVENT(rwsem_opt_lock) /* # of opt-acquired write locks */
|
/openbmc/linux/drivers/scsi/aacraid/ |
H A D | commsup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Copyright (c) 2000-2010 Adaptec, Inc. 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 11 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 42 * fib_map_alloc - allocate the fib objects 51 if (dev->max_fib_size > AAC_MAX_NATIVE_SIZE) in fib_map_alloc() 52 dev->max_cmd_size = AAC_MAX_NATIVE_SIZE; in fib_map_alloc() 54 dev->max_cmd_size = dev->max_fib_size; in fib_map_alloc() 55 if (dev->max_fib_size < AAC_MAX_NATIVE_SIZE) { in fib_map_alloc() 56 dev->max_cmd_size = AAC_MAX_NATIVE_SIZE; in fib_map_alloc() [all …]
|
/openbmc/linux/net/qrtr/ |
H A D | tun.c | 1 // SPDX-License-Identifier: GPL-2.0 15 struct sk_buff_head queue; member 23 skb_queue_tail(&tun->queue, skb); in qrtr_tun_send() 26 wake_up_interruptible(&tun->readq); in qrtr_tun_send() 38 return -ENOMEM; in qrtr_tun_open() 40 skb_queue_head_init(&tun->queue); in qrtr_tun_open() 41 init_waitqueue_head(&tun->readq); in qrtr_tun_open() 43 tun->ep.xmit = qrtr_tun_send; in qrtr_tun_open() 45 filp->private_data = tun; in qrtr_tun_open() 47 ret = qrtr_endpoint_register(&tun->ep, QRTR_EP_NID_AUTO); in qrtr_tun_open() [all …]
|
/openbmc/linux/arch/mips/include/asm/octeon/ |
H A D | cvmx-pow.h | 7 * Copyright (c) 2003-2008 Cavium Networks 14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 31 * New, starting with SDK 1.7.0, cvmx-pow supports a number of 36 * enabled. For example, cvmx-pow will check for the following 38 * - Requesting a POW operation with an active tag switch in 40 * - Waiting for a tag switch to complete for an excessively 43 * - Illegal tag switches from NULL_NULL. 44 * - Illegal tag switches from NULL. 45 * - Illegal deschedule request. [all …]
|
/openbmc/linux/drivers/net/ethernet/sfc/falcon/ |
H A D | selftest.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright 2005-2006 Fen Systems Ltd. 5 * Copyright 2006-2012 Solarflare Communications Inc. 26 * - All IRQs may be disabled on a CPU for a *long* time by e.g. a 28 * - The PREEMPT_RT patches mostly deal with this, but also allow a 38 * The self-test should stress every RSS vector, and unfortunately 42 char pad[2]; /* Ensures ip is 4-byte aligned */ 65 [EF4_INT_MODE_MSIX] = "MSI-X", 70 STRING_TABLE_LOOKUP(efx->interrupt_mode, ef4_interrupt_mode) 73 * struct ef4_loopback_state - persistent state during a loopback selftest [all …]
|
/openbmc/linux/drivers/block/rnbd/ |
H A D | rnbd-clt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved. 6 * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved. 7 * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved. 19 #include "rnbd-clt.h" 38 return refcount_inc_not_zero(&sess->refcount); in rnbd_clt_get_sess() 47 if (refcount_dec_and_test(&sess->refcount)) in rnbd_clt_put_sess() 55 if (!refcount_dec_and_test(&dev->refcount)) in rnbd_clt_put_dev() 58 ida_free(&index_ida, dev->clt_device_id); in rnbd_clt_put_dev() 59 kfree(dev->hw_queues); in rnbd_clt_put_dev() [all …]
|