Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6
[safe/jmp/linux-2.6] / include / linux / syscalls.h
index b9af875..bc70c58 100644 (file)
@@ -25,6 +25,7 @@ struct linux_dirent64;
 struct list_head;
 struct msgbuf;
 struct msghdr;
+struct mmsghdr;
 struct msqid_ds;
 struct new_utsname;
 struct nfsctl_arg;
@@ -99,37 +100,16 @@ struct perf_event_attr;
 #define __SC_TEST6(t6, a6, ...)        __SC_TEST(t6); __SC_TEST5(__VA_ARGS__)
 
 #ifdef CONFIG_EVENT_PROFILE
-#define TRACE_SYS_ENTER_PROFILE(sname)                                        \
-static int prof_sysenter_enable_##sname(struct ftrace_event_call *unused)      \
-{                                                                             \
-       return reg_prof_syscall_enter("sys"#sname);                            \
-}                                                                             \
-                                                                              \
-static void prof_sysenter_disable_##sname(struct ftrace_event_call *unused)    \
-{                                                                             \
-       unreg_prof_syscall_enter("sys"#sname);                                 \
-}
-
-#define TRACE_SYS_EXIT_PROFILE(sname)                                         \
-static int prof_sysexit_enable_##sname(struct ftrace_event_call *unused)       \
-{                                                                             \
-       return reg_prof_syscall_exit("sys"#sname);                             \
-}                                                                             \
-                                                                              \
-static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused)     \
-{                                                                              \
-       unreg_prof_syscall_exit("sys"#sname);                                  \
-}
 
 #define TRACE_SYS_ENTER_PROFILE_INIT(sname)                                   \
        .profile_count = ATOMIC_INIT(-1),                                      \
-       .profile_enable = prof_sysenter_enable_##sname,                        \
-       .profile_disable = prof_sysenter_disable_##sname,
+       .profile_enable = prof_sysenter_enable,                                \
+       .profile_disable = prof_sysenter_disable,
 
 #define TRACE_SYS_EXIT_PROFILE_INIT(sname)                                    \
        .profile_count = ATOMIC_INIT(-1),                                      \
-       .profile_enable = prof_sysexit_enable_##sname,                         \
-       .profile_disable = prof_sysexit_disable_##sname,
+       .profile_enable = prof_sysexit_enable,                                 \
+       .profile_disable = prof_sysexit_disable,
 #else
 #define TRACE_SYS_ENTER_PROFILE(sname)
 #define TRACE_SYS_ENTER_PROFILE_INIT(sname)
@@ -155,23 +135,9 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused)     \
 #define SYSCALL_TRACE_ENTER_EVENT(sname)                               \
        static const struct syscall_metadata __syscall_meta_##sname;    \
        static struct ftrace_event_call event_enter_##sname;            \
-       struct trace_event enter_syscall_print_##sname = {              \
+       static struct trace_event enter_syscall_print_##sname = {       \
                .trace                  = print_syscall_enter,          \
        };                                                              \
-       static int init_enter_##sname(struct ftrace_event_call *call)   \
-       {                                                               \
-               int num, id;                                            \
-               num = syscall_name_to_nr("sys"#sname);                  \
-               if (num < 0)                                            \
-                       return -ENOSYS;                                 \
-               id = register_ftrace_event(&enter_syscall_print_##sname);\
-               if (!id)                                                \
-                       return -ENODEV;                                 \
-               event_enter_##sname.id = id;                            \
-               INIT_LIST_HEAD(&event_enter_##sname.fields);            \
-               return 0;                                               \
-       }                                                               \
-       TRACE_SYS_ENTER_PROFILE(sname);                                 \
        static struct ftrace_event_call __used                          \
          __attribute__((__aligned__(4)))                               \
          __attribute__((section("_ftrace_events")))                    \
@@ -179,7 +145,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused)     \
                .name                   = "sys_enter"#sname,            \
                .system                 = "syscalls",                   \
                .event                  = &enter_syscall_print_##sname, \
-               .raw_init               = init_enter_##sname,           \
+               .raw_init               = init_syscall_trace,           \
                .show_format            = syscall_enter_format,         \
                .define_fields          = syscall_enter_define_fields,  \
                .regfunc                = reg_event_syscall_enter,      \
@@ -191,23 +157,9 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused)     \
 #define SYSCALL_TRACE_EXIT_EVENT(sname)                                        \
        static const struct syscall_metadata __syscall_meta_##sname;    \
        static struct ftrace_event_call event_exit_##sname;             \
-       struct trace_event exit_syscall_print_##sname = {               \
+       static struct trace_event exit_syscall_print_##sname = {        \
                .trace                  = print_syscall_exit,           \
        };                                                              \
-       static int init_exit_##sname(struct ftrace_event_call *call)    \
-       {                                                               \
-               int num, id;                                            \
-               num = syscall_name_to_nr("sys"#sname);                  \
-               if (num < 0)                                            \
-                       return -ENOSYS;                                 \
-               id = register_ftrace_event(&exit_syscall_print_##sname);\
-               if (!id)                                                \
-                       return -ENODEV;                                 \
-               event_exit_##sname.id = id;                             \
-               INIT_LIST_HEAD(&event_exit_##sname.fields);             \
-               return 0;                                               \
-       }                                                               \
-       TRACE_SYS_EXIT_PROFILE(sname);                                  \
        static struct ftrace_event_call __used                          \
          __attribute__((__aligned__(4)))                               \
          __attribute__((section("_ftrace_events")))                    \
@@ -215,7 +167,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused)     \
                .name                   = "sys_exit"#sname,             \
                .system                 = "syscalls",                   \
                .event                  = &exit_syscall_print_##sname,  \
-               .raw_init               = init_exit_##sname,            \
+               .raw_init               = init_syscall_trace,           \
                .show_format            = syscall_exit_format,          \
                .define_fields          = syscall_exit_define_fields,   \
                .regfunc                = reg_event_syscall_exit,       \
@@ -677,6 +629,9 @@ asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
 asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned,
                                struct sockaddr __user *, int __user *);
 asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
+asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg,
+                            unsigned int vlen, unsigned flags,
+                            struct timespec __user *timeout);
 asmlinkage long sys_socket(int, int, int);
 asmlinkage long sys_socketpair(int, int, int, int __user *);
 asmlinkage long sys_socketcall(int call, unsigned long __user *args);