aboutsummaryrefslogtreecommitdiff
path: root/include/linux/seqlock.h
diff options
context:
space:
mode:
authorfranciscofranco <franciscofranco.1990@gmail.com>2015-12-05 04:01:17 +0000
committerMister Oyster <oysterized@gmail.com>2017-12-25 16:11:14 +0100
commit2d6a958ab8f0aaa9c20738a0ac22ba94ae000362 (patch)
tree1c2fafd423477f54ef91480567b8937d9a5215dc /include/linux/seqlock.h
parente5a41b03c4e0a299623929f41a3a1e17fa82076a (diff)
arm64: use the new *_relaxed macros for lower power usage
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com> Signed-off-by: Joe Maples <joe@frap129.org> Signed-off-by: Mister Oyster <oysterized@gmail.com>
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;