From a321fb9038b335f3c447d1810b97d5f7eec152ac Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 17 Aug 2021 16:17:38 +0200 Subject: locking/mutex: Consolidate core headers, remove kernel/locking/mutex-debug.h Having two header files which contain just the non-debug and debug variants is mostly waste of disc space and has no real value. Stick the debug variants into the common mutex.h file as counterpart to the stubs for the non-debug case. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210815211303.995350521@linutronix.de --- kernel/locking/mutex-debug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'kernel/locking/mutex-debug.c') diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index db9301591e3f..7ef5a36857e8 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c @@ -1,6 +1,4 @@ /* - * kernel/mutex-debug.c - * * Debugging code for mutexes * * Started by Ingo Molnar: @@ -22,7 +20,7 @@ #include #include -#include "mutex-debug.h" +#include "mutex.h" /* * Must be called with lock->wait_lock held. -- cgit v1.2.3 From c0afb0ffc06e6b4e492a3b711f1fb32074f9949c Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Sun, 15 Aug 2021 23:28:39 +0200 Subject: locking/ww_mutex: Gather mutex_waiter initialization Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210815211304.281927514@linutronix.de --- kernel/locking/mutex-debug.c | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel/locking/mutex-debug.c') diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index 7ef5a36857e8..bc8abb8549d2 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c @@ -30,6 +30,7 @@ void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); waiter->magic = waiter; INIT_LIST_HEAD(&waiter->list); + waiter->ww_ctx = MUTEX_POISON_WW_CTX; } void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) -- cgit v1.2.3