aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorWade Farnsworth <wade_farnsworth@mentor.com>2012-09-07 13:18:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-09-19 16:50:48 -0400
commit1f66e06fb6414732bef7bf4a071ef76a837badec (patch)
tree329bd62fd3ce0c1f55242549f8486f5b168f4bce /arch/arm/include
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
ARM: 7524/1: support syscall tracing
As specified by ftrace-design.txt, TIF_SYSCALL_TRACEPOINT was added, as well as NR_syscalls in asm/unistd.h. Additionally, __sys_trace was modified to call trace_sys_enter and trace_sys_exit when appropriate. Tests #2 - #4 of "perf test" now complete successfully. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/syscall.h4
-rw-r--r--arch/arm/include/asm/thread_info.h4
-rw-r--r--arch/arm/include/asm/unistd.h8
3 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h
index c334a23ddf75..47486a41c56e 100644
--- a/arch/arm/include/asm/syscall.h
+++ b/arch/arm/include/asm/syscall.h
@@ -9,6 +9,10 @@
9 9
10#include <linux/err.h> 10#include <linux/err.h>
11 11
12#include <asm/unistd.h>
13
14#define NR_syscalls (__NR_syscalls)
15
12extern const unsigned long sys_call_table[]; 16extern const unsigned long sys_call_table[];
13 17
14static inline int syscall_get_nr(struct task_struct *task, 18static inline int syscall_get_nr(struct task_struct *task,
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index af7b0bda3355..5ded667e330f 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -148,6 +148,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
148#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ 148#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */
149#define TIF_SYSCALL_TRACE 8 149#define TIF_SYSCALL_TRACE 8
150#define TIF_SYSCALL_AUDIT 9 150#define TIF_SYSCALL_AUDIT 9
151#define TIF_SYSCALL_TRACEPOINT 10
151#define TIF_POLLING_NRFLAG 16 152#define TIF_POLLING_NRFLAG 16
152#define TIF_USING_IWMMXT 17 153#define TIF_USING_IWMMXT 17
153#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ 154#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
@@ -160,12 +161,13 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
160#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 161#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
161#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 162#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
162#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 163#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
164#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
163#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 165#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
164#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) 166#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
165#define _TIF_SECCOMP (1 << TIF_SECCOMP) 167#define _TIF_SECCOMP (1 << TIF_SECCOMP)
166 168
167/* Checks for any syscall work in entry-common.S */ 169/* Checks for any syscall work in entry-common.S */
168#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT) 170#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT)
169 171
170/* 172/*
171 * Change these and you break ASM code in entry-common.S 173 * Change these and you break ASM code in entry-common.S
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 0cab47d4a83f..a566ec20d486 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -406,6 +406,14 @@
406#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) 406#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377)
407 407
408/* 408/*
409 * This may need to be greater than __NR_last_syscall+1 in order to
410 * account for the padding in the syscall table
411 */
412#ifdef __KERNEL__
413#define __NR_syscalls (380)
414#endif /* __KERNEL__ */
415
416/*
409 * The following SWIs are ARM private. 417 * The following SWIs are ARM private.
410 */ 418 */
411#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) 419#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)