aboutsummaryrefslogtreecommitdiff
path: root/include/linux/seqlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/seqlock.h')
-rw-r--r--include/linux/seqlock.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 182990574..d4cf5229c 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -29,6 +29,7 @@
#include <linux/spinlock.h>
#include <linux/preempt.h>
#include <asm/processor.h>
+#include <asm/relaxed.h>
/*
* Version using sequence counter only.
@@ -61,9 +62,9 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s)
unsigned ret;
repeat:
- ret = ACCESS_ONCE(s->sequence);
+ ret = cpu_relaxed_read((volatile u32 *)&s->sequence);
if (unlikely(ret & 1)) {
- cpu_relax();
+ cpu_read_relax();
goto repeat;
}
return ret;