aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/Kconfig3
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--kernel/mutex.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index dc81b34c5d8..78a35e9dc10 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -109,3 +109,6 @@ config HAVE_CLK
109 109
110config HAVE_DMA_API_DEBUG 110config HAVE_DMA_API_DEBUG
111 bool 111 bool
112
113config HAVE_DEFAULT_NO_SPIN_MUTEXES
114 bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index dcb667c4375..2eca5fe0e75 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -82,6 +82,7 @@ config S390
82 select USE_GENERIC_SMP_HELPERS if SMP 82 select USE_GENERIC_SMP_HELPERS if SMP
83 select HAVE_SYSCALL_WRAPPERS 83 select HAVE_SYSCALL_WRAPPERS
84 select HAVE_FUNCTION_TRACER 84 select HAVE_FUNCTION_TRACER
85 select HAVE_DEFAULT_NO_SPIN_MUTEXES
85 select HAVE_OPROFILE 86 select HAVE_OPROFILE
86 select HAVE_KPROBES 87 select HAVE_KPROBES
87 select HAVE_KRETPROBES 88 select HAVE_KRETPROBES
diff --git a/kernel/mutex.c b/kernel/mutex.c
index 5d79781394a..507cf2b5e9f 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -148,7 +148,8 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
148 148
149 preempt_disable(); 149 preempt_disable();
150 mutex_acquire(&lock->dep_map, subclass, 0, ip); 150 mutex_acquire(&lock->dep_map, subclass, 0, ip);
151#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES) 151#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES) && \
152 !defined(CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES)
152 /* 153 /*
153 * Optimistic spinning. 154 * Optimistic spinning.
154 * 155 *