| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | res_spin_lock.c | 87 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 D | test_helper_restricted.c | 26 } locks SEC(".maps"); 52 lock = bpf_map_lookup_elem(&locks, &key); in spin_lock_work()
|
| /linux/lib/ |
| H A D | bucket_locks.c | 14 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 D | blockgroup_lock.h | 24 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()
|
| H A D | spinlock.h | 497 * Decrements @atomic by 1. If the result is 0, returns true and locks 518 int __alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, 523 #define alloc_bucket_spinlocks(locks, lock_mask, max_size, cpu_mult, gfp) \ argument 528 ret = __alloc_bucket_spinlocks(locks, lock_mask, max_size, \ 529 cpu_mult, gfp, #locks, &key); \ 533 void free_bucket_spinlocks(spinlock_t *locks);
|
| /linux/Documentation/mm/ |
| H A D | process_addrs.rst | 36 on VMA **metadata** so a complicated set of locks are required to ensure memory 45 * **mmap locks** - Each MM has a read/write semaphore :c:member:`!mmap_lock` 46 which locks at a process address space granularity which can be acquired via 48 * **VMA locks** - The VMA lock is at VMA granularity (of course) which behaves 52 (all VMA write locks are unlocked 55 * **rmap locks** - When trying to access VMAs through the reverse mapping via a 61 locks as the reverse mapping locks, or 'rmap locks' for brevity. 63 We discuss page table locks separately in the dedicated section below. 65 The first thing **any** of these locks achieve is to **stabilise** the VMA 100 VMA locks are special in that you must obtain an mmap **write** lock **first** [all …]
|
| /linux/tools/testing/selftests/ftrace/test.d/ftrace/ |
| H A D | fgraph-multi-filter.tc | 98 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/Documentation/locking/ |
| H A D | robust-futex-ABI.rst | 9 futexes, for kernel assist of cleanup of held locks on task exit. 12 linked list in user space, where it can be updated efficiently as locks 19 2) internal kernel code at exit, to handle any listed locks held 32 to do so, then improperly listed locks will not be cleaned up on exit, 34 waiting on the same locks. 88 specified 'offset'. Should a thread die while holding any such locks, 89 the kernel will walk this list, mark any such locks with a bit 106 robust_futexes used by that thread. The thread should link those locks 108 other links between the locks, such as the reverse side of a double 111 By keeping its locks linked this way, on a list starting with a 'head' [all …]
|
| H A D | lockdep-design.rst | 11 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 D | mutex-design.rst | 15 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 D | pi-futex.rst | 32 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/drivers/net/wireless/realtek/rtlwifi/rtl8192d/ |
| H A D | fw_common.c | 234 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in rtl92d_fill_h2c_cmd() 241 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in rtl92d_fill_h2c_cmd() 252 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in rtl92d_fill_h2c_cmd() 255 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in rtl92d_fill_h2c_cmd() 258 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in rtl92d_fill_h2c_cmd() 356 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in rtl92d_fill_h2c_cmd() 358 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in rtl92d_fill_h2c_cmd()
|
| H A D | phy_common.h | 39 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/net/unix/ |
| H A D | diag.c | 187 spin_lock(&net->unx.table.locks[slot]); in unix_diag_dump() 205 spin_unlock(&net->unx.table.locks[slot]); in unix_diag_dump() 211 spin_unlock(&net->unx.table.locks[slot]); in unix_diag_dump() 226 spin_lock(&net->unx.table.locks[i]); in unix_lookup_by_ino() 230 spin_unlock(&net->unx.table.locks[i]); in unix_lookup_by_ino() 234 spin_unlock(&net->unx.table.locks[i]); in unix_lookup_by_ino()
|
| /linux/tools/memory-model/ |
| H A D | linux-kernel.bell | 58 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 D | fw.c | 49 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 D | gpusvm.rst | 13 * 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 D | robust_list.c | 428 struct lock_struct *locks = arg; in child_lock_holder() local 435 locks[i].futex = 0; in child_lock_holder() 436 mutex_lock(&locks[i], &head, false); in child_lock_holder() 476 struct lock_struct locks[CHILD_NR]; in TEST() local 485 pids[0] = create_child(&child_lock_holder, &locks); in TEST() 491 pids[i+1] = create_child(&child_wait_lock, &locks[i]); in TEST()
|
| /linux/drivers/net/wireless/realtek/rtlwifi/ |
| H A D | core.c | 128 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 …]
|
| /linux/drivers/net/wireless/realtek/rtlwifi/rtl8723be/ |
| H A D | fw.c | 47 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()
|
| /linux/drivers/pci/ |
| H A D | vgaarb.c | 47 unsigned int locks; /* what it locks */ member 273 if (conflict->locks & lwants) in __vga_tryget() 344 vgadev->locks |= (rsrc & VGA_RSRC_LEGACY_MASK); in __vga_tryget() 360 unsigned int old_locks = vgadev->locks; in __vga_put() 388 vgadev->locks &= ~VGA_RSRC_LEGACY_IO; in __vga_put() 390 vgadev->locks &= ~VGA_RSRC_LEGACY_MEM; in __vga_put() 396 if (old_locks != vgadev->locks) in __vga_put() 811 vga_iostate_to_str(vgadev->locks)); in vga_arbiter_add_pci_device() 859 unsigned int decodes_unlocked = vgadev->locks & decodes_removed; in vga_update_device_decodes() 1112 vga_iostate_to_str(vgadev->locks), in vga_arb_read()
|
| /linux/kernel/bpf/ |
| H A D | rqspinlock.c | 106 * We'll iterate over max 32 locks; no need to do is_lock_released. in check_deadlock_AA() 109 if (rqh->locks[i] == lock) in check_deadlock_AA() 117 * more locks, which reduce to ABBA). This is not exhaustive, and we rely on 152 * acquired won't appear in the table, and other locks in the table are in check_deadlock_ABBA() 161 * and would be one of the locks we hold on the current CPU. in check_deadlock_ABBA() 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() 683 bpf_stream_printk(ss, "Total held locks = %d\n", rqh->cnt); in bpf_prog_report_rqspinlock_violation() 685 bpf_stream_printk(ss, "Held lock[%2d] = 0x%px\n", i, rqh->locks[ in bpf_prog_report_rqspinlock_violation() [all...] |
| /linux/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/ |
| H A D | fw.c | 194 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 D | fw_common.c | 204 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 D | hw.c | 75 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 …]
|