linux-stable/arch/arm64
Andrea Parri c6f5d02b6a locking/spinlocks/arm64: Remove smp_mb() from arch_spin_is_locked()
The following commit:

  38b850a730 ("arm64: spinlock: order spin_{is_locked,unlock_wait} against local locks")

... added an smp_mb() to arch_spin_is_locked(), in order
"to ensure that the lock value is always loaded after any other locks have
been taken by the current CPU", and reported one example (the "insane case"
in ipc/sem.c) relying on such guarantee.

It is however understood that spin_is_locked() is not required to provide
such an ordering guarantee (a guarantee that is currently not provided by
all the implementations/archs), and that callers relying on such ordering
should instead insert suitable memory barriers before acting on the result
of spin_is_locked().

Following a recent auditing [1] of the callers of {,raw_}spin_is_locked(),
revealing that none of them are relying on the ordering guarantee anymore,
this commit removes the leading smp_mb() from the primitive thus reverting
38b850a730.

[1] https://marc.info/?l=linux-kernel&m=151981440005264&w=2
    https://marc.info/?l=linux-kernel&m=152042843808540&w=2
    https://marc.info/?l=linux-kernel&m=152043346110262&w=2

Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akiyks@gmail.com
Cc: boqun.feng@gmail.com
Cc: dhowells@redhat.com
Cc: j.alglave@ucl.ac.uk
Cc: linux-arch@vger.kernel.org
Cc: luc.maranget@inria.fr
Cc: npiggin@gmail.com
Cc: parri.andrea@gmail.com
Cc: stern@rowland.harvard.edu
Link: http://lkml.kernel.org/r/1526338889-7003-2-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-05-15 08:11:15 +02:00
..
boot This pull request contains Broadcom ARM64-based SoCs Device Tree fixes 2018-04-27 10:21:18 +02:00
configs arm64: defconfig: add CONFIG_UNIPHIER_THERMAL and CONFIG_SNI_AVE 2018-03-27 15:31:19 +02:00
crypto kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
include locking/spinlocks/arm64: Remove smp_mb() from arch_spin_is_locked() 2018-05-15 08:11:15 +02:00
kernel arm64: capabilities: Add NVIDIA Denver CPU to bp_harden list 2018-05-09 14:28:28 +01:00
kvm arm64: vgic-v2: Fix proxying of cpuif access 2018-05-04 16:45:55 +01:00
lib arm64: avoid instrumenting atomic_ll_sc.o 2018-04-27 12:14:44 +01:00
mm arm64: To remove initrd reserved area entry from memblock 2018-05-01 10:19:30 +01:00
net bpf, arm64: fix out of bounds access in tail call 2018-02-22 16:06:28 -08:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig ARM: 2018-04-09 11:42:31 -07:00
Kconfig.debug
Kconfig.platforms arm64: add Renesas R8A77965 support 2018-03-13 19:05:58 +01:00
Makefile arm64: support __int128 with clang 2018-04-24 19:07:55 +01:00