Skip to content

Commit

Permalink
locking/lockdep: Reduce header dependencies in <linux/debug_locks.h>
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211303.484161136@linutronix.de
  • Loading branch information
Sebastian Andrzej Siewior authored and Ingo Molnar committed Aug 17, 2021
1 parent a403abb commit cbcebf5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/linux/debug_locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cbcebf5

Please sign in to comment.