From a288bd4a0fe5e47f58bfb4e3c6300f0d6d341e15 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 8 Aug 2008 15:02:19 +0100 Subject: [PATCH] x86: adjust placement of pause insn in _raw_spin_lock() React to lock becoming available as quickly as possible. Signed-off-by: Jan Beulich --- xen/include/asm-x86/spinlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/spinlock.h b/xen/include/asm-x86/spinlock.h index 59be73656b..550edcb4e5 100644 --- a/xen/include/asm-x86/spinlock.h +++ b/xen/include/asm-x86/spinlock.h @@ -23,8 +23,8 @@ static inline void _raw_spin_lock(spinlock_t *lock) "1: lock; decb %0 \n" " js 2f \n" ".section .text.lock,\"ax\"\n" - "2: cmpb $0,%0 \n" - " rep; nop \n" + "2: rep; nop \n" + " cmpb $0,%0 \n" " jle 2b \n" " jmp 1b \n" ".previous" -- 2.30.2