Loading include/asm-x86/spinlock.h +50 −55 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) { short inc = 0x0100; __asm__ __volatile__ ( asm volatile ( LOCK_PREFIX "xaddw %w0, %1\n" "1:\t" "cmpb %h0, %b0\n\t" Loading @@ -104,8 +104,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) int tmp; short new; asm volatile( "movw %2,%w0\n\t" asm volatile("movw %2,%w0\n\t" "cmpb %h0,%b0\n\t" "jne 1f\n\t" "movw %w0,%w1\n\t" Loading @@ -123,8 +122,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spinlock_t *lock) { __asm__ __volatile__( UNLOCK_LOCK_PREFIX "incb %0" asm volatile(UNLOCK_LOCK_PREFIX "incb %0" : "+m" (lock->slock) : : "memory", "cc"); Loading @@ -149,8 +147,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) int inc = 0x00010000; int tmp; __asm__ __volatile__ ( "lock ; xaddl %0, %1\n" asm volatile("lock ; xaddl %0, %1\n" "movzwl %w0, %2\n\t" "shrl $16, %0\n\t" "1:\t" Loading @@ -173,8 +170,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) int tmp; int new; asm volatile( "movl %2,%0\n\t" asm volatile("movl %2,%0\n\t" "movl %0,%1\n\t" "roll $16, %0\n\t" "cmpl %0,%1\n\t" Loading @@ -193,8 +189,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spinlock_t *lock) { __asm__ __volatile__( UNLOCK_LOCK_PREFIX "incw %0" asm volatile(UNLOCK_LOCK_PREFIX "incw %0" : "+m" (lock->slock) : : "memory", "cc"); Loading Loading
include/asm-x86/spinlock.h +50 −55 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) { short inc = 0x0100; __asm__ __volatile__ ( asm volatile ( LOCK_PREFIX "xaddw %w0, %1\n" "1:\t" "cmpb %h0, %b0\n\t" Loading @@ -104,8 +104,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) int tmp; short new; asm volatile( "movw %2,%w0\n\t" asm volatile("movw %2,%w0\n\t" "cmpb %h0,%b0\n\t" "jne 1f\n\t" "movw %w0,%w1\n\t" Loading @@ -123,8 +122,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spinlock_t *lock) { __asm__ __volatile__( UNLOCK_LOCK_PREFIX "incb %0" asm volatile(UNLOCK_LOCK_PREFIX "incb %0" : "+m" (lock->slock) : : "memory", "cc"); Loading @@ -149,8 +147,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) int inc = 0x00010000; int tmp; __asm__ __volatile__ ( "lock ; xaddl %0, %1\n" asm volatile("lock ; xaddl %0, %1\n" "movzwl %w0, %2\n\t" "shrl $16, %0\n\t" "1:\t" Loading @@ -173,8 +170,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) int tmp; int new; asm volatile( "movl %2,%0\n\t" asm volatile("movl %2,%0\n\t" "movl %0,%1\n\t" "roll $16, %0\n\t" "cmpl %0,%1\n\t" Loading @@ -193,8 +189,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spinlock_t *lock) { __asm__ __volatile__( UNLOCK_LOCK_PREFIX "incw %0" asm volatile(UNLOCK_LOCK_PREFIX "incw %0" : "+m" (lock->slock) : : "memory", "cc"); Loading