Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit e58e871b authored by Levin, Alexander (Sasha Levin)'s avatar Levin, Alexander (Sasha Levin) Committed by Ingo Molnar
Browse files

tools/lib/lockdep: Remove private kernel headers


Move to using tools/include/ instead.

Signed-off-by: default avatarSasha 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: default avatarIngo Molnar <mingo@kernel.org>
parent 4ea4b3c2
No related merge requests found
Showing
with 62 additions and 0 deletions
#ifndef __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H
#define __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H
#endif /* __TOOLS_INCLUDE_LINUX_ASM_SECTIONS_H */
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
# define __maybe_unused __attribute__((unused)) # define __maybe_unused __attribute__((unused))
#endif #endif
#ifndef __used
# define __used __attribute__((__unused__))
#endif
#ifndef __packed #ifndef __packed
# define __packed __attribute__((__packed__)) # define __packed __attribute__((__packed__))
#endif #endif
...@@ -65,6 +69,14 @@ ...@@ -65,6 +69,14 @@
# define unlikely(x) __builtin_expect(!!(x), 0) # define unlikely(x) __builtin_expect(!!(x), 0)
#endif #endif
#ifndef __init
# define __init
#endif
#ifndef noinline
# define noinline
#endif
#define uninitialized_var(x) x = *(&(x)) #define uninitialized_var(x) x = *(&(x))
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <stddef.h> #include <stddef.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/bug.h>
#define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x) #define DEBUG_LOCKS_WARN_ON(x) WARN_ON(x)
......
#ifndef _TOOLS_INCLUDE_LINUX_DELAY_H
#define _TOOLS_INCLUDE_LINUX_DELAY_H
#endif /* _TOOLS_INCLUDE_LINUX_DELAY_H */
#ifndef _TOOLS_INCLUDE_LINUX_FTRACE_H
#define _TOOLS_INCLUDE_LINUX_FTRACE_H
#endif /* _TOOLS_INCLUDE_LINUX_FTRACE_H */
#ifndef _TOOLS_INCLUDE_LINUX_GFP_H
#define _TOOLS_INCLUDE_LINUX_GFP_H
#endif /* _TOOLS_INCLUDE_LINUX_GFP_H */
#ifndef _TOOLS_INCLUDE_LINUX_INTERRUPT_H
#define _TOOLS_INCLUDE_LINUX_INTERRUPT_H
#endif /* _TOOLS_INCLUDE_LINUX_INTERRUPT_H */
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
(type *)((char *)__mptr - offsetof(type, member)); }) (type *)((char *)__mptr - offsetof(type, member)); })
#endif #endif
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
#ifndef max #ifndef max
...@@ -89,4 +90,7 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...); ...@@ -89,4 +90,7 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...);
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
#define round_down(x, y) ((x) & ~__round_mask(x, y)) #define round_down(x, y) ((x) & ~__round_mask(x, y))
#define current_gfp_context(k) 0
#define synchronize_sched()
#endif #endif
#ifndef _TOOLS_INCLUDE_LINUX_LINKAGE_H
#define _TOOLS_INCLUDE_LINUX_LINKAGE_H
#endif /* _TOOLS_INCLUDE_LINUX_LINKAGE_H */
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
#include <limits.h> #include <limits.h>
#include <linux/utsname.h> #include <linux/utsname.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/export.h>
#include <linux/kern_levels.h>
#include <linux/err.h>
#include <linux/rcu.h>
#include <linux/list.h>
#include <linux/hardirq.h>
#include <unistd.h> #include <unistd.h>
#define MAX_LOCK_DEPTH 63UL #define MAX_LOCK_DEPTH 63UL
...@@ -39,6 +45,8 @@ static inline int debug_locks_off(void) ...@@ -39,6 +45,8 @@ static inline int debug_locks_off(void)
#define KSYM_NAME_LEN 128 #define KSYM_NAME_LEN 128
#define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__) #define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__)
#define pr_err(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
#define pr_warn pr_err
#define list_del_rcu list_del #define list_del_rcu list_del
......
#ifndef _TOOLS_INCLUDE_LINUX_MUTEX_H
#define _TOOLS_INCLUDE_LINUX_MUTEX_H
#endif /* _TOOLS_INCLUDE_LINUX_MUTEX_H */
#ifndef _TOOLS_INCLUDE_LINUX_PROC_FS_H
#define _TOOLS_INCLUDE_LINUX_PROC_FS_H
#endif /* _TOOLS_INCLUDE_LINUX_PROC_FS_H */
...@@ -19,5 +19,6 @@ static inline bool rcu_is_watching(void) ...@@ -19,5 +19,6 @@ static inline bool rcu_is_watching(void)
} }
#define rcu_assign_pointer(p, v) ((p) = (v)) #define rcu_assign_pointer(p, v) ((p) = (v))
#define RCU_INIT_POINTER(p, v) p=(v)
#endif #endif
#ifndef _TOOLS_PERF_LINUX_SCHED_CLOCK_H
#define _TOOLS_PERF_LINUX_SCHED_CLOCK_H
#endif /* _TOOLS_PERF_LINUX_SCHED_CLOCK_H */
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment