X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=arch%2Farch-x86_64.h;h=457714c80506cebc0c81f5e88ceca537643ac83c;hb=c36d16f5a0b9e3d505c9933bbbdccdb519ca4faf;hp=c8c3d18251caf721fe25bef5c85b6c765d675ee3;hpb=edf2c6cf5adc82ee43c81e033cf2215eb9ffdb16;p=fio.git diff --git a/arch/arch-x86_64.h b/arch/arch-x86_64.h index c8c3d182..457714c8 100644 --- a/arch/arch-x86_64.h +++ b/arch/arch-x86_64.h @@ -39,34 +39,6 @@ static inline unsigned int arch_ffz(unsigned int bitmask) return bitmask; } #define ARCH_HAVE_FFZ - -typedef struct { - unsigned int lock; -} spinlock_t; - -static inline void spin_lock(spinlock_t *lock) -{ - short inc = 0x0100; - - __asm__ __volatile__("xaddw %w0, %1\n" - "1:\t" - "cmpb %h0, %b0\n\t" - "je 2f\n\t" - "rep ; nop\n\t" - "movb %1, %b0\n\t" - "jmp 1b\n" - "2:" - : "+Q" (inc), "+m" (lock->lock) - : - : "memory", "cc"); -} - -static inline void spin_unlock(spinlock_t *lock) -{ - __asm__ __volatile__("incb %0" - : "+m" (lock->lock) - : - : "memory", "cc"); -} +#define ARCH_HAVE_SSE #endif