0001
0002 #ifndef _ASM_X86_CMPXCHG_64_H
0003 #define _ASM_X86_CMPXCHG_64_H
0004
0005 static inline void set_64bit(volatile u64 *ptr, u64 val)
0006 {
0007 *ptr = val;
0008 }
0009
0010 #define arch_cmpxchg64(ptr, o, n) \
0011 ({ \
0012 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
0013 arch_cmpxchg((ptr), (o), (n)); \
0014 })
0015
0016 #define arch_cmpxchg64_local(ptr, o, n) \
0017 ({ \
0018 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
0019 arch_cmpxchg_local((ptr), (o), (n)); \
0020 })
0021
0022 #define arch_try_cmpxchg64(ptr, po, n) \
0023 ({ \
0024 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
0025 arch_try_cmpxchg((ptr), (po), (n)); \
0026 })
0027
0028 #define system_has_cmpxchg_double() boot_cpu_has(X86_FEATURE_CX16)
0029
0030 #endif