[PATCH 2/6] x86: add arch_compat_syscall_addr()

Jason Baron
2010-02-02T21:21:58Z

Add arch_compat_syscall_addr(int nr) for x86. This is in preparation for adding
compat syscall support to the event tracer.

Signed-off-by: Jason Baron <jbaron@redhat.com>
---
arch/x86/kernel/ftrace.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 3096892..da2568c 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -488,9 +488,18 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
#ifdef CONFIG_FTRACE_SYSCALLS

extern unsigned long *sys_call_table;
+extern unsigned long *ia32_sys_call_table;

unsigned long __init arch_syscall_addr(int nr)
{
return (unsigned long)(&sys_call_table)[nr];
}
+
+#ifdef CONFIG_COMPAT
+unsigned long __init arch_compat_syscall_addr(int nr)
+{
+ return (unsigned long)(&ia32_sys_call_table)[nr];
+}
+#endif
+
#endif
--
1.6.5.1