summaryrefslogtreecommitdiff
path: root/lib/kernel_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel_lock.c')
-rw-r--r--lib/kernel_lock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c
index 39f1029e3525..67b7217d14a0 100644
--- a/lib/kernel_lock.c
+++ b/lib/kernel_lock.c
@@ -20,7 +20,7 @@
*
* Don't use in new code.
*/
-static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kernel_flag);
+static __cacheline_aligned_in_smp DEFINE_ATOMIC_SPINLOCK(kernel_flag);
/*
@@ -79,7 +79,7 @@ static inline void __lock_kernel(void)
*/
do {
preempt_enable();
- while (spin_is_locked(&kernel_flag))
+ while (atomic_spin_is_locked(&kernel_flag))
cpu_relax();
preempt_disable();
} while (!_raw_spin_trylock(&kernel_flag));