aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-04-08 14:40:59 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-08 23:43:32 -0400
commit47788c58e66c050982241d9a05eb690daceb05a9 (patch)
tree96b8658e36bad85d1e77345b7be1edb6fdb9e1d1 /include
parentf876d346e3807647b1de411de6a86c44821896ca (diff)
tracing/syscalls: use a dedicated file header
Impact: fix build warnings and possibe compat misbehavior on IA64 Building a kernel on ia64 might trigger these ugly build warnings: CC arch/ia64/ia32/sys_ia32.o In file included from arch/ia64/ia32/sys_ia32.c:55: arch/ia64/ia32/ia32priv.h:290:1: warning: "elf_check_arch" redefined In file included from include/linux/elf.h:7, from include/linux/module.h:14, from include/linux/ftrace.h:8, from include/linux/syscalls.h:68, from arch/ia64/ia32/sys_ia32.c:18: arch/ia64/include/asm/elf.h:19:1: warning: this is the location of the previous definition [...] sys_ia32.c includes linux/syscalls.h which in turn includes linux/ftrace.h to import the syscalls tracing prototypes. But including ftrace.h can pull too much things for a low level file, especially on ia64 where the ia32 private headers conflict with higher level headers. Now we isolate the syscall tracing headers in their own lightweight file. Reported-by: Tony Luck <tony.luck@intel.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jason Baron <jbaron@redhat.com> Cc: "Frank Ch. Eigler" <fche@redhat.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Jiaying Zhang <jiayingz@google.com> Cc: Michael Rubin <mrubin@google.com> Cc: Martin Bligh <mbligh@google.com> Cc: Michael Davidson <md@google.com> LKML-Reference: <20090408184058.GB6017@nowhere> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h29
-rw-r--r--include/linux/syscalls.h2
-rw-r--r--include/trace/syscall.h35
3 files changed, 36 insertions, 30 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index ff112a872d75..8a0c2f221e6b 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -511,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {}
511 511
512#endif /* CONFIG_HW_BRANCH_TRACER */ 512#endif /* CONFIG_HW_BRANCH_TRACER */
513 513
514/*
515 * A syscall entry in the ftrace syscalls array.
516 *
517 * @name: name of the syscall
518 * @nb_args: number of parameters it takes
519 * @types: list of types as strings
520 * @args: list of args as strings (args[i] matches types[i])
521 */
522struct syscall_metadata {
523 const char *name;
524 int nb_args;
525 const char **types;
526 const char **args;
527};
528
529#ifdef CONFIG_FTRACE_SYSCALLS
530extern void arch_init_ftrace_syscalls(void);
531extern struct syscall_metadata *syscall_nr_to_meta(int nr);
532extern void start_ftrace_syscalls(void);
533extern void stop_ftrace_syscalls(void);
534extern void ftrace_syscall_enter(struct pt_regs *regs);
535extern void ftrace_syscall_exit(struct pt_regs *regs);
536#else
537static inline void start_ftrace_syscalls(void) { }
538static inline void stop_ftrace_syscalls(void) { }
539static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
540static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
541#endif
542
543#endif /* _LINUX_FTRACE_H */ 514#endif /* _LINUX_FTRACE_H */
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 6470f74074af..dabe4ad89141 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -65,7 +65,7 @@ struct old_linux_dirent;
65#include <asm/signal.h> 65#include <asm/signal.h>
66#include <linux/quota.h> 66#include <linux/quota.h>
67#include <linux/key.h> 67#include <linux/key.h>
68#include <linux/ftrace.h> 68#include <trace/syscall.h>
69 69
70#define __SC_DECL1(t1, a1) t1 a1 70#define __SC_DECL1(t1, a1) t1 a1
71#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) 71#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
new file mode 100644
index 000000000000..8cfe515cbc47
--- /dev/null
+++ b/include/trace/syscall.h
@@ -0,0 +1,35 @@
1#ifndef _TRACE_SYSCALL_H
2#define _TRACE_SYSCALL_H
3
4#include <asm/ptrace.h>
5
6/*
7 * A syscall entry in the ftrace syscalls array.
8 *
9 * @name: name of the syscall
10 * @nb_args: number of parameters it takes
11 * @types: list of types as strings
12 * @args: list of args as strings (args[i] matches types[i])
13 */
14struct syscall_metadata {
15 const char *name;
16 int nb_args;
17 const char **types;
18 const char **args;
19};
20
21#ifdef CONFIG_FTRACE_SYSCALLS
22extern void arch_init_ftrace_syscalls(void);
23extern struct syscall_metadata *syscall_nr_to_meta(int nr);
24extern void start_ftrace_syscalls(void);
25extern void stop_ftrace_syscalls(void);
26extern void ftrace_syscall_enter(struct pt_regs *regs);
27extern void ftrace_syscall_exit(struct pt_regs *regs);
28#else
29static inline void start_ftrace_syscalls(void) { }
30static inline void stop_ftrace_syscalls(void) { }
31static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
32static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
33#endif
34
35#endif /* _TRACE_SYSCALL_H */