[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161703505131.29796.6858791226110189392.tip-bot2@tip-bot2>
Date: Mon, 29 Mar 2021 16:24:11 -0000
From: "tip-bot2 for Sebastian Andrzej Siewior" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: locking/core] locking/rtmutex: Consolidate rt_mutex_init()
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 199cacd1a625cfc499d624b98b10dc763062f7dd
Gitweb: https://git.kernel.org/tip/199cacd1a625cfc499d624b98b10dc763062f7dd
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Fri, 26 Mar 2021 16:29:33 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Mon, 29 Mar 2021 15:57:02 +02:00
locking/rtmutex: Consolidate rt_mutex_init()
rt_mutex_init() only initializes lockdep if CONFIG_DEBUG_RT_MUTEXES is
enabled, which is fine because all lockdep variants select it, but there is
no reason to do so.
Move the function outside of the CONFIG_DEBUG_RT_MUTEXES block which
removes #ifdeffery.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lore.kernel.org/r/20210326153943.437405350@linutronix.de
---
include/linux/rtmutex.h | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
index 0725c4b..243fabc 100644
--- a/include/linux/rtmutex.h
+++ b/include/linux/rtmutex.h
@@ -43,6 +43,7 @@ struct hrtimer_sleeper;
extern int rt_mutex_debug_check_no_locks_freed(const void *from,
unsigned long len);
extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task);
+ extern void rt_mutex_debug_task_free(struct task_struct *tsk);
#else
static inline int rt_mutex_debug_check_no_locks_freed(const void *from,
unsigned long len)
@@ -50,22 +51,15 @@ struct hrtimer_sleeper;
return 0;
}
# define rt_mutex_debug_check_no_locks_held(task) do { } while (0)
+# define rt_mutex_debug_task_free(t) do { } while (0)
#endif
-#ifdef CONFIG_DEBUG_RT_MUTEXES
-
-# define rt_mutex_init(mutex) \
+#define rt_mutex_init(mutex) \
do { \
static struct lock_class_key __key; \
__rt_mutex_init(mutex, __func__, &__key); \
} while (0)
- extern void rt_mutex_debug_task_free(struct task_struct *tsk);
-#else
-# define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL, NULL)
-# define rt_mutex_debug_task_free(t) do { } while (0)
-#endif
-
#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define __DEP_MAP_RT_MUTEX_INITIALIZER(mutexname) \
, .dep_map = { .name = #mutexname }
Powered by blists - more mailing lists