diff options
Diffstat (limited to 'patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch')
-rw-r--r-- | patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch b/patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch index 68449683b50b..10d3e179aeed 100644 --- a/patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch +++ b/patches/rtmutex--Split-out-the-inner-parts-of-struct-rtmutex.patch @@ -16,13 +16,13 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- V2: New patch --- - include/linux/rtmutex.h | 29 +++++++++++++----- + include/linux/rtmutex.h | 23 ++++++++++---- kernel/futex.c | 4 +- kernel/locking/rtmutex.c | 64 ++++++++++++++++++++-------------------- - kernel/locking/rtmutex_api.c | 39 +++++++++++++----------- + kernel/locking/rtmutex_api.c | 41 ++++++++++++++----------- kernel/locking/rtmutex_common.h | 38 +++++++++++------------ kernel/rcu/tree_plugin.h | 6 +-- - 6 files changed, 100 insertions(+), 80 deletions(-) + 6 files changed, 97 insertions(+), 79 deletions(-) --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h @@ -59,23 +59,17 @@ V2: New patch #ifdef CONFIG_DEBUG_LOCK_ALLOC struct lockdep_map dep_map; #endif -@@ -58,11 +71,11 @@ do { \ - #define __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) - #endif - --#define __RT_MUTEX_INITIALIZER(mutexname) \ -- { .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \ -- , .waiters = RB_ROOT_CACHED \ -- , .owner = NULL \ -- __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname)} -+#define __RT_MUTEX_INITIALIZER(mutexname) \ -+{ \ -+ .rtmutex = __RT_MUTEX_BASE_INITIALIZER(mutexname.rtmutex) \ -+ __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) \ -+} +@@ -63,9 +76,7 @@ do { \ + + #define __RT_MUTEX_INITIALIZER(mutexname) \ + { \ +- .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock), \ +- .waiters = RB_ROOT_CACHED, \ +- .owner = NULL, \ ++ .rtmutex = __RT_MUTEX_BASE_INITIALIZER(mutexname.rtmutex), \ + __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) \ + } - #define DEFINE_RT_MUTEX(mutexname) \ - struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) --- a/kernel/futex.c +++ b/kernel/futex.c @@ -179,7 +179,7 @@ struct futex_pi_state { @@ -433,12 +427,16 @@ V2: New patch { DEFINE_WAKE_Q(wake_q); unsigned long flags; -@@ -185,9 +191,8 @@ void __sched __rt_mutex_init(struct rt_m - struct lock_class_key *key) +@@ -182,12 +188,11 @@ void __sched rt_mutex_futex_unlock(struc + * Initializing of a locked rt_mutex is not allowed + */ + void __sched __rt_mutex_init(struct rt_mutex *lock, const char *name, +- struct lock_class_key *key) ++ struct lock_class_key *key) { debug_check_no_locks_freed((void *)lock, sizeof(*lock)); + __rt_mutex_base_init(&lock->rtmutex); - lockdep_init_map(&lock->dep_map, name, key, 0); + lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP); - - __rt_mutex_basic_init(lock); } |