diff options
author | Matt Waddel <Matt.Waddel@freescale.com> | 2007-10-23 00:37:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 11:32:07 -0400 |
commit | 151941a800fd9598d38f8b5a73de0471afe66507 (patch) | |
tree | d9b7a1ace0545cca9e5514532acfaa26198cf3ea | |
parent | f909b1ef8ce3e93d1cf66f33313d8ed11102e87f (diff) |
m68knommu: fix syscall tracing
Fix the system call code for handling syscall tracing, so strace
and gdbserver work properly.
This fix originally developed by Philippe De Muyter and Stuart Hughes.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/m68knommu/platform/5307/entry.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S index a8cd867805c..b333731b875 100644 --- a/arch/m68knommu/platform/5307/entry.S +++ b/arch/m68knommu/platform/5307/entry.S | |||
@@ -74,7 +74,8 @@ ENTRY(system_call) | |||
74 | movel %sp,%d2 /* get thread_info pointer */ | 74 | movel %sp,%d2 /* get thread_info pointer */ |
75 | andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ | 75 | andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ |
76 | movel %d2,%a0 | 76 | movel %d2,%a0 |
77 | movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ | 77 | movel %a0@,%a1 /* save top of frame */ |
78 | movel %sp,%a1@(TASK_THREAD+THREAD_ESP0) | ||
78 | btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) | 79 | btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) |
79 | bnes 1f | 80 | bnes 1f |
80 | 81 | ||
@@ -83,6 +84,8 @@ ENTRY(system_call) | |||
83 | movel %d0,%sp@(PT_D0) /* save the return value */ | 84 | movel %d0,%sp@(PT_D0) /* save the return value */ |
84 | jra ret_from_exception | 85 | jra ret_from_exception |
85 | 1: | 86 | 1: |
87 | movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */ | ||
88 | movel %d2,PT_D0(%sp) /* on syscall entry */ | ||
86 | subql #4,%sp | 89 | subql #4,%sp |
87 | SAVE_SWITCH_STACK | 90 | SAVE_SWITCH_STACK |
88 | jbsr syscall_trace | 91 | jbsr syscall_trace |