xref: /linux/arch/x86/include/asm/qrwlock.h (revision bd01ec1a13f9a327950c8e3080096446c7804753)
1*bd01ec1aSWaiman Long #ifndef _ASM_X86_QRWLOCK_H
2*bd01ec1aSWaiman Long #define _ASM_X86_QRWLOCK_H
3*bd01ec1aSWaiman Long 
4*bd01ec1aSWaiman Long #include <asm-generic/qrwlock_types.h>
5*bd01ec1aSWaiman Long 
6*bd01ec1aSWaiman Long #if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE)
7*bd01ec1aSWaiman Long #define queue_write_unlock queue_write_unlock
8*bd01ec1aSWaiman Long static inline void queue_write_unlock(struct qrwlock *lock)
9*bd01ec1aSWaiman Long {
10*bd01ec1aSWaiman Long         barrier();
11*bd01ec1aSWaiman Long         ACCESS_ONCE(*(u8 *)&lock->cnts) = 0;
12*bd01ec1aSWaiman Long }
13*bd01ec1aSWaiman Long #endif
14*bd01ec1aSWaiman Long 
15*bd01ec1aSWaiman Long #include <asm-generic/qrwlock.h>
16*bd01ec1aSWaiman Long 
17*bd01ec1aSWaiman Long #endif /* _ASM_X86_QRWLOCK_H */
18