diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-07-06 07:16:33 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-06 07:16:33 -0400 |
commit | c652d780c9cf7f860141de232b37160fe013feca (patch) | |
tree | 110c95ee2b66a7c9b032be8edad36f9b53f82af0 /arch/sh/include/asm/thread_info.h | |
parent | c1340c053be7a43d837a3acb352d5008be865a55 (diff) |
sh: Add ftrace syscall tracing support
Now that I've added TIF_SYSCALL_FTRACE the thread flags do not fit into
a single byte any more. Code testing them now needs to be aware of the
upper and lower bytes.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/thread_info.h')
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index f09ac4806294..499e315f4be2 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -97,7 +97,7 @@ static inline struct thread_info *current_thread_info(void) | |||
97 | 97 | ||
98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); | 98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); |
99 | extern void free_thread_info(struct thread_info *ti); | 99 | extern void free_thread_info(struct thread_info *ti); |
100 | 100 | ||
101 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ | 101 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ |
102 | 102 | ||
103 | #endif /* __ASSEMBLY__ */ | 103 | #endif /* __ASSEMBLY__ */ |
@@ -116,6 +116,7 @@ extern void free_thread_info(struct thread_info *ti); | |||
116 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ | 116 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ |
117 | #define TIF_SECCOMP 6 /* secure computing */ | 117 | #define TIF_SECCOMP 6 /* secure computing */ |
118 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ | 118 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ |
119 | #define TIF_SYSCALL_FTRACE 8 /* for ftrace syscall instrumentation */ | ||
119 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 120 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
120 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 121 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
121 | #define TIF_MEMDIE 18 | 122 | #define TIF_MEMDIE 18 |
@@ -129,25 +130,27 @@ extern void free_thread_info(struct thread_info *ti); | |||
129 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 130 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
130 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 131 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
131 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 132 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
133 | #define _TIF_SYSCALL_FTRACE (1 << TIF_SYSCALL_FTRACE) | ||
132 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) | 134 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) |
133 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 135 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
134 | #define _TIF_FREEZE (1 << TIF_FREEZE) | 136 | #define _TIF_FREEZE (1 << TIF_FREEZE) |
135 | 137 | ||
136 | /* | 138 | /* |
137 | * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within a byte, or we | 139 | * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within 2 bytes, or we |
138 | * blow the tst immediate size constraints and need to fix up | 140 | * blow the tst immediate size constraints and need to fix up |
139 | * arch/sh/kernel/entry-common.S. | 141 | * arch/sh/kernel/entry-common.S. |
140 | */ | 142 | */ |
141 | 143 | ||
142 | /* work to do in syscall trace */ | 144 | /* work to do in syscall trace */ |
143 | #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ | 145 | #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ |
144 | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP) | 146 | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ |
147 | _TIF_SYSCALL_FTRACE) | ||
145 | 148 | ||
146 | /* work to do on any return to u-space */ | 149 | /* work to do on any return to u-space */ |
147 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ | 150 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ |
148 | _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ | 151 | _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ |
149 | _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ | 152 | _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ |
150 | _TIF_NOTIFY_RESUME) | 153 | _TIF_NOTIFY_RESUME | _TIF_SYSCALL_FTRACE) |
151 | 154 | ||
152 | /* work to do on interrupt/exception return */ | 155 | /* work to do on interrupt/exception return */ |
153 | #define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ | 156 | #define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ |