linux-stable/arch/arm64
Peter Zijlstra d89e588ca4 locking: Introduce smp_mb__after_spinlock()
Since its inception, our understanding of ACQUIRE, esp. as applied to
spinlocks, has changed somewhat. Also, I wonder if, with a simple
change, we cannot make it provide more.

The problem with the comment is that the STORE done by spin_lock isn't
itself ordered by the ACQUIRE, and therefore a later LOAD can pass over
it and cross with any prior STORE, rendering the default WMB
insufficient (pointed out by Alan).

Now, this is only really a problem on PowerPC and ARM64, both of
which already defined smp_mb__before_spinlock() as a smp_mb().

At the same time, we can get a much stronger construct if we place
that same barrier _inside_ the spin_lock(). In that case we upgrade
the RCpc spinlock to an RCsc.  That would make all schedule() calls
fully transitive against one another.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-08-10 12:29:02 +02:00
..
boot Allwinner fixes for 4.13 2017-08-04 13:04:42 +02:00
configs arm64: defconfig: enable missing HWSPINLOCK 2017-07-27 23:09:54 -05:00
crypto crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
include locking: Introduce smp_mb__after_spinlock() 2017-08-10 12:29:02 +02:00
kernel arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0 2017-08-01 12:14:06 +01:00
kvm KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
lib arm64/lib: copy_page: use consistent prefetch stride 2017-07-25 10:04:42 +01:00
mm arm64: Fix potential race with hardware DBM in ptep_set_access_flags() 2017-08-04 13:26:11 +01:00
net arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
xen xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Kconfig include/linux/string.h: add the option of fortified string.h functions 2017-07-12 16:26:03 -07:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: SoC 64-bit changes 2017-07-04 14:53:26 -07:00
Makefile arm64: pass endianness info to sparse 2017-06-26 10:15:06 +01:00