diff options
author | Levin, Alexander (Sasha Levin) <alexander.levin@verizon.com> | 2017-05-30 20:38:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-05 03:28:14 -0400 |
commit | e58e871becec2d3b04ed91c0c16fe8deac9c9dfa (patch) | |
tree | 0d5423db3f5db43609e25a19008b7c4451c0ce1a | |
parent | 4ea4b3c25752499a67c4a35cafd2d5535017faad (diff) |
tools/lib/lockdep: Remove private kernel headers
Move to using tools/include/ instead.
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@redhat.com
Link: http://lkml.kernel.org/r/20170531003747.10557-2-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
49 files changed, 103 insertions, 158 deletions
diff --git a/tools/include/asm/sections.h b/tools/include/asm/sections.h new file mode 100644 index 000000000000..a80643d7a7f1 --- /dev/null +++ b/tools/include/asm/sections.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H | ||
2 | #define __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H | ||
3 | |||
4 | #endif /* __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H */ | ||
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index 23299d7e7160..ef6ab908a42f 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h | |||
@@ -45,6 +45,10 @@ | |||
45 | # define __maybe_unused __attribute__((unused)) | 45 | # define __maybe_unused __attribute__((unused)) |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifndef __used | ||
49 | # define __used __attribute__((__unused__)) | ||
50 | #endif | ||
51 | |||
48 | #ifndef __packed | 52 | #ifndef __packed |
49 | # define __packed __attribute__((__packed__)) | 53 | # define __packed __attribute__((__packed__)) |
50 | #endif | 54 | #endif |
@@ -65,6 +69,14 @@ | |||
65 | # define unlikely(x) __builtin_expect(!!(x), 0) | 69 | # define unlikely(x) __builtin_expect(!!(x), 0) |
66 | #endif | 70 | #endif |
67 | 71 | ||
72 | #ifndef __init | ||
73 | # define __init | ||
74 | #endif | ||
75 | |||
76 | #ifndef noinline | ||
77 | # define noinline | ||
78 | #endif | ||
79 | |||
68 | #define uninitialized_var(x) x = *(&(x)) | 80 | #define uninitialized_var(x) x = *(&(x)) |
69 | 81 | ||
70 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | 82 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) |
diff --git a/tools/lib/lockdep/uinclude/linux/debug_locks.h b/tools/include/linux/debug_locks.h index 1d4fbec5c649..61cc7f501168 100644 --- a/tools/lib/lockdep/uinclude/linux/debug_locks.h +++ b/tools/include/linux/debug_locks.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <stddef.h> | 4 | #include <stddef.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | #include <asm/bug.h> | ||
6 | 7 | ||
7 | #define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x) | 8 | #define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x) |
8 | 9 | ||
diff --git a/tools/include/linux/delay.h b/tools/include/linux/delay.h new file mode 100644 index 000000000000..55aa4173af1f --- /dev/null +++ b/tools/include/linux/delay.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_DELAY_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_DELAY_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_DELAY_H */ | ||
diff --git a/tools/include/linux/ftrace.h b/tools/include/linux/ftrace.h new file mode 100644 index 000000000000..949f541ce11e --- /dev/null +++ b/tools/include/linux/ftrace.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_FTRACE_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_FTRACE_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_FTRACE_H */ | ||
diff --git a/tools/include/linux/gfp.h b/tools/include/linux/gfp.h new file mode 100644 index 000000000000..22030756fbc0 --- /dev/null +++ b/tools/include/linux/gfp.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_GFP_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_GFP_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_GFP_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/linux/hardirq.h b/tools/include/linux/hardirq.h index c8f3f8f58729..c8f3f8f58729 100644 --- a/tools/lib/lockdep/uinclude/linux/hardirq.h +++ b/tools/include/linux/hardirq.h | |||
diff --git a/tools/include/linux/interrupt.h b/tools/include/linux/interrupt.h new file mode 100644 index 000000000000..6be25bbdca9e --- /dev/null +++ b/tools/include/linux/interrupt.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_INTERRUPT_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_INTERRUPT_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_INTERRUPT_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/linux/irqflags.h b/tools/include/linux/irqflags.h index df77669cfe1c..df77669cfe1c 100644 --- a/tools/lib/lockdep/uinclude/linux/irqflags.h +++ b/tools/include/linux/irqflags.h | |||
diff --git a/tools/lib/lockdep/uinclude/linux/kallsyms.h b/tools/include/linux/kallsyms.h index 582cc1e5f3a4..582cc1e5f3a4 100644 --- a/tools/lib/lockdep/uinclude/linux/kallsyms.h +++ b/tools/include/linux/kallsyms.h | |||
diff --git a/tools/lib/lockdep/uinclude/linux/kern_levels.h b/tools/include/linux/kern_levels.h index 3b9bade28698..3b9bade28698 100644 --- a/tools/lib/lockdep/uinclude/linux/kern_levels.h +++ b/tools/include/linux/kern_levels.h | |||
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h index 73ccc48126bb..801b927499f2 100644 --- a/tools/include/linux/kernel.h +++ b/tools/include/linux/kernel.h | |||
@@ -32,6 +32,7 @@ | |||
32 | (type *)((char *)__mptr - offsetof(type, member)); }) | 32 | (type *)((char *)__mptr - offsetof(type, member)); }) |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
35 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 36 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
36 | 37 | ||
37 | #ifndef max | 38 | #ifndef max |
@@ -89,4 +90,7 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...); | |||
89 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | 90 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) |
90 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | 91 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
91 | 92 | ||
93 | #define current_gfp_context(k) 0 | ||
94 | #define synchronize_sched() | ||
95 | |||
92 | #endif | 96 | #endif |
diff --git a/tools/lib/lockdep/uinclude/linux/kmemcheck.h b/tools/include/linux/kmemcheck.h index 94d598bc6abe..94d598bc6abe 100644 --- a/tools/lib/lockdep/uinclude/linux/kmemcheck.h +++ b/tools/include/linux/kmemcheck.h | |||
diff --git a/tools/include/linux/linkage.h b/tools/include/linux/linkage.h new file mode 100644 index 000000000000..bc763d500262 --- /dev/null +++ b/tools/include/linux/linkage.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_LINKAGE_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_LINKAGE_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_LINKAGE_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/linux/lockdep.h b/tools/include/linux/lockdep.h index f026d4545e97..8da3e8effafa 100644 --- a/tools/lib/lockdep/uinclude/linux/lockdep.h +++ b/tools/include/linux/lockdep.h | |||
@@ -7,6 +7,12 @@ | |||
7 | #include <limits.h> | 7 | #include <limits.h> |
8 | #include <linux/utsname.h> | 8 | #include <linux/utsname.h> |
9 | #include <linux/compiler.h> | 9 | #include <linux/compiler.h> |
10 | #include <linux/export.h> | ||
11 | #include <linux/kern_levels.h> | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/rcu.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/hardirq.h> | ||
10 | #include <unistd.h> | 16 | #include <unistd.h> |
11 | 17 | ||
12 | #define MAX_LOCK_DEPTH 63UL | 18 | #define MAX_LOCK_DEPTH 63UL |
@@ -39,6 +45,8 @@ static inline int debug_locks_off(void) | |||
39 | 45 | ||
40 | #define KSYM_NAME_LEN 128 | 46 | #define KSYM_NAME_LEN 128 |
41 | #define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__) | 47 | #define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__) |
48 | #define pr_err(format, ...) fprintf (stderr, format, ## __VA_ARGS__) | ||
49 | #define pr_warn pr_err | ||
42 | 50 | ||
43 | #define list_del_rcu list_del | 51 | #define list_del_rcu list_del |
44 | 52 | ||
diff --git a/tools/lib/lockdep/uinclude/linux/module.h b/tools/include/linux/module.h index 07055db296f3..07055db296f3 100644 --- a/tools/lib/lockdep/uinclude/linux/module.h +++ b/tools/include/linux/module.h | |||
diff --git a/tools/include/linux/mutex.h b/tools/include/linux/mutex.h new file mode 100644 index 000000000000..a8180d25f2fc --- /dev/null +++ b/tools/include/linux/mutex.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_MUTEX_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_MUTEX_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_MUTEX_H */ | ||
diff --git a/tools/include/linux/proc_fs.h b/tools/include/linux/proc_fs.h new file mode 100644 index 000000000000..8b3b03b64fda --- /dev/null +++ b/tools/include/linux/proc_fs.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_PROC_FS_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_PROC_FS_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_PROC_FS_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/linux/rcu.h b/tools/include/linux/rcu.h index 6f0332324a6d..5080649dad04 100644 --- a/tools/lib/lockdep/uinclude/linux/rcu.h +++ b/tools/include/linux/rcu.h | |||
@@ -19,5 +19,6 @@ static inline bool rcu_is_watching(void) | |||
19 | } | 19 | } |
20 | 20 | ||
21 | #define rcu_assign_pointer(p, v) ((p) = (v)) | 21 | #define rcu_assign_pointer(p, v) ((p) = (v)) |
22 | #define RCU_INIT_POINTER(p, v) p=(v) | ||
22 | 23 | ||
23 | #endif | 24 | #endif |
diff --git a/tools/include/linux/sched/clock.h b/tools/include/linux/sched/clock.h new file mode 100644 index 000000000000..5837d17c4182 --- /dev/null +++ b/tools/include/linux/sched/clock.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_PERF_LINUX_SCHED_CLOCK_H | ||
2 | #define _TOOLS_PERF_LINUX_SCHED_CLOCK_H | ||
3 | |||
4 | #endif /* _TOOLS_PERF_LINUX_SCHED_CLOCK_H */ | ||
diff --git a/tools/include/linux/sched/task.h b/tools/include/linux/sched/task.h new file mode 100644 index 000000000000..a97890eca110 --- /dev/null +++ b/tools/include/linux/sched/task.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_PERF_LINUX_SCHED_TASK_H | ||
2 | #define _TOOLS_PERF_LINUX_SCHED_TASK_H | ||
3 | |||
4 | #endif /* _TOOLS_PERF_LINUX_SCHED_TASK_H */ | ||
diff --git a/tools/include/linux/seq_file.h b/tools/include/linux/seq_file.h new file mode 100644 index 000000000000..102fd9217f1f --- /dev/null +++ b/tools/include/linux/seq_file.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H | ||
2 | #define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */ | ||
diff --git a/tools/include/linux/spinlock.h b/tools/include/linux/spinlock.h index 58397dcb19d6..417cda4f793f 100644 --- a/tools/include/linux/spinlock.h +++ b/tools/include/linux/spinlock.h | |||
@@ -1,5 +1,31 @@ | |||
1 | #ifndef __LINUX_SPINLOCK_H_ | ||
2 | #define __LINUX_SPINLOCK_H_ | ||
3 | |||
4 | #include <pthread.h> | ||
5 | #include <stdbool.h> | ||
6 | |||
1 | #define spinlock_t pthread_mutex_t | 7 | #define spinlock_t pthread_mutex_t |
2 | #define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER; | 8 | #define DEFINE_SPINLOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER; |
3 | 9 | ||
4 | #define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x) | 10 | #define spin_lock_irqsave(x, f) (void)f, pthread_mutex_lock(x) |
5 | #define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x) | 11 | #define spin_unlock_irqrestore(x, f) (void)f, pthread_mutex_unlock(x) |
12 | |||
13 | #define arch_spinlock_t pthread_mutex_t | ||
14 | #define __ARCH_SPIN_LOCK_UNLOCKED PTHREAD_MUTEX_INITIALIZER | ||
15 | |||
16 | static inline void arch_spin_lock(arch_spinlock_t *mutex) | ||
17 | { | ||
18 | pthread_mutex_lock(mutex); | ||
19 | } | ||
20 | |||
21 | static inline void arch_spin_unlock(arch_spinlock_t *mutex) | ||
22 | { | ||
23 | pthread_mutex_unlock(mutex); | ||
24 | } | ||
25 | |||
26 | static inline bool arch_spin_is_locked(arch_spinlock_t *mutex) | ||
27 | { | ||
28 | return true; | ||
29 | } | ||
30 | |||
31 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/stacktrace.h b/tools/include/linux/stacktrace.h index 39aecc6b19d1..39aecc6b19d1 100644 --- a/tools/lib/lockdep/uinclude/linux/stacktrace.h +++ b/tools/include/linux/stacktrace.h | |||
diff --git a/tools/include/trace/events/lock.h b/tools/include/trace/events/lock.h new file mode 100644 index 000000000000..5b15fd5ee1af --- /dev/null +++ b/tools/include/trace/events/lock.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _TOOLS_INCLUDE_TRACE_EVENTS_LOCK_H | ||
2 | #define _TOOLS_INCLUDE_TRACE_EVENTS_LOCK_H | ||
3 | |||
4 | #endif /* _TOOLS_INCLUDE_TRACE_EVENTS_LOCK_H */ | ||
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c index 209f967dedaa..ced6d7443cea 100644 --- a/tools/lib/lockdep/lockdep.c +++ b/tools/lib/lockdep/lockdep.c | |||
@@ -5,6 +5,8 @@ | |||
5 | #define hlist_for_each_entry_rcu hlist_for_each_entry | 5 | #define hlist_for_each_entry_rcu hlist_for_each_entry |
6 | #define hlist_add_head_rcu hlist_add_head | 6 | #define hlist_add_head_rcu hlist_add_head |
7 | #define hlist_del_rcu hlist_del | 7 | #define hlist_del_rcu hlist_del |
8 | #define list_for_each_entry_rcu list_for_each_entry | ||
9 | #define list_add_tail_rcu list_add_tail | ||
8 | 10 | ||
9 | u32 prandom_u32(void) | 11 | u32 prandom_u32(void) |
10 | { | 12 | { |
diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c index 226aa26198a9..6a2d3c5d4e92 100644 --- a/tools/lib/lockdep/preload.c +++ b/tools/lib/lockdep/preload.c | |||
@@ -123,8 +123,6 @@ static struct rb_node **__get_lock_node(void *lock, struct rb_node **parent) | |||
123 | #define LIBLOCKDEP_STATIC_ENTRIES 1024 | 123 | #define LIBLOCKDEP_STATIC_ENTRIES 1024 |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) | ||
127 | |||
128 | static struct lock_lookup __locks[LIBLOCKDEP_STATIC_ENTRIES]; | 126 | static struct lock_lookup __locks[LIBLOCKDEP_STATIC_ENTRIES]; |
129 | static int __locks_nr; | 127 | static int __locks_nr; |
130 | 128 | ||
diff --git a/tools/lib/lockdep/rbtree.c b/tools/lib/lockdep/rbtree.c index f7f43033c8b7..297c304571f8 100644 --- a/tools/lib/lockdep/rbtree.c +++ b/tools/lib/lockdep/rbtree.c | |||
@@ -1 +1 @@ | |||
#include "../../../lib/rbtree.c" | #include "../../lib/rbtree.c" | ||
diff --git a/tools/lib/lockdep/uinclude/asm/hash.h b/tools/lib/lockdep/uinclude/asm/hash.h deleted file mode 100644 index d82b170bb216..000000000000 --- a/tools/lib/lockdep/uinclude/asm/hash.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_GENERIC_HASH_H | ||
2 | #define __ASM_GENERIC_HASH_H | ||
3 | |||
4 | /* Stub */ | ||
5 | |||
6 | #endif /* __ASM_GENERIC_HASH_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/asm/hweight.h b/tools/lib/lockdep/uinclude/asm/hweight.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/asm/hweight.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/asm/sections.h b/tools/lib/lockdep/uinclude/asm/sections.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/asm/sections.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/compiler.h b/tools/lib/lockdep/uinclude/linux/compiler.h deleted file mode 100644 index fba5e022cee7..000000000000 --- a/tools/lib/lockdep/uinclude/linux/compiler.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_COMPILER_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_COMPILER_H_ | ||
3 | |||
4 | #define __used __attribute__((__unused__)) | ||
5 | #define unlikely | ||
6 | #define READ_ONCE(x) (x) | ||
7 | #define WRITE_ONCE(x, val) x=(val) | ||
8 | #define RCU_INIT_POINTER(p, v) p=(v) | ||
9 | |||
10 | #define __packed __attribute__((packed)) | ||
11 | |||
12 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/delay.h b/tools/lib/lockdep/uinclude/linux/delay.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/delay.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/ftrace.h b/tools/lib/lockdep/uinclude/linux/ftrace.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/ftrace.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/gfp.h b/tools/lib/lockdep/uinclude/linux/gfp.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/gfp.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/hash.h b/tools/lib/lockdep/uinclude/linux/hash.h deleted file mode 100644 index 0f8479858dc0..000000000000 --- a/tools/lib/lockdep/uinclude/linux/hash.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../../include/linux/hash.h" | ||
diff --git a/tools/lib/lockdep/uinclude/linux/interrupt.h b/tools/lib/lockdep/uinclude/linux/interrupt.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/interrupt.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h deleted file mode 100644 index 4a31ebe1a377..000000000000 --- a/tools/lib/lockdep/uinclude/linux/kernel.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KERNEL_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KERNEL_H_ | ||
3 | |||
4 | #include <linux/export.h> | ||
5 | #include <linux/types.h> | ||
6 | #include <linux/rcu.h> | ||
7 | #include <linux/hardirq.h> | ||
8 | #include <linux/kern_levels.h> | ||
9 | #include <linux/err.h> | ||
10 | |||
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) | ||
12 | |||
13 | #ifndef container_of | ||
14 | #define container_of(ptr, type, member) ({ \ | ||
15 | const typeof(((type *)0)->member) * __mptr = (ptr); \ | ||
16 | (type *)((char *)__mptr - offsetof(type, member)); }) | ||
17 | #endif | ||
18 | |||
19 | #define max(x, y) ({ \ | ||
20 | typeof(x) _max1 = (x); \ | ||
21 | typeof(y) _max2 = (y); \ | ||
22 | (void) (&_max1 == &_max2); \ | ||
23 | _max1 > _max2 ? _max1 : _max2; }) | ||
24 | |||
25 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
26 | |||
27 | static inline int lockdep_warn(int condition) | ||
28 | { | ||
29 | return condition; | ||
30 | } | ||
31 | #define WARN_ON(x) lockdep_warn(x) | ||
32 | #define WARN_ON_ONCE(x) WARN_ON(x) | ||
33 | #define WARN(x, y...) WARN_ON(x) | ||
34 | |||
35 | #define likely(x) (x) | ||
36 | #define uninitialized_var(x) x | ||
37 | #define __init | ||
38 | #define noinline | ||
39 | #define list_add_tail_rcu list_add_tail | ||
40 | #define list_for_each_entry_rcu list_for_each_entry | ||
41 | #define barrier() | ||
42 | #define synchronize_sched() | ||
43 | |||
44 | #ifndef CALLER_ADDR0 | ||
45 | #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) | ||
46 | #endif | ||
47 | |||
48 | #ifndef _RET_IP_ | ||
49 | #define _RET_IP_ CALLER_ADDR0 | ||
50 | #endif | ||
51 | |||
52 | #ifndef _THIS_IP_ | ||
53 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
54 | #endif | ||
55 | |||
56 | #define pr_err(format, ...) fprintf (stderr, format, ## __VA_ARGS__) | ||
57 | #define pr_warn pr_err | ||
58 | |||
59 | #define current_gfp_context(k) 0 | ||
60 | |||
61 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/linkage.h b/tools/lib/lockdep/uinclude/linux/linkage.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/linkage.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/list.h b/tools/lib/lockdep/uinclude/linux/list.h deleted file mode 100644 index 6e9ef31ed82e..000000000000 --- a/tools/lib/lockdep/uinclude/linux/list.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../../include/linux/list.h" | ||
diff --git a/tools/lib/lockdep/uinclude/linux/mutex.h b/tools/lib/lockdep/uinclude/linux/mutex.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/mutex.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/poison.h b/tools/lib/lockdep/uinclude/linux/poison.h deleted file mode 100644 index 0c27bdf14233..000000000000 --- a/tools/lib/lockdep/uinclude/linux/poison.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../../include/linux/poison.h" | ||
diff --git a/tools/lib/lockdep/uinclude/linux/prefetch.h b/tools/lib/lockdep/uinclude/linux/prefetch.h deleted file mode 100644 index d73fe6f850ac..000000000000 --- a/tools/lib/lockdep/uinclude/linux/prefetch.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_PREFETCH_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_PREFETCH_H | ||
3 | |||
4 | static inline void prefetch(void *a __attribute__((unused))) { } | ||
5 | |||
6 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/proc_fs.h b/tools/lib/lockdep/uinclude/linux/proc_fs.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/proc_fs.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h b/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h deleted file mode 100644 index c3759477379c..000000000000 --- a/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #define __always_inline | ||
2 | #include "../../../include/linux/rbtree_augmented.h" | ||
diff --git a/tools/lib/lockdep/uinclude/linux/seq_file.h b/tools/lib/lockdep/uinclude/linux/seq_file.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/seq_file.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/spinlock.h b/tools/lib/lockdep/uinclude/linux/spinlock.h deleted file mode 100644 index 68c1aa2bcba5..000000000000 --- a/tools/lib/lockdep/uinclude/linux/spinlock.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_SPINLOCK_H_ | ||
2 | #define _LIBLOCKDEP_SPINLOCK_H_ | ||
3 | |||
4 | #include <pthread.h> | ||
5 | #include <stdbool.h> | ||
6 | |||
7 | #define arch_spinlock_t pthread_mutex_t | ||
8 | #define __ARCH_SPIN_LOCK_UNLOCKED PTHREAD_MUTEX_INITIALIZER | ||
9 | |||
10 | static inline void arch_spin_lock(arch_spinlock_t *mutex) | ||
11 | { | ||
12 | pthread_mutex_lock(mutex); | ||
13 | } | ||
14 | |||
15 | static inline void arch_spin_unlock(arch_spinlock_t *mutex) | ||
16 | { | ||
17 | pthread_mutex_unlock(mutex); | ||
18 | } | ||
19 | |||
20 | static inline bool arch_spin_is_locked(arch_spinlock_t *mutex) | ||
21 | { | ||
22 | return true; | ||
23 | } | ||
24 | |||
25 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/stringify.h b/tools/lib/lockdep/uinclude/linux/stringify.h deleted file mode 100644 index 05dfcd1ac118..000000000000 --- a/tools/lib/lockdep/uinclude/linux/stringify.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_STRINGIFY_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_STRINGIFY_H_ | ||
3 | |||
4 | #define __stringify_1(x...) #x | ||
5 | #define __stringify(x...) __stringify_1(x) | ||
6 | |||
7 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/trace/events/lock.h b/tools/lib/lockdep/uinclude/trace/events/lock.h deleted file mode 100644 index fab00ff936d1..000000000000 --- a/tools/lib/lockdep/uinclude/trace/events/lock.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||