summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-25 17:11:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-25 17:11:43 -0700
commitf89eae4ee7e075e576bd4b4d2db901023421a3be (patch)
tree8dbd69cdc48c15f6b623e882b31092b7c451803f /include/asm-generic
parentbdc6b758e443c21c39a14c075e5b7e01f095b37b (diff)
parentb7e7ade34e6188bee2e3b0d42b51d25137d9e2a5 (diff)
downloadlinux-f89eae4ee7e075e576bd4b4d2db901023421a3be.tar.bz2
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar: "Two fixes: one for a lost wakeup, the other to fix the compiler optimizing out preempt operations on ARM64 (and possibly other non-x86 architectures)" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix remote wakeups sched/preempt: Fix preempt_count manipulations
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/preempt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/preempt.h b/include/asm-generic/preempt.h
index 5d8ffa3e6f8c..c1cde3577551 100644
--- a/include/asm-generic/preempt.h
+++ b/include/asm-generic/preempt.h
@@ -7,10 +7,10 @@
static __always_inline int preempt_count(void)
{
- return current_thread_info()->preempt_count;
+ return READ_ONCE(current_thread_info()->preempt_count);
}
-static __always_inline int *preempt_count_ptr(void)
+static __always_inline volatile int *preempt_count_ptr(void)
{
return &current_thread_info()->preempt_count;
}