aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/entry-common.S
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-07-06 07:16:33 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-06 07:16:33 -0400
commitc652d780c9cf7f860141de232b37160fe013feca (patch)
tree110c95ee2b66a7c9b032be8edad36f9b53f82af0 /arch/sh/kernel/entry-common.S
parentc1340c053be7a43d837a3acb352d5008be865a55 (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/kernel/entry-common.S')
-rw-r--r--arch/sh/kernel/entry-common.S18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index d62359cfbbe2..d62175650c54 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -131,7 +131,7 @@ ENTRY(resume_userspace)
131 nop 131 nop
132#endif 132#endif
133 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 133 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
134 tst #_TIF_WORK_MASK, r0 134 tst #(_TIF_WORK_MASK & 0xff), r0
135 bt/s __restore_all 135 bt/s __restore_all
136 tst #_TIF_NEED_RESCHED, r0 136 tst #_TIF_NEED_RESCHED, r0
137 137
@@ -163,7 +163,7 @@ work_resched:
163#endif 163#endif
164 ! 164 !
165 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 165 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
166 tst #_TIF_WORK_MASK, r0 166 tst #(_TIF_WORK_MASK & 0xff), r0
167 bt __restore_all 167 bt __restore_all
168 bra work_pending 168 bra work_pending
169 tst #_TIF_NEED_RESCHED, r0 169 tst #_TIF_NEED_RESCHED, r0
@@ -181,7 +181,7 @@ work_resched:
181syscall_exit_work: 181syscall_exit_work:
182 ! r0: current_thread_info->flags 182 ! r0: current_thread_info->flags
183 ! r8: current_thread_info 183 ! r8: current_thread_info
184 tst #_TIF_WORK_SYSCALL_MASK, r0 184 tst #(_TIF_WORK_SYSCALL_MASK & 0xff), r0
185 bt/s work_pending 185 bt/s work_pending
186 tst #_TIF_NEED_RESCHED, r0 186 tst #_TIF_NEED_RESCHED, r0
187#ifdef CONFIG_TRACE_IRQFLAGS 187#ifdef CONFIG_TRACE_IRQFLAGS
@@ -331,8 +331,12 @@ ENTRY(system_call)
331 ! 331 !
332 get_current_thread_info r8, r10 332 get_current_thread_info r8, r10
333 mov.l @(TI_FLAGS,r8), r8 333 mov.l @(TI_FLAGS,r8), r8
334 mov #_TIF_WORK_SYSCALL_MASK, r10 334 mov #(_TIF_WORK_SYSCALL_MASK & 0xff), r10
335 mov #(_TIF_WORK_SYSCALL_MASK >> 8), r9
335 tst r10, r8 336 tst r10, r8
337 shll8 r9
338 bf syscall_trace_entry
339 tst r9, r8
336 bf syscall_trace_entry 340 bf syscall_trace_entry
337 ! 341 !
338 mov.l 2f, r8 ! Number of syscalls 342 mov.l 2f, r8 ! Number of syscalls
@@ -359,7 +363,11 @@ syscall_exit:
359 ! 363 !
360 get_current_thread_info r8, r0 364 get_current_thread_info r8, r0
361 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags 365 mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags
362 tst #_TIF_ALLWORK_MASK, r0 366 tst #(_TIF_ALLWORK_MASK & 0xff), r0
367 mov #(_TIF_ALLWORK_MASK >> 8), r1
368 bf syscall_exit_work
369 shlr8 r0
370 tst r0, r1
363 bf syscall_exit_work 371 bf syscall_exit_work
364 bra __restore_all 372 bra __restore_all
365 nop 373 nop