2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-18 15:44:02 +08:00

bkl: Fixup core_lock fallout

kernel_lock.c emits a warning because a raw spinlock function is used
with a spinlock. Convert BKL to raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Thomas Gleixner 2009-11-17 14:45:06 +01:00
parent 9c1721aa49
commit fa4062e7ea

View File

@ -23,7 +23,7 @@
* *
* Don't use in new code. * Don't use in new code.
*/ */
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kernel_flag); static __cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(kernel_flag);
/* /*
@ -82,7 +82,7 @@ static inline void __lock_kernel(void)
*/ */
do { do {
preempt_enable(); preempt_enable();
while (spin_is_locked(&kernel_flag)) while (raw_spin_is_locked(&kernel_flag))
cpu_relax(); cpu_relax();
preempt_disable(); preempt_disable();
} while (!do_raw_spin_trylock(&kernel_flag)); } while (!do_raw_spin_trylock(&kernel_flag));