]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: SWP emulation: always enable when SMP is enabled
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 4 Jul 2014 13:44:36 +0000 (14:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 18 Jul 2014 11:29:47 +0000 (12:29 +0100)
commit0a38ab070222561344604f8150655feb6287a78b
treeaa658fc0c27f728fcc2057dc0eb1c962d2601c9e
parent6ac8551ba38af69f9aaf0585b408b8aef90c3cf6
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>
arch/arm/mm/Kconfig