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 /tools/lib | |
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>
Diffstat (limited to 'tools/lib')
34 files changed, 3 insertions, 410 deletions
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/debug_locks.h b/tools/lib/lockdep/uinclude/linux/debug_locks.h deleted file mode 100644 index 1d4fbec5c649..000000000000 --- a/tools/lib/lockdep/uinclude/linux/debug_locks.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_DEBUG_LOCKS_H_ | ||
2 | #define _LIBLOCKDEP_DEBUG_LOCKS_H_ | ||
3 | |||
4 | #include <stddef.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x) | ||
8 | |||
9 | extern bool debug_locks; | ||
10 | extern bool debug_locks_silent; | ||
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/hardirq.h b/tools/lib/lockdep/uinclude/linux/hardirq.h deleted file mode 100644 index c8f3f8f58729..000000000000 --- a/tools/lib/lockdep/uinclude/linux/hardirq.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_HARDIRQ_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_HARDIRQ_H_ | ||
3 | |||
4 | #define SOFTIRQ_BITS 0UL | ||
5 | #define HARDIRQ_BITS 0UL | ||
6 | #define SOFTIRQ_SHIFT 0UL | ||
7 | #define HARDIRQ_SHIFT 0UL | ||
8 | #define hardirq_count() 0UL | ||
9 | #define softirq_count() 0UL | ||
10 | |||
11 | #endif | ||
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/irqflags.h b/tools/lib/lockdep/uinclude/linux/irqflags.h deleted file mode 100644 index df77669cfe1c..000000000000 --- a/tools/lib/lockdep/uinclude/linux/irqflags.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ | ||
3 | |||
4 | # define trace_hardirq_context(p) 0 | ||
5 | # define trace_softirq_context(p) 0 | ||
6 | # define trace_hardirqs_enabled(p) 0 | ||
7 | # define trace_softirqs_enabled(p) 0 | ||
8 | # define trace_hardirq_enter() do { } while (0) | ||
9 | # define trace_hardirq_exit() do { } while (0) | ||
10 | # define lockdep_softirq_enter() do { } while (0) | ||
11 | # define lockdep_softirq_exit() do { } while (0) | ||
12 | # define INIT_TRACE_IRQFLAGS | ||
13 | |||
14 | # define stop_critical_timings() do { } while (0) | ||
15 | # define start_critical_timings() do { } while (0) | ||
16 | |||
17 | #define raw_local_irq_disable() do { } while (0) | ||
18 | #define raw_local_irq_enable() do { } while (0) | ||
19 | #define raw_local_irq_save(flags) ((flags) = 0) | ||
20 | #define raw_local_irq_restore(flags) ((void)(flags)) | ||
21 | #define raw_local_save_flags(flags) ((flags) = 0) | ||
22 | #define raw_irqs_disabled_flags(flags) ((void)(flags)) | ||
23 | #define raw_irqs_disabled() 0 | ||
24 | #define raw_safe_halt() | ||
25 | |||
26 | #define local_irq_enable() do { } while (0) | ||
27 | #define local_irq_disable() do { } while (0) | ||
28 | #define local_irq_save(flags) ((flags) = 0) | ||
29 | #define local_irq_restore(flags) ((void)(flags)) | ||
30 | #define local_save_flags(flags) ((flags) = 0) | ||
31 | #define irqs_disabled() (1) | ||
32 | #define irqs_disabled_flags(flags) ((void)(flags), 0) | ||
33 | #define safe_halt() do { } while (0) | ||
34 | |||
35 | #define trace_lock_release(x, y) | ||
36 | #define trace_lock_acquire(a, b, c, d, e, f, g) | ||
37 | |||
38 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kallsyms.h b/tools/lib/lockdep/uinclude/linux/kallsyms.h deleted file mode 100644 index 582cc1e5f3a4..000000000000 --- a/tools/lib/lockdep/uinclude/linux/kallsyms.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KALLSYMS_H_ | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <stdio.h> | ||
6 | #include <unistd.h> | ||
7 | |||
8 | #define KSYM_NAME_LEN 128 | ||
9 | |||
10 | struct module; | ||
11 | |||
12 | static inline const char *kallsyms_lookup(unsigned long addr, | ||
13 | unsigned long *symbolsize, | ||
14 | unsigned long *offset, | ||
15 | char **modname, char *namebuf) | ||
16 | { | ||
17 | return NULL; | ||
18 | } | ||
19 | |||
20 | #include <execinfo.h> | ||
21 | #include <stdlib.h> | ||
22 | static inline void print_ip_sym(unsigned long ip) | ||
23 | { | ||
24 | char **name; | ||
25 | |||
26 | name = backtrace_symbols((void **)&ip, 1); | ||
27 | |||
28 | dprintf(STDOUT_FILENO, "%s\n", *name); | ||
29 | |||
30 | free(name); | ||
31 | } | ||
32 | |||
33 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kern_levels.h b/tools/lib/lockdep/uinclude/linux/kern_levels.h deleted file mode 100644 index 3b9bade28698..000000000000 --- a/tools/lib/lockdep/uinclude/linux/kern_levels.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef __KERN_LEVELS_H__ | ||
2 | #define __KERN_LEVELS_H__ | ||
3 | |||
4 | #define KERN_SOH "" /* ASCII Start Of Header */ | ||
5 | #define KERN_SOH_ASCII '' | ||
6 | |||
7 | #define KERN_EMERG KERN_SOH "" /* system is unusable */ | ||
8 | #define KERN_ALERT KERN_SOH "" /* action must be taken immediately */ | ||
9 | #define KERN_CRIT KERN_SOH "" /* critical conditions */ | ||
10 | #define KERN_ERR KERN_SOH "" /* error conditions */ | ||
11 | #define KERN_WARNING KERN_SOH "" /* warning conditions */ | ||
12 | #define KERN_NOTICE KERN_SOH "" /* normal but significant condition */ | ||
13 | #define KERN_INFO KERN_SOH "" /* informational */ | ||
14 | #define KERN_DEBUG KERN_SOH "" /* debug-level messages */ | ||
15 | |||
16 | #define KERN_DEFAULT KERN_SOH "" /* the default kernel loglevel */ | ||
17 | |||
18 | /* | ||
19 | * Annotation for a "continued" line of log printout (only done after a | ||
20 | * line that had no enclosing \n). Only to be used by core/arch code | ||
21 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
22 | */ | ||
23 | #define KERN_CONT "" | ||
24 | |||
25 | #endif | ||
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/kmemcheck.h b/tools/lib/lockdep/uinclude/linux/kmemcheck.h deleted file mode 100644 index 94d598bc6abe..000000000000 --- a/tools/lib/lockdep/uinclude/linux/kmemcheck.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KMEMCHECK_H_ | ||
3 | |||
4 | static inline void kmemcheck_mark_initialized(void *address, unsigned int n) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | #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/lockdep.h b/tools/lib/lockdep/uinclude/linux/lockdep.h deleted file mode 100644 index f026d4545e97..000000000000 --- a/tools/lib/lockdep/uinclude/linux/lockdep.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LOCKDEP_H_ | ||
2 | #define _LIBLOCKDEP_LOCKDEP_H_ | ||
3 | |||
4 | #include <sys/prctl.h> | ||
5 | #include <sys/syscall.h> | ||
6 | #include <string.h> | ||
7 | #include <limits.h> | ||
8 | #include <linux/utsname.h> | ||
9 | #include <linux/compiler.h> | ||
10 | #include <unistd.h> | ||
11 | |||
12 | #define MAX_LOCK_DEPTH 63UL | ||
13 | |||
14 | #define asmlinkage | ||
15 | #define __visible | ||
16 | |||
17 | #include "../../../include/linux/lockdep.h" | ||
18 | |||
19 | struct task_struct { | ||
20 | u64 curr_chain_key; | ||
21 | int lockdep_depth; | ||
22 | unsigned int lockdep_recursion; | ||
23 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | ||
24 | gfp_t lockdep_reclaim_gfp; | ||
25 | int pid; | ||
26 | char comm[17]; | ||
27 | }; | ||
28 | |||
29 | extern struct task_struct *__curr(void); | ||
30 | |||
31 | #define current (__curr()) | ||
32 | |||
33 | static inline int debug_locks_off(void) | ||
34 | { | ||
35 | return 1; | ||
36 | } | ||
37 | |||
38 | #define task_pid_nr(tsk) ((tsk)->pid) | ||
39 | |||
40 | #define KSYM_NAME_LEN 128 | ||
41 | #define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__) | ||
42 | |||
43 | #define list_del_rcu list_del | ||
44 | |||
45 | #define atomic_t unsigned long | ||
46 | #define atomic_inc(x) ((*(x))++) | ||
47 | |||
48 | #define print_tainted() "" | ||
49 | #define static_obj(x) 1 | ||
50 | |||
51 | #define debug_show_all_locks() | ||
52 | extern void debug_check_no_locks_held(void); | ||
53 | |||
54 | static __used bool __is_kernel_percpu_address(unsigned long addr, void *can_addr) | ||
55 | { | ||
56 | return false; | ||
57 | } | ||
58 | |||
59 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/module.h b/tools/lib/lockdep/uinclude/linux/module.h deleted file mode 100644 index 07055db296f3..000000000000 --- a/tools/lib/lockdep/uinclude/linux/module.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_MODULE_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_MODULE_H_ | ||
3 | |||
4 | #define module_param(name, type, perm) | ||
5 | |||
6 | static inline bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) | ||
7 | { | ||
8 | return false; | ||
9 | } | ||
10 | |||
11 | #endif | ||
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/rcu.h b/tools/lib/lockdep/uinclude/linux/rcu.h deleted file mode 100644 index 6f0332324a6d..000000000000 --- a/tools/lib/lockdep/uinclude/linux/rcu.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_RCU_H_ | ||
2 | #define _LIBLOCKDEP_RCU_H_ | ||
3 | |||
4 | int rcu_scheduler_active; | ||
5 | |||
6 | static inline int rcu_lockdep_current_cpu_online(void) | ||
7 | { | ||
8 | return 1; | ||
9 | } | ||
10 | |||
11 | static inline int rcu_is_cpu_idle(void) | ||
12 | { | ||
13 | return 1; | ||
14 | } | ||
15 | |||
16 | static inline bool rcu_is_watching(void) | ||
17 | { | ||
18 | return false; | ||
19 | } | ||
20 | |||
21 | #define rcu_assign_pointer(p, v) ((p) = (v)) | ||
22 | |||
23 | #endif | ||
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/stacktrace.h b/tools/lib/lockdep/uinclude/linux/stacktrace.h deleted file mode 100644 index 39aecc6b19d1..000000000000 --- a/tools/lib/lockdep/uinclude/linux/stacktrace.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_STACKTRACE_H_ | ||
3 | |||
4 | #include <execinfo.h> | ||
5 | |||
6 | struct stack_trace { | ||
7 | unsigned int nr_entries, max_entries; | ||
8 | unsigned long *entries; | ||
9 | int skip; | ||
10 | }; | ||
11 | |||
12 | static inline void print_stack_trace(struct stack_trace *trace, int spaces) | ||
13 | { | ||
14 | backtrace_symbols_fd((void **)trace->entries, trace->nr_entries, 1); | ||
15 | } | ||
16 | |||
17 | #define save_stack_trace(trace) \ | ||
18 | ((trace)->nr_entries = \ | ||
19 | backtrace((void **)(trace)->entries, (trace)->max_entries)) | ||
20 | |||
21 | static inline int dump_stack(void) | ||
22 | { | ||
23 | void *array[64]; | ||
24 | size_t size; | ||
25 | |||
26 | size = backtrace(array, 64); | ||
27 | backtrace_symbols_fd(array, size, 1); | ||
28 | |||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | #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 | |||