| /linux/fs/ocfs2/dlm/ |
| H A D | dlmthread.c | 40 /* will exit holding res->spinlock, but may drop in function */ 46 assert_spin_locked(&res->spinlock); in __dlm_wait_on_lockres_flags() 52 spin_unlock(&res->spinlock); in __dlm_wait_on_lockres_flags() 54 spin_lock(&res->spinlock); in __dlm_wait_on_lockres_flags() 78 assert_spin_locked(&res->spinlock); in __dlm_lockres_unused() 109 assert_spin_locked(&dlm->spinlock); in __dlm_lockres_calc_usage() 110 assert_spin_locked(&res->spinlock); in __dlm_lockres_calc_usage() 135 spin_lock(&dlm->spinlock); in dlm_lockres_calc_usage() 136 spin_lock(&res->spinlock); in dlm_lockres_calc_usage() 140 spin_unlock(&res->spinlock); in dlm_lockres_calc_usage() [all …]
|
| H A D | dlmconvert.c | 21 #include <linux/spinlock.h> 37 * needs a spinlock held on entry (res->spinlock) and it is the 38 * only one that holds a lock on exit (res->spinlock). 55 * taken: takes and drops res->spinlock 66 spin_lock(&res->spinlock); in dlmconvert_master() 76 spin_unlock(&res->spinlock); in dlmconvert_master() 95 * caller needs: res->spinlock 96 * taken: takes and drops lock->spinlock 97 * held on exit: res->spinlock 111 assert_spin_locked(&res->spinlock); in __dlmconvert_master() [all …]
|
| H A D | dlmunlock.c | 21 #include <linux/spinlock.h> 76 * taken: res->spinlock and lock->spinlock taken and dropped 114 spin_lock(&res->spinlock); in dlmunlock_common() 118 spin_unlock(&res->spinlock); in dlmunlock_common() 125 spin_lock(&lock->spinlock); in dlmunlock_common() 164 spin_unlock(&lock->spinlock); in dlmunlock_common() 165 spin_unlock(&res->spinlock); in dlmunlock_common() 168 spin_lock(&res->spinlock); in dlmunlock_common() 169 spin_lock(&lock->spinlock); in dlmunlock_common() 230 spin_unlock(&lock->spinlock); in dlmunlock_common() [all …]
|
| H A D | dlmlock.c | 22 #include <linux/spinlock.h> 68 * caller needs: res->spinlock 97 * taken: takes and drops res->spinlock 110 spin_lock(&res->spinlock); in dlmlock_master() 117 spin_unlock(&res->spinlock); in dlmlock_master() 165 spin_unlock(&res->spinlock); in dlmlock_master() 193 * taken: takes and drops res->spinlock 212 spin_lock(&res->spinlock); in dlmlock_remote() 215 spin_unlock(&res->spinlock); in dlmlock_remote() 224 spin_unlock(&res->spinlock); in dlmlock_remote() [all …]
|
| H A D | dlmast.c | 21 #include <linux/spinlock.h> 50 assert_spin_locked(&lock->spinlock); in dlm_should_cancel_bast() 102 spin_lock(&lock->spinlock); in __dlm_queue_ast() 115 * so res->spinlock will not be taken here */ in __dlm_queue_ast() 120 * to get to this point. the res->spinlock will not be in __dlm_queue_ast() 126 spin_unlock(&lock->spinlock); in __dlm_queue_ast() 160 spin_lock(&lock->spinlock); in __dlm_queue_bast() 163 spin_unlock(&lock->spinlock); in __dlm_queue_bast() 173 spin_lock(&res->spinlock); in dlm_update_lvb() 190 spin_unlock(&res->spinlock); in dlm_update_lvb() [all …]
|
| /linux/drivers/hwtracing/coresight/ |
| H A D | coresight-tpda.c | 213 lockdep_assert_held(&drvdata->spinlock); in __tpda_enable() 230 spin_lock(&drvdata->spinlock); in tpda_enable() 240 spin_unlock(&drvdata->spinlock); in tpda_enable() 263 spin_lock(&drvdata->spinlock); in tpda_disable() 268 spin_unlock(&drvdata->spinlock); in tpda_disable() 302 guard(spinlock)(&drvdata->spinlock); in tpda_trig_sysfs_show() 332 guard(spinlock)(&drvdata->spinlock); in tpda_trig_sysfs_store() 366 guard(spinlock)(&drvdata->spinlock); in global_flush_req_show() 388 guard(spinlock)(&drvdata->spinlock); in global_flush_req_store() 410 guard(spinlock)(&drvdata->spinlock); in syncr_mode_show() [all …]
|
| H A D | coresight-tmc-etf.c | 188 raw_spin_lock_irqsave(&drvdata->spinlock, flags); in tmc_enable_etf_sink_sysfs() 190 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags); in tmc_enable_etf_sink_sysfs() 192 /* Allocating the memory here while outside of the spinlock */ in tmc_enable_etf_sink_sysfs() 198 raw_spin_lock_irqsave(&drvdata->spinlock, flags); in tmc_enable_etf_sink_sysfs() 240 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags); in tmc_enable_etf_sink_sysfs() 242 /* Free memory outside the spinlock if need be */ in tmc_enable_etf_sink_sysfs() 259 raw_spin_lock_irqsave(&drvdata->spinlock, flags); in tmc_enable_etf_sink_perf() 302 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags); in tmc_enable_etf_sink_perf() 338 raw_spin_lock_irqsave(&drvdata->spinlock, flags); in tmc_disable_etf_sink() 341 raw_spin_unlock_irqrestore(&drvdata->spinlock, flags); in tmc_disable_etf_sink() [all …]
|
| /linux/drivers/gpio/ |
| H A D | gpio-ml-ioh.c | 76 * @spinlock: Shared register access lock 87 raw_spinlock_t *spinlock; member 91 raw_spinlock_t spinlock; member 103 raw_spin_lock_irqsave(chip->spinlock, flags); in ioh_gpio_set() 111 raw_spin_unlock_irqrestore(chip->spinlock, flags); in ioh_gpio_set() 131 raw_spin_lock_irqsave(chip->spinlock, flags); in ioh_gpio_direction_output() 144 raw_spin_unlock_irqrestore(chip->spinlock, flags); in ioh_gpio_direction_output() 155 raw_spin_lock_irqsave(chip->spinlock, flags); in ioh_gpio_direction_input() 160 raw_spin_unlock_irqrestore(chip->spinlock, flags); in ioh_gpio_direction_input() 264 raw_spin_lock_irqsave(chip->spinlock, flags); in ioh_irq_type() [all …]
|
| H A D | gpio-pch.c | 89 * @spinlock: Used for register access protection 99 raw_spinlock_t spinlock; member 108 raw_spin_lock_irqsave(&chip->spinlock, flags); in pch_gpio_set() 116 raw_spin_unlock_irqrestore(&chip->spinlock, flags); in pch_gpio_set() 136 raw_spin_lock_irqsave(&chip->spinlock, flags); in pch_gpio_direction_output() 150 raw_spin_unlock_irqrestore(&chip->spinlock, flags); in pch_gpio_direction_output() 161 raw_spin_lock_irqsave(&chip->spinlock, flags); in pch_gpio_direction_input() 166 raw_spin_unlock_irqrestore(&chip->spinlock, flags); in pch_gpio_direction_input() 268 raw_spin_lock_irqsave(&chip->spinlock, flags); in pch_irq_type() 280 raw_spin_unlock_irqrestore(&chip->spinlock, flags); in pch_irq_type() [all …]
|
| /linux/drivers/comedi/drivers/ |
| H A D | das800.c | 236 spin_lock_irqsave(&dev->spinlock, irq_flags); in das800_enable() 244 spin_unlock_irqrestore(&dev->spinlock, irq_flags); in das800_enable() 251 spin_lock_irqsave(&dev->spinlock, irq_flags); in das800_disable() 254 spin_unlock_irqrestore(&dev->spinlock, irq_flags); in das800_disable() 379 spin_lock_irqsave(&dev->spinlock, irq_flags); in das800_ai_do_cmd() 382 spin_unlock_irqrestore(&dev->spinlock, irq_flags); in das800_ai_do_cmd() 403 spin_lock_irqsave(&dev->spinlock, irq_flags); in das800_ai_do_cmd() 405 spin_unlock_irqrestore(&dev->spinlock, irq_flags); in das800_ai_do_cmd() 442 spin_lock_irqsave(&dev->spinlock, irq_flags); in das800_interrupt() 445 * Don't release spinlock yet since we want to make sure in das800_interrupt() [all …]
|
| /linux/drivers/watchdog/ |
| H A D | of_xilinx_wdt.c | 43 spinlock_t spinlock; /* spinlock for register handling */ member 60 spin_lock(&xdev->spinlock); in xilinx_wdt_start() 71 spin_unlock(&xdev->spinlock); in xilinx_wdt_start() 83 spin_lock(&xdev->spinlock); in xilinx_wdt_stop() 92 spin_unlock(&xdev->spinlock); in xilinx_wdt_stop() 106 spin_lock(&xdev->spinlock); in xilinx_wdt_keepalive() 112 spin_unlock(&xdev->spinlock); in xilinx_wdt_keepalive() 137 spin_lock(&xdev->spinlock); in xwdt_selftest() 148 spin_unlock(&xdev->spinlock); in xwdt_selftest() 218 spin_lock_init(&xdev->spinlock); in xwdt_probe()
|
| H A D | xilinx_wwdt.c | 58 * @spinlock: spinlock for IO register access 67 spinlock_t spinlock; /* spinlock for register handling */ member 81 spin_lock(&xdev->spinlock); in xilinx_wwdt_start() 93 spin_unlock(&xdev->spinlock); in xilinx_wwdt_start() 105 spin_lock(&xdev->spinlock); in xilinx_wwdt_keepalive() 115 spin_unlock(&xdev->spinlock); in xilinx_wwdt_keepalive() 220 spin_lock_init(&xdev->spinlock); in xwwdt_probe()
|
| /linux/lib/ |
| H A D | refcount.c | 8 #include <linux/spinlock.h> 129 * refcount_dec_and_lock - return holding spinlock if able to decrement 132 * @lock: the spinlock to be locked 141 * Return: true and hold spinlock if able to decrement refcount to 0, false 160 * refcount_dec_and_lock_irqsave - return holding spinlock with disabled 163 * @lock: the spinlock to be locked 166 * Same as refcount_dec_and_lock() above except that the spinlock is acquired 169 * Return: true and hold spinlock if able to decrement refcount to 0, false
|
| /linux/drivers/accessibility/speakup/ |
| H A D | speakup_apollo.c | 153 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 155 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 159 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 165 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 171 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 177 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 185 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 189 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 199 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 201 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up()
|
| H A D | speakup_decext.c | 167 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 169 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 173 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 176 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 182 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 188 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 196 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 198 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 210 spin_lock_irqsave(&speakup_info.spinlock, in do_catch_up() 214 spin_unlock_irqrestore(&speakup_info.spinlock, in do_catch_up()
|
| H A D | speakup_keypc.c | 189 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 191 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 195 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 198 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 204 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 209 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 223 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 225 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 240 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 243 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up()
|
| H A D | speakup_dectlk.c | 15 #include <linux/spinlock.h> 228 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 231 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 248 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 251 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 257 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 264 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 272 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 274 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 286 spin_lock_irqsave(&speakup_info.spinlock, in do_catch_up() [all …]
|
| H A D | speakup_acntpc.c | 188 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 190 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 194 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 197 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 203 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 208 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 220 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 222 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up() 234 spin_lock_irqsave(&speakup_info.spinlock, flags); in do_catch_up() 237 spin_unlock_irqrestore(&speakup_info.spinlock, flags); in do_catch_up()
|
| /linux/rust/kernel/ |
| H A D | sync.rs | 31 pub use lock::spinlock::{ 34 SpinLock, 88 /// use kernel::sync::{LockClassKey, SpinLock}; 95 /// stack_pin_init!(let num: SpinLock<u32> = SpinLock::new( 138 /// use kernel::sync::{static_lock_class, Arc, SpinLock}; 140 /// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> { 141 /// Arc::pin_init(SpinLock::new(
|
| /linux/drivers/char/ |
| H A D | ttyprintk.c | 19 #include <linux/spinlock.h> 23 spinlock_t spinlock; member 113 spin_lock_irqsave(&tpkp->spinlock, flags); in tpk_write() 115 spin_unlock_irqrestore(&tpkp->spinlock, flags); in tpk_write() 147 spin_lock_irqsave(&tpkp->spinlock, flags); in tpk_port_shutdown() 149 spin_unlock_irqrestore(&tpkp->spinlock, flags); in tpk_port_shutdown() 182 spin_lock_init(&tpk_port.spinlock); in ttyprintk_init()
|
| /linux/Documentation/locking/ |
| H A D | spinlocks.rst | 8 The most basic primitive for locking is spinlock:: 19 spinlock itself will guarantee the global lock, so it will guarantee that 33 spinlock for most things - using more than one spinlock can make things a 47 touches a shared variable has to agree about the spinlock they want 116 (and the equivalent read-write versions too, of course). The spinlock will 122 play with the spinlock is that you can get deadlocks::
|
| /linux/include/linux/ |
| H A D | spinlock.h | 7 * include/linux/spinlock.h - generic spinlock/rwlock declarations 9 * here's the role of the various spinlock/rwlock related include files: 21 * asm/spinlock.h: contains the arch_spin_*()/etc. lowlevel 29 * linux/spinlock.h: builds the final spin_*() APIs. 34 * contains the generic, simplified UP spinlock type. 52 * linux/spinlock.h: builds the final spin_*() APIs. 85 #define __lockfunc __section(".spinlock.text") 96 # include <asm/spinlock.h> 454 * spin_is_locked() - Check whether a spinlock is locked. 455 * @lock: Pointer to the spinlock. [all …]
|
| /linux/arch/x86/include/asm/ |
| H A D | qspinlock_paravirt.h | 17 __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text"); 23 * C code. Note that it puts the code in the .spinlock.text section which 59 PV_UNLOCK_ASM, .spinlock.text); 64 __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock, ".spinlock.text");
|
| /linux/drivers/gpu/drm/msm/ |
| H A D | msm_fence.c | 58 spin_lock_init(&fctx->spinlock); in msm_fence_context_alloc() 97 spin_lock_irqsave(&fctx->spinlock, flags); in msm_update_fence() 102 spin_unlock_irqrestore(&fctx->spinlock, flags); in msm_update_fence() 139 spin_lock_irqsave(&fctx->spinlock, flags); in msm_fence_set_deadline() 164 spin_unlock_irqrestore(&fctx->spinlock, flags); in msm_fence_set_deadline() 199 dma_fence_init(&f->base, &msm_fence_ops, &fctx->spinlock, in msm_fence_init()
|
| /linux/arch/x86/kvm/vmx/ |
| H A D | posted_intr.c | 28 * Protect the per-CPU list with a per-CPU spinlock to handle task migration. 93 raw_spinlock_t *spinlock = &per_cpu(wakeup_vcpus_on_cpu_lock, vcpu->cpu); in vmx_vcpu_pi_load() local 102 raw_spin_lock(spinlock); in vmx_vcpu_pi_load() 103 spin_acquire(&spinlock->dep_map, PI_LOCK_SCHED_OUT, 0, _RET_IP_); in vmx_vcpu_pi_load() 105 spin_release(&spinlock->dep_map, _RET_IP_); in vmx_vcpu_pi_load() 106 raw_spin_unlock(spinlock); in vmx_vcpu_pi_load() 257 raw_spinlock_t *spinlock = &per_cpu(wakeup_vcpus_on_cpu_lock, cpu); in pi_wakeup_handler() local 260 raw_spin_lock(spinlock); in pi_wakeup_handler() 266 raw_spin_unlock(spinlock); in pi_wakeup_handler()
|