diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-07-04 09:44:36 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-07-18 07:29:47 -0400 |
commit | a11dd731f5ead63ab3d757bbb1ab631063f6c034 (patch) | |
tree | aa658fc0c27f728fcc2057dc0eb1c962d2601c9e | |
parent | af040ffc9ba1e079ee4c0748aff64fa3d4716fa5 (diff) |
ARM: SWP emulation: always enable when SMP is enabled
SWP is deprecated in ARMv6 and ARMv7 CPUs, but more importantly, when
running on a SMP system, SWP doesn't guarantee atomicity. This means
it can't really be used (by userspace) for locking purposes in a SMP
environment.
Currently, many configurations leave the SWP emulation disabled, which
means we never know if userspace executes this instruction on ARMv7
hardware. Rectify this by enabling SWP emulation for ARMv7 with SMP
(where we can trap the instruction.)
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mm/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c348eaee7ee2..c78c7db6aa83 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -669,7 +669,7 @@ config ARM_VIRT_EXT | |||
669 | details. | 669 | details. |
670 | 670 | ||
671 | config SWP_EMULATE | 671 | config SWP_EMULATE |
672 | bool "Emulate SWP/SWPB instructions" | 672 | bool "Emulate SWP/SWPB instructions" if !SMP |
673 | depends on CPU_V7 | 673 | depends on CPU_V7 |
674 | default y if SMP | 674 | default y if SMP |
675 | select HAVE_PROC_CPU if PROC_FS | 675 | select HAVE_PROC_CPU if PROC_FS |