linux-stable/arch/arm64
Will Deacon 1e6e57d9b3 arm64: percpu: rewrite ll/sc loops in assembly
Writing the outer loop of an LL/SC sequence using do {...} while
constructs potentially allows the compiler to hoist memory accesses
between the STXR and the branch back to the LDXR. On CPUs that do not
guarantee forward progress of LL/SC loops when faced with memory
accesses to the same ERG (up to 2k) between the failed STXR and the
branch back, we may end up livelocking.

This patch avoids this issue in our percpu atomics by rewriting the
outer loop as part of the LL/SC inline assembly block.

Cc: <stable@vger.kernel.org>
Fixes: f97fc81079 ("arm64: percpu: Implement this_cpu operations")
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-10-19 15:37:29 +01:00
..
boot Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2016-10-14 11:41:28 -07:00
configs ZTE arm64 defconfig updates for 4.9: 2016-09-19 22:35:21 +02:00
crypto crypto: arm64/aes-ctr - fix NULL dereference in tail processing 2016-09-13 18:44:59 +08:00
include arm64: percpu: rewrite ll/sc loops in assembly 2016-10-19 15:37:29 +01:00
kernel arm64: swp emulation: bound LL/SC retries before rescheduling 2016-10-19 15:37:23 +01:00
kvm KVM updates for v4.9-rc1 2016-10-06 10:49:01 -07:00
lib Merge branch 'work.uaccess' into for-linus 2016-10-14 20:42:44 -04:00
mm IOMMU Updates for Linux v4.9 2016-10-11 12:52:41 -07:00
net
xen
Kconfig arm64: kaslr: keep modules close to the kernel when DYNAMIC_FTRACE=y 2016-10-17 16:24:02 +01:00
Kconfig.debug arm64: always enable DEBUG_RODATA and remove the Kconfig option 2016-08-26 10:13:41 +01:00
Kconfig.platforms ARM: 64-bit DT updates for v4.8 2016-10-07 21:32:39 -07:00
Makefile arm64: Set UTS_MACHINE in the Makefile 2016-08-31 12:31:38 +01:00