Commit 083986e8 authored by Heiko Carstens's avatar Heiko Carstens

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 6cac446b
...@@ -286,9 +286,6 @@ config HAVE_PERF_USER_STACK_DUMP ...@@ -286,9 +286,6 @@ config HAVE_PERF_USER_STACK_DUMP
config HAVE_ARCH_JUMP_LABEL config HAVE_ARCH_JUMP_LABEL
bool bool
config HAVE_ARCH_MUTEX_CPU_RELAX
bool
config HAVE_RCU_TABLE_FREE config HAVE_RCU_TABLE_FREE
bool bool
......
...@@ -102,7 +102,6 @@ config S390 ...@@ -102,7 +102,6 @@ config S390
select GENERIC_TIME_VSYSCALL_OLD select GENERIC_TIME_VSYSCALL_OLD
select HAVE_ALIGNED_STRUCT_PAGE if SLUB select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
select HAVE_ARCH_MUTEX_CPU_RELAX
select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT
......
...@@ -7,5 +7,3 @@ ...@@ -7,5 +7,3 @@
*/ */
#include <asm-generic/mutex-dec.h> #include <asm-generic/mutex-dec.h>
#define arch_mutex_cpu_relax() barrier()
...@@ -198,6 +198,8 @@ static inline void cpu_relax(void) ...@@ -198,6 +198,8 @@ static inline void cpu_relax(void)
barrier(); barrier();
} }
#define arch_mutex_cpu_relax() barrier()
static inline void psw_set_key(unsigned int key) static inline void psw_set_key(unsigned int key)
{ {
asm volatile("spka 0(%0)" : : "d" (key)); asm volatile("spka 0(%0)" : : "d" (key));
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
#include <linux/spinlock_types.h> #include <linux/spinlock_types.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/lockdep.h> #include <linux/lockdep.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <asm/processor.h>
/* /*
* Simple, straightforward mutexes with strict semantics: * Simple, straightforward mutexes with strict semantics:
...@@ -175,8 +175,8 @@ extern void mutex_unlock(struct mutex *lock); ...@@ -175,8 +175,8 @@ extern void mutex_unlock(struct mutex *lock);
extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
#ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX #ifndef arch_mutex_cpu_relax
#define arch_mutex_cpu_relax() cpu_relax() # define arch_mutex_cpu_relax() cpu_relax()
#endif #endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment