diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-06-06 13:53:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-16 08:57:07 -0400 |
commit | 4badad352a6bb202ec68afa7a574c0bb961e5ebc (patch) | |
tree | 924924c9be5f6e4f939f8d1f78f7debeca0eb661 /arch | |
parent | ce069fc920e5734558b3d9cbef1ab06cf01ee793 (diff) |
locking/mutex: Disable optimistic spinning on some architectures
The optimistic spin code assumes regular stores and cmpxchg() play nice;
this is found to not be true for at least: parisc, sparc32, tile32,
metag-lock1, arc-!llsc and hexagon.
There is further wreckage, but this in particular seemed easy to
trigger, so blacklist this.
Opt in for known good archs.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Miller <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Waiman Long <waiman.long@hp.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: John David Anglin <dave.anglin@bell.net>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: stable@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: sparclinux@vger.kernel.org
Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm64/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/Kconfig | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 245058b3b0ef..88acf8bc1490 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -6,6 +6,7 @@ config ARM | |||
6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST | 6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST |
7 | select ARCH_HAVE_CUSTOM_GPIO_H | 7 | select ARCH_HAVE_CUSTOM_GPIO_H |
8 | select ARCH_MIGHT_HAVE_PC_PARPORT | 8 | select ARCH_MIGHT_HAVE_PC_PARPORT |
9 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
9 | select ARCH_USE_BUILTIN_BSWAP | 10 | select ARCH_USE_BUILTIN_BSWAP |
10 | select ARCH_USE_CMPXCHG_LOCKREF | 11 | select ARCH_USE_CMPXCHG_LOCKREF |
11 | select ARCH_WANT_IPC_PARSE_VERSION | 12 | select ARCH_WANT_IPC_PARSE_VERSION |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a474de346be6..839f48c26ef0 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -4,6 +4,7 @@ config ARM64 | |||
4 | select ARCH_HAS_OPP | 4 | select ARCH_HAS_OPP |
5 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST | 5 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST |
6 | select ARCH_USE_CMPXCHG_LOCKREF | 6 | select ARCH_USE_CMPXCHG_LOCKREF |
7 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
7 | select ARCH_WANT_OPTIONAL_GPIOLIB | 8 | select ARCH_WANT_OPTIONAL_GPIOLIB |
8 | select ARCH_WANT_COMPAT_IPC_PARSE_VERSION | 9 | select ARCH_WANT_COMPAT_IPC_PARSE_VERSION |
9 | select ARCH_WANT_FRAME_POINTERS | 10 | select ARCH_WANT_FRAME_POINTERS |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index fefe7c8bf05f..80b94b0add1f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -145,6 +145,7 @@ config PPC | |||
145 | select HAVE_IRQ_EXIT_ON_IRQ_STACK | 145 | select HAVE_IRQ_EXIT_ON_IRQ_STACK |
146 | select ARCH_USE_CMPXCHG_LOCKREF if PPC64 | 146 | select ARCH_USE_CMPXCHG_LOCKREF if PPC64 |
147 | select HAVE_ARCH_AUDITSYSCALL | 147 | select HAVE_ARCH_AUDITSYSCALL |
148 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
148 | 149 | ||
149 | config GENERIC_CSUM | 150 | config GENERIC_CSUM |
150 | def_bool CPU_LITTLE_ENDIAN | 151 | def_bool CPU_LITTLE_ENDIAN |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 29f2e988c56a..407c87d9879a 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -78,6 +78,7 @@ config SPARC64 | |||
78 | select HAVE_C_RECORDMCOUNT | 78 | select HAVE_C_RECORDMCOUNT |
79 | select NO_BOOTMEM | 79 | select NO_BOOTMEM |
80 | select HAVE_ARCH_AUDITSYSCALL | 80 | select HAVE_ARCH_AUDITSYSCALL |
81 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
81 | 82 | ||
82 | config ARCH_DEFCONFIG | 83 | config ARCH_DEFCONFIG |
83 | string | 84 | string |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a8f749ef0fdc..d24887b645dc 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -131,6 +131,7 @@ config X86 | |||
131 | select HAVE_CC_STACKPROTECTOR | 131 | select HAVE_CC_STACKPROTECTOR |
132 | select GENERIC_CPU_AUTOPROBE | 132 | select GENERIC_CPU_AUTOPROBE |
133 | select HAVE_ARCH_AUDITSYSCALL | 133 | select HAVE_ARCH_AUDITSYSCALL |
134 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
134 | 135 | ||
135 | config INSTRUCTION_DECODER | 136 | config INSTRUCTION_DECODER |
136 | def_bool y | 137 | def_bool y |