Prev: [PATCH 19/40] trace syscalls: Remove redundant syscall_nr checks
Next: [PATCH 13/40] syscalls: add new COMPAT_SYSCALL_DEFINE#N() macro
From: Ian Munsie on 23 Jun 2010 06:20 From: Ian Munsie <imunsie(a)au1.ibm.com> This patch adds the necessary infrastructure to trace 32bit compat syscalls on PowerPC64. Signed-off-by: Ian Munsie <imunsie(a)au1.ibm.com> --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/unistd.h | 4 ++++ arch/powerpc/kernel/ftrace.c | 7 +++++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 0d5c28d..a724c93 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -142,6 +142,7 @@ config PPC select HAVE_PERF_EVENTS select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS + select HAVE_COMPAT_FTRACE_SYSCALLS if PPC64 config EARLY_PRINTK bool diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index f0a1026..f584b71 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -353,6 +353,10 @@ #define __NR__exit __NR_exit #define NR_syscalls __NR_syscalls +#ifdef CONFIG_PPC64 +#define NR_syscalls_compat NR_syscalls +#endif + #ifndef __ASSEMBLY__ #include <linux/types.h> diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index f5fadbb..dddbc33 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c @@ -619,3 +619,10 @@ inline bool arch_syscall_match_sym_name(const char *sym, const char *name) return (!strcmp(sym + 4, name + 3)); } #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 */ + +#ifdef CONFIG_COMPAT_FTRACE_SYSCALLS +unsigned long __init arch_compat_syscall_addr(int nr) +{ + return sys_call_table[nr*2+1]; +} +#endif -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |