summaryrefslogtreecommitdiff
path: root/patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch')
-rw-r--r--patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch b/patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch
new file mode 100644
index 000000000000..1514060a7828
--- /dev/null
+++ b/patches/locking_lockdep__Reduce_includes_in_debug_locks.h.patch
@@ -0,0 +1,35 @@
+Subject: locking/lockdep: Reduce includes in debug_locks.h
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue Jul 6 16:36:48 2021 +0200
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+The inclusion of printk.h leads to a circular dependency if spinlock_t is
+based on rtmutexes on RT enabled kernels.
+
+Include only atomic.h (xchg()) and cache.h (__read_mostly) which is all
+what debug_locks.h requires.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+
+
+
+---
+ include/linux/debug_locks.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+---
+diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
+index edb5c186b0b7..3f49e65169c6 100644
+--- a/include/linux/debug_locks.h
++++ b/include/linux/debug_locks.h
+@@ -3,8 +3,7 @@
+ #define __LINUX_DEBUG_LOCKING_H
+
+ #include <linux/atomic.h>
+-#include <linux/bug.h>
+-#include <linux/printk.h>
++#include <linux/cache.h>
+
+ struct task_struct;
+