diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-28 05:23:59 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-28 06:46:21 -0400 |
commit | 083986e8248d978b6c961d3da6beb0c921c68220 (patch) | |
tree | 1a760afa3f006b21d2464a226c2792dc59ab845d /include/linux | |
parent | 6cac446bd37d9381815fe4c2b0e7b1fd1085000c (diff) |
mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef
Linus suggested to replace
#ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX
#define arch_mutex_cpu_relax() cpu_relax()
#endif
with just a simple
#ifndef arch_mutex_cpu_relax
# define arch_mutex_cpu_relax() cpu_relax()
#endif
to get rid of CONFIG_HAVE_CPU_RELAX_SIMPLE. So architectures can
simply define arch_mutex_cpu_relax if they want an architecture
specific function instead of having to add a select statement in
their Kconfig in addition.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mutex.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index ccd4260834c5..bab49da8a0f0 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <linux/spinlock_types.h> | 15 | #include <linux/spinlock_types.h> |
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <linux/lockdep.h> | 17 | #include <linux/lockdep.h> |
18 | |||
19 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <asm/processor.h> | ||
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Simple, straightforward mutexes with strict semantics: | 22 | * Simple, straightforward mutexes with strict semantics: |
@@ -175,8 +175,8 @@ extern void mutex_unlock(struct mutex *lock); | |||
175 | 175 | ||
176 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 176 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
177 | 177 | ||
178 | #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX | 178 | #ifndef arch_mutex_cpu_relax |
179 | #define arch_mutex_cpu_relax() cpu_relax() | 179 | # define arch_mutex_cpu_relax() cpu_relax() |
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | #endif | 182 | #endif |