summaryrefslogtreecommitdiffstats
path: root/arch/arm64/Kconfig
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2014-11-18 06:41:25 -0500
committerWill Deacon <will.deacon@arm.com>2014-11-20 11:34:31 -0500
commitbd35a4adc4131c530ec7d90242555eac7b3dbe3f (patch)
tree61db668ee8924e5dae4aa53fadf8b8ffde6bba3b /arch/arm64/Kconfig
parent587064b610c703f259317d00dc37bf6d40f4fc74 (diff)
arm64: Port SWP/SWPB emulation support from arm
The SWP instruction was deprecated in the ARMv6 architecture. The ARMv7 multiprocessing extensions mandate that SWP/SWPB instructions are treated as undefined from reset, with the ability to enable them through the System Control Register SW bit. With ARMv8, the option to enable these instructions through System Control Register was dropped as well. To support legacy applications using these instructions, port the emulation of the SWP and SWPB instructions from the arm port to arm64. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/Kconfig')
-rw-r--r--arch/arm64/Kconfig21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index aa8f4bea3738..2b6213840ec8 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -180,6 +180,27 @@ menuconfig ARMV8_DEPRECATED
180 180
181if ARMV8_DEPRECATED 181if ARMV8_DEPRECATED
182 182
183config SWP_EMULATION
184 bool "Emulate SWP/SWPB instructions"
185 help
186 ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that
187 they are always undefined. Say Y here to enable software
188 emulation of these instructions for userspace using LDXR/STXR.
189
190 In some older versions of glibc [<=2.8] SWP is used during futex
191 trylock() operations with the assumption that the code will not
192 be preempted. This invalid assumption may be more likely to fail
193 with SWP emulation enabled, leading to deadlock of the user
194 application.
195
196 NOTE: when accessing uncached shared regions, LDXR/STXR rely
197 on an external transaction monitoring block called a global
198 monitor to maintain update atomicity. If your system does not
199 implement a global monitor, this option can cause programs that
200 perform SWP operations to uncached memory to deadlock.
201
202 If unsure, say Y
203
183endif 204endif
184 205
185endmenu 206endmenu