]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/asm-x86_64/spinlock.h
[PATCH] x86_64: x86_64 version of the smp alternative patch.
[net-next-2.6.git] / include / asm-x86_64 / spinlock.h
index 5d8a5e3589ff544cc9a707cfeca75c17107b320e..8d3421996f949a0983f6b26680ee1f3cf5a7759d 100644 (file)
        "jmp 1b\n" \
        LOCK_SECTION_END
 
+#define __raw_spin_lock_string_up \
+       "\n\tdecl %0"
+
 #define __raw_spin_unlock_string \
        "movl $1,%0" \
                :"=m" (lock->slock) : : "memory"
 
 static inline void __raw_spin_lock(raw_spinlock_t *lock)
 {
-       __asm__ __volatile__(
-               __raw_spin_lock_string
-               :"=m" (lock->slock) : : "memory");
+       alternative_smp(
+               __raw_spin_lock_string,
+               __raw_spin_lock_string_up,
+               "=m" (lock->slock) : : "memory");
 }
 
 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)