aboutsummaryrefslogtreecommitdiff
path: root/include/linux
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
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')
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/seqlock.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 08bd577ac..aa76cc2ae 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2554,7 +2554,7 @@ static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int fl
static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- return test_ti_thread_flag(task_thread_info(tsk), flag);
+ return test_ti_thread_flag_relaxed(task_thread_info(tsk), flag);
}
static inline void set_tsk_need_resched(struct task_struct *tsk)
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;