android_kernel_oneplus_msm8998/arch/arm64
Will Deacon b31070890d arm64: percpu: rewrite ll/sc loops in assembly
commit 1e6e57d9b34a9075d5f9e2048ea7b09756590d11 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-28 03:01:35 -04:00
..
boot arm64: dts: rockchip: add reset saradc node for rk3368 SoCs 2016-09-07 08:32:41 +02:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/aes-ctr - fix NULL dereference in tail processing 2016-09-30 10:18:34 +02:00
include arm64: percpu: rewrite ll/sc loops in assembly 2016-10-28 03:01:35 -04:00
kernel arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP 2016-10-07 15:23:42 +02:00
kvm arm64: KVM: Configure TCR_EL2.PS at runtime 2016-09-15 08:27:43 +02:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: Add workaround for Cavium erratum 27456 2016-09-15 08:27:44 +02:00
net arm64: bpf: add 'store immediate' instruction 2015-12-03 11:38:31 -05:00
xen
Kconfig irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 2016-09-15 08:27:47 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: DT updates for v4.4 2015-11-10 15:06:26 -08:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-03-03 15:07:08 -08:00