aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/atomic64_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/atomic64_32.c')
-rw-r--r--arch/x86/lib/atomic64_32.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
index d21e725d3d84..afa5d444918b 100644
--- a/arch/x86/lib/atomic64_32.c
+++ b/arch/x86/lib/atomic64_32.c
@@ -67,13 +67,9 @@ void atomic64_set(atomic64_t *ptr, u64 new_val)
67 */ 67 */
68u64 atomic64_read(atomic64_t *ptr) 68u64 atomic64_read(atomic64_t *ptr)
69{ 69{
70 u64 curr_val; 70 u64 old = 1LL << 32;
71 71
72 do { 72 return cmpxchg8b(&ptr->counter, old, old);
73 curr_val = __atomic64_read(ptr);
74 } while (atomic64_cmpxchg(ptr, curr_val, curr_val) != curr_val);
75
76 return curr_val;
77} 73}
78 74
79/** 75/**