summaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/5307
diff options
context:
space:
mode:
authorMatt Waddel <Matt.Waddel@freescale.com>2007-10-23 14:37:54 +1000
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-23 08:32:07 -0700
commit151941a800fd9598d38f8b5a73de0471afe66507 (patch)
treed9b7a1ace0545cca9e5514532acfaa26198cf3ea /arch/m68knommu/platform/5307
parentf909b1ef8ce3e93d1cf66f33313d8ed11102e87f (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>
Diffstat (limited to 'arch/m68knommu/platform/5307')
-rw-r--r--arch/m68knommu/platform/5307/entry.S5
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)
movel %sp,%d2 /* get thread_info pointer */
andl #-THREAD_SIZE,%d2 /* at start of kernel stack */
movel %d2,%a0
- movel %sp,%a0@(THREAD_ESP0) /* save top of frame */
+ movel %a0@,%a1 /* save top of frame */
+ movel %sp,%a1@(TASK_THREAD+THREAD_ESP0)
btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
bnes 1f
@@ -83,6 +84,8 @@ ENTRY(system_call)
movel %d0,%sp@(PT_D0) /* save the return value */
jra ret_from_exception
1:
+ movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */
+ movel %d2,PT_D0(%sp) /* on syscall entry */
subql #4,%sp
SAVE_SWITCH_STACK
jbsr syscall_trace