History

locking/spinlocks: Use CONFIG_PREEMPTION

CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Adjust the comments in the locking code.

Thomas Gleixner committed 7 years ago

Commit 27972761 parent 01b1d882 files · +2 −2Browse files

Unified · Split

2 files
  1. include/linux/spinlock.h +1 −1
  2. include/linux/spinlock_api_smp.h +1 −1
include/linux/spinlock.h+1−1
@@ -214,7 +214,7 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) · 213 unmodified lines
214 214
215/*215/*
216 * Define the various spin_lock methods. Note we define these216 * Define the various spin_lock methods. Note we define these
217 * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The217 * regardless of whether CONFIG_SMP or CONFIG_PREEMPTION are set. The
218 * various methods are defined as nops in the case they are not218 * various methods are defined as nops in the case they are not
219 * required.219 * required.
220 */220 */
include/linux/spinlock_api_smp.h+1−1
@@ -96,7 +96,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) · 95 unmodified lines
96 96
97/*97/*
98 * If lockdep is enabled then we use the non-preemption spin-ops98 * If lockdep is enabled then we use the non-preemption spin-ops
99 * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are99 * even on CONFIG_PREEMPTION, because lockdep assumes that interrupts are
100 * not re-enabled during lock-acquire (which the preempt-spin-ops do):100 * not re-enabled during lock-acquire (which the preempt-spin-ops do):
101 */101 */
102#if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)102#if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t