[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8ff782d3c759a6577faf9bf92027cdc40f624712.1267214186.git.jbaron@redhat.com>
Date: Fri, 26 Feb 2010 16:37:21 -0500
From: Jason Baron <jbaron@...hat.com>
To: fweisbec@...il.com, mingo@...e.hu, rostedt@...dmis.org
Cc: linux-kernel@...r.kernel.org, laijs@...fujitsu.com,
lizf@...fujitsu.com, hpa@...or.com, tglx@...utronix.de,
mhiramat@...hat.com, heiko.carstens@...ibm.com,
benh@...nel.crashing.org, davem@...emloft.net, lethal@...ux-sh.org,
schwidefsky@...ibm.com, brueckner@...ux.vnet.ibm.com,
tony.luck@...el.com
Subject: [PATCH 06/12] syscalls: add ARCH_COMPAT_SYSCALL_DEFINE()
Add ARCH_COMPAT_SYSCALL_DEFINE#N() macro which prepends "arch_compat_sys" to
arch specific compat syscall names. Identifies the 'compat' syscalls.
Signed-off-by: Jason Baron <jbaron@...hat.com>
---
include/linux/syscalls.h | 41 ++++++++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index e601985..cd7b959 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -141,7 +141,7 @@ struct perf_event_attr;
__attribute__((__aligned__(4))) \
__attribute__((section("_ftrace_events"))) \
event_enter_##sname = { \
- .name = "sys_enter"#sname, \
+ .name = "enter_"#sname, \
.system = "syscalls", \
.event = &enter_syscall_print_##sname, \
.raw_init = init_syscall_trace, \
@@ -163,7 +163,7 @@ struct perf_event_attr;
__attribute__((__aligned__(4))) \
__attribute__((section("_ftrace_events"))) \
event_exit_##sname = { \
- .name = "sys_exit"#sname, \
+ .name = "exit_"#sname, \
.system = "syscalls", \
.event = &exit_syscall_print_##sname, \
.raw_init = init_syscall_trace, \
@@ -181,7 +181,7 @@ struct perf_event_attr;
__attribute__((__aligned__(4))) \
__attribute__((section("__syscalls_metadata"))) \
__syscall_meta_##sname = { \
- .name = "sys"#sname, \
+ .name = #sname, \
.nb_args = nb, \
.types = types_##sname, \
.args = args_##sname, \
@@ -194,32 +194,39 @@ struct perf_event_attr;
};
#define SYSCALL_DEFINE0(sname) \
- SYSCALL_TRACE_ENTER_EVENT(_##sname); \
- SYSCALL_TRACE_EXIT_EVENT(_##sname); \
+ SYSCALL_TRACE_ENTER_EVENT(sys_##sname); \
+ SYSCALL_TRACE_EXIT_EVENT(sys_##sname); \
static const struct syscall_metadata __used \
__attribute__((__aligned__(4))) \
__attribute__((section("__syscalls_metadata"))) \
- __syscall_meta__##sname = { \
+ __syscall_meta_sys_##sname = { \
.name = "sys_"#sname, \
.nb_args = 0, \
.ftrace_enter = 0, \
.ftrace_exit = 0, \
.perf_enter = 0, \
.perf_exit = 0, \
- .enter_event = &event_enter__##sname, \
- .exit_event = &event_exit__##sname, \
+ .enter_event = &event_enter_sys_##sname, \
+ .exit_event = &event_exit_sys_##sname, \
}; \
asmlinkage long sys_##sname(void)
#else
#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)
#endif
-#define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
-#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
-#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
-#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
-#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
-#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
+#define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, sys_##name, __VA_ARGS__)
+#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, sys_##name, __VA_ARGS__)
+#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, sys_##name, __VA_ARGS__)
+#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, sys_##name, __VA_ARGS__)
+#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, sys_##name, __VA_ARGS__)
+#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, sys_##name, __VA_ARGS__)
+
+#define ARCH_COMPAT_SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, arch_compat_sys_##name, __VA_ARGS__)
+#define ARCH_COMPAT_SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, arch_compat_sys_##name, __VA_ARGS__)
+#define ARCH_COMPAT_SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, arch_compat_sys_##name, __VA_ARGS__)
+#define ARCH_COMPAT_SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, arch_compat_sys_##name, __VA_ARGS__)
+#define ARCH_COMPAT_SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, arch_compat_sys_##name, __VA_ARGS__)
+#define ARCH_COMPAT_SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, arch_compat_sys_##name, __VA_ARGS__)
#ifdef CONFIG_PPC64
#define SYSCALL_ALIAS(alias, name) \
@@ -255,21 +262,21 @@ struct perf_event_attr;
#define SYSCALL_DEFINE(name) static inline long SYSC_##name
#define __SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \
+ asmlinkage long name(__SC_DECL##x(__VA_ARGS__)); \
static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \
asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \
{ \
__SC_TEST##x(__VA_ARGS__); \
return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \
} \
- SYSCALL_ALIAS(sys##name, SyS##name); \
+ SYSCALL_ALIAS(name, SyS##name); \
static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))
#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
#define __SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
+ asmlinkage long name(__SC_DECL##x(__VA_ARGS__))
#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
--
1.6.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists