diff options
author | Peter Zijlstra <peterz@infradead.org> | 2016-09-19 06:15:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-08 04:35:49 -0400 |
commit | f5694788ad8da5da41b501f3d6d2ae22379c4ef9 (patch) | |
tree | 660f642ba2afcd13ef71449526184480202e8d63 /kernel/locking/rtmutex-debug.c | |
parent | 3942b77121986519ee52ab4dd4ae8f4383dfe765 (diff) |
rt_mutex: Add lockdep annotations
Now that (PI) futexes have their own private RT-mutex interface and
implementation we can easily add lockdep annotations to the existing
RT-mutex interface.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex-debug.c')
-rw-r--r-- | kernel/locking/rtmutex-debug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/locking/rtmutex-debug.c b/kernel/locking/rtmutex-debug.c index 58e366ad36f4..ac35e648b0e5 100644 --- a/kernel/locking/rtmutex-debug.c +++ b/kernel/locking/rtmutex-debug.c | |||
@@ -166,12 +166,16 @@ void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter) | |||
166 | memset(waiter, 0x22, sizeof(*waiter)); | 166 | memset(waiter, 0x22, sizeof(*waiter)); |
167 | } | 167 | } |
168 | 168 | ||
169 | void debug_rt_mutex_init(struct rt_mutex *lock, const char *name) | 169 | void debug_rt_mutex_init(struct rt_mutex *lock, const char *name, struct lock_class_key *key) |
170 | { | 170 | { |
171 | /* | 171 | /* |
172 | * Make sure we are not reinitializing a held lock: | 172 | * Make sure we are not reinitializing a held lock: |
173 | */ | 173 | */ |
174 | debug_check_no_locks_freed((void *)lock, sizeof(*lock)); | 174 | debug_check_no_locks_freed((void *)lock, sizeof(*lock)); |
175 | lock->name = name; | 175 | lock->name = name; |
176 | |||
177 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
178 | lockdep_init_map(&lock->dep_map, name, key, 0); | ||
179 | #endif | ||
176 | } | 180 | } |
177 | 181 | ||