]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()
authorWill Deacon <will.deacon@arm.com>
Tue, 24 Oct 2017 10:22:47 +0000 (11:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:21 +0000 (14:26 +0100)
commit1aedecaf12a67de999eaf233cdb64839170ca035
treea48c562615d314dcc63173cf55876df6b7ff444f
parent065060cdd3de1f7a1f08284999081c4c38601ef7
locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()

commit c2bc66082e1048c7573d72e62f597bdc5ce13fea upstream.

[ Note, this is a Git cherry-pick of the following commit:

    76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()")

  ... for easier x86 PTI code testing and back-porting. ]

In preparation for the removal of lockless_dereference(), which is the
same as READ_ONCE() on all architectures other than Alpha, add an
implicit smp_read_barrier_depends() to READ_ONCE() so that it can be
used to head dependency chains on all architectures.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1508840570-22169-3-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/compiler.h