Home
last modified time | relevance | path

Searched refs:locks (Results 1 – 25 of 180) sorted by relevance

12345678

/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_lockdep.c98 struct amdgpu_lockdep_dummy_locks *locks; in amdgpu_lockdep_init() local
101 locks = kzalloc_obj(*locks); in amdgpu_lockdep_init()
102 if (!locks) in amdgpu_lockdep_init()
111 kfree(locks); in amdgpu_lockdep_init()
115 mutex_init(&locks->userq_sch_mutex); in amdgpu_lockdep_init()
116 mutex_init(&locks->userq_mutex); in amdgpu_lockdep_init()
117 mutex_init(&locks->notifier_lock); in amdgpu_lockdep_init()
118 mutex_init(&locks->vram_lock); in amdgpu_lockdep_init()
119 mutex_init(&locks->reset_lock); in amdgpu_lockdep_init()
120 mutex_init(&locks->srbm_mutex); in amdgpu_lockdep_init()
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dres_spin_lock.c87 struct bpf_res_spin_lock *locks[48] = {}; in res_spin_lock_test_held_lock_max() local
92 _Static_assert(ARRAY_SIZE(((struct rqspinlock_held){}).locks) == 31, in res_spin_lock_test_held_lock_max()
104 locks[i] = &e->lock; in res_spin_lock_test_held_lock_max()
116 locks[i] = &e->lock; in res_spin_lock_test_held_lock_max()
121 if (bpf_res_spin_lock(locks[i])) in res_spin_lock_test_held_lock_max()
128 ret = bpf_res_spin_lock(locks[34]); in res_spin_lock_test_held_lock_max()
130 bpf_res_spin_unlock(locks[34]); in res_spin_lock_test_held_lock_max()
139 bpf_res_spin_unlock(locks[i]); in res_spin_lock_test_held_lock_max()
H A Dtest_helper_restricted.c26 } locks SEC(".maps");
52 lock = bpf_map_lookup_elem(&locks, &key); in spin_lock_work()
/linux/kernel/locking/
H A Dtest-ww_mutex.c391 struct ww_mutex *locks; member
440 struct ww_mutex *locks = stress->locks; in stress_inorder_work() local
459 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
467 ww_mutex_unlock(&locks[order[contended]]); in stress_inorder_work()
470 ww_mutex_unlock(&locks[order[n]]); in stress_inorder_work()
474 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
498 LIST_HEAD(locks); in stress_reorder_work()
513 ll->lock = &stress->locks[order[n]]; in stress_reorder_work()
514 list_add(&ll->link, &locks); in stress_reorder_work()
522 list_for_each_entry(ll, &locks, link) { in stress_reorder_work()
[all …]
/linux/lib/
H A Dbucket_locks.c14 int __alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *locks_mask, in __alloc_bucket_spinlocks() argument
43 *locks = tlocks; in __alloc_bucket_spinlocks()
50 void free_bucket_spinlocks(spinlock_t *locks) in free_bucket_spinlocks() argument
52 kvfree(locks); in free_bucket_spinlocks()
/linux/include/linux/
H A Dblockgroup_lock.h24 struct bgl_lock locks[NR_BG_LOCKS]; member
32 spin_lock_init(&bgl->locks[i].lock); in bgl_lock_init()
38 return &bgl->locks[block_group & (NR_BG_LOCKS-1)].lock; in bgl_lock_ptr()
/linux/tools/testing/selftests/ftrace/test.d/ftrace/
H A Dfgraph-multi-filter.tc98 locks_clock_cnt=`function_count locks clock`
99 clock_locks_cnt=`function_count clock locks`
167 check_cnt $locks_clock_cnt locks clock
170 check_cnt $clock_locks_cnt clock locks
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8192d/
H A Dphy_common.h39 spin_lock_irqsave(&rtlpriv->locks.cck_and_rw_pagea_lock, *flag); in rtl92d_acquire_cckandrw_pagea_ctl()
51 spin_unlock_irqrestore(&rtlpriv->locks.cck_and_rw_pagea_lock, in rtl92d_release_cckandrw_pagea_ctl()
99 spin_lock(&rtlpriv->locks.rf_lock); in rtl92d_pci_lock()
105 spin_unlock(&rtlpriv->locks.rf_lock); in rtl92d_pci_unlock()
/linux/Documentation/locking/
H A Dlockdep-design.rst11 The basic object the validator operates upon is a 'class' of locks.
13 A class of locks is a group of locks that are logically the same with
14 respect to locking rules, even if the locks may have multiple (possibly
24 perspective, the two locks (L1 and L2) are not necessarily related; that
111 Unused locks (e.g., mutexes) cannot be part of the cause of an error.
143 Furthermore, two locks can not be taken in inverse order::
149 deadlock - as attempts to acquire the two locks form a circle which
153 operations; the validator will still find whether these locks can be
170 any rule violation between the new lock and any of the held locks.
188 could interrupt _any_ of the irq-unsafe or hardirq-unsafe locks, which
[all …]
H A Dmutex-design.rst15 or similar theoretical text books. Mutexes are sleeping locks which
27 and implemented in kernel/locking/mutex.c. These locks use an atomic variable
69 While formally kernel mutexes are sleepable locks, it is path (ii) that
86 - Memory areas where held locks reside must not be freed.
98 list of all locks held in the system, printout of them.
100 - Detects self-recursing locks and prints out all relevant info.
102 locks and tasks (and only those tasks).
104 Mutexes - and most other sleeping locks like rwsems - do not provide an
161 locks in the kernel. E.g: on x86-64 it is 32 bytes, where 'struct semaphore'
H A Dpi-futex.rst32 Firstly, sharing locks between multiple tasks is a common programming
46 short-held locks: for example, a highprio audio playback thread is
51 So once we accept that synchronization objects (locks) are an
53 apps have a very fair expectation of being able to use locks, we've got
58 inheritance only apply to kernel-space locks. But user-space locks are
64 locks (such as futex-based pthread mutexes) is priority inheritance:
80 normal futex-based locks: a 0 value means unlocked, and a value==TID
/linux/tools/memory-model/
H A Dlinux-kernel.bell58 unmatched-locks = Rcu-lock \ domain(matched)
60 and unmatched = unmatched-locks | unmatched-unlocks
62 and unmatched-locks-to-unlocks =
63 [unmatched-locks] ; po ; [unmatched-unlocks]
64 and matched = matched | (unmatched-locks-to-unlocks \
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/
H A Dfw.c49 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
56 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8723e_fill_h2c_command()
66 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8723e_fill_h2c_command()
69 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
72 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
225 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
227 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
/linux/Documentation/gpu/rfc/
H A Dgpusvm.rst13 * No driver specific locks other than locks for hardware interaction in
15 invent driver defined locks to seal core MM races.
27 * Only looking at physical memory data structures and locks as opposed to
28 looking at virtual memory data structures and locks.
38 pagetable locks/mmu notifier range lock/whatever we end up calling
41 should not be handled on the fault side by trying to hold locks;
/linux/tools/testing/selftests/futex/functional/
H A Drobust_list.c7 * The robust list uAPI allows userspace to create "robust" locks, in the sense
13 * locks (futexes) that it is holding. The robust list is a linked list, and
451 struct lock_struct *locks = cargs->arg; in child_wait_lock()
460 locks[i].futex = 0; in child_wait_lock()
461 mutex_lock(&locks[i], &head, false); in child_wait_lock()
500 struct lock_struct locks[CHILD_NR]; in TEST()
509 pids[0] = create_child(_metadata, &child_lock_holder, &locks);
516 pids[i+1] = create_child(_metadata, &child_wait_lock, &locks[i]); in child_circular_list()
428 struct lock_struct *locks = arg; child_lock_holder() local
476 struct lock_struct locks[CHILD_NR]; TEST() local
/linux/net/unix/
H A Ddiag.c192 spin_lock(&net->unx.table.locks[slot]); in unix_diag_dump()
210 spin_unlock(&net->unx.table.locks[slot]); in unix_diag_dump()
216 spin_unlock(&net->unx.table.locks[slot]); in unix_diag_dump()
231 spin_lock(&net->unx.table.locks[i]); in unix_lookup_by_ino()
235 spin_unlock(&net->unx.table.locks[i]); in unix_lookup_by_ino()
239 spin_unlock(&net->unx.table.locks[i]); in unix_lookup_by_ino()
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8723be/
H A Dfw.c47 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
54 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
64 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
67 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
70 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
190 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
192 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
H A Dhw.c37 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in _rtl8723be_return_beacon_queue_skb()
49 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in _rtl8723be_return_beacon_queue_skb()
119 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
122 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
127 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
129 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
132 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
158 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
160 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
165 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl8723be_set_fw_clock_on()
[all …]
/linux/drivers/net/wireless/realtek/rtlwifi/
H A Dcore.c128 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
132 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
156 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
171 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
217 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
304 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
314 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
339 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
580 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
759 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
[all …]
H A Dpci.c393 spin_lock_bh(&rtlpriv->locks.waitq_lock); in _rtl_update_earlymode_info()
413 spin_unlock_bh(&rtlpriv->locks.waitq_lock); in _rtl_update_earlymode_info()
443 spin_lock(&rtlpriv->locks.waitq_lock); in _rtl_pci_tx_chk_waitq()
449 spin_unlock(&rtlpriv->locks.waitq_lock); in _rtl_pci_tx_chk_waitq()
452 spin_unlock(&rtlpriv->locks.waitq_lock); in _rtl_pci_tx_chk_waitq()
866 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in _rtl_pci_interrupt()
1010 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in _rtl_pci_interrupt()
1461 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in rtl_pci_reset_trx_ring()
1494 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in rtl_pci_reset_trx_ring()
1531 spin_lock_bh(&rtlpriv->locks.waitq_lock); in rtl_pci_tx_chk_waitq_insert()
[all …]
/linux/kernel/bpf/
H A Drqspinlock.c109 if (rqh->locks[i] == lock) in check_deadlock_AA()
163 remote_lock = READ_ONCE(rqh_cpu->locks[cnt - 1]); in check_deadlock_ABBA()
178 if (READ_ONCE(rqh_cpu->locks[i]) != lock) in check_deadlock_ABBA()
187 if (rqh->locks[i] == remote_lock) in check_deadlock_ABBA()
687 bpf_stream_printk(ss, "Held lock[%2d] = 0x%px\n", i, rqh->locks[i]); in bpf_prog_report_rqspinlock_violation()
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/
H A Dfw.c194 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
201 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl92ee_fill_h2c_command()
211 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl92ee_fill_h2c_command()
214 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
217 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
348 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
350 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8192c/
H A Dfw_common.c204 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92c_fill_h2c_command()
210 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl92c_fill_h2c_command()
220 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl92c_fill_h2c_command()
223 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92c_fill_h2c_command()
226 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92c_fill_h2c_command()
377 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92c_fill_h2c_command()
379 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92c_fill_h2c_command()
/linux/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/
H A Dhw.c75 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in _rtl88ee_return_beacon_queue_skb()
87 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in _rtl88ee_return_beacon_queue_skb()
114 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
117 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
122 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
124 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
127 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
152 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
154 spin_unlock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
161 spin_lock_bh(&rtlpriv->locks.fw_ps_lock); in _rtl88ee_set_fw_clock_on()
[all …]
/linux/Documentation/driver-api/soundwire/
H A Dlocking.rst6 following locks in order to avoid race conditions in Bus operations on
33 Below examples show how locks are acquired.

12345678