Skip to content

Commit e4e17af

Browse files
Sebastian Andrzej SiewiorIngo Molnar
authored andcommitted
locking/rtmutex: Reduce <linux/rtmutex.h> header dependencies, only include <linux/rbtree_types.h>
We have the following header dependency problem on RT: - <linux/rtmutex.h> needs the definition of 'struct rb_root_cached'. - <linux/rbtree.h> includes <linux/kernel.h>, which includes <linux/spinlock.h> That works nicely for non-RT enabled kernels, but on RT enabled kernels spinlocks are based on rtmutexes, which creates another circular header dependency as <linux/spinlocks.h> will require <linux/rtmutex.h>. Include <linux/rbtree_types.h> instead. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 089050c commit e4e17af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/rtmutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include <linux/compiler.h>
1717
#include <linux/linkage.h>
18-
#include <linux/rbtree.h>
18+
#include <linux/rbtree_types.h>
1919
#include <linux/spinlock_types_raw.h>
2020

2121
extern int max_lock_depth; /* for sysctl */

0 commit comments

Comments
 (0)