]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
m68knommu: fix strace support for 68328/68360
authorPhilippe De Muyter <phdm@macqel.be>
Tue, 17 Aug 2010 16:58:29 +0000 (18:58 +0200)
committerGreg Ungerer <gerg@uclinux.org>
Thu, 21 Oct 2010 00:17:29 +0000 (10:17 +1000)
strace enabled is marked using the `flags' field of the `thread_info' struct.
68360 version of entry.S did test a wrong bit in a wrong structure
(task_struct).

68328 version of entry.S did test the right bit in the right structure,
but wrongly, because the `flags' field is 32 bit wide, while the used
assembler insn (btst) only accesses a 8 bit byte in memory.

Fix both using code already used in the coldfire version of entry.S

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68knommu/platform/68328/entry.S
arch/m68knommu/platform/68360/entry.S

index 9d80d2c4286668f2715d64a5026026e5f98cfae7..31a091708317707f758b23ee86670347e4243ee5 100644 (file)
@@ -80,7 +80,7 @@ ENTRY(system_call)
        movel   %sp,%d1                 /* get thread_info pointer */
        andl    #-THREAD_SIZE,%d1
        movel   %d1,%a2
-       btst    #TIF_SYSCALL_TRACE,%a2@(TI_FLAGS)
+       btst    #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
        jne     do_trace
        cmpl    #NR_syscalls,%d0
        jcc     badsys
index 6d3460a39cacf1383a16f2e66146c60aeecf6509..d5ad4080f5537653f1693d815bd16cede322ae46 100644 (file)
@@ -71,7 +71,12 @@ ENTRY(system_call)
        jbsr    set_esp0
        addql   #4,%sp
 
-       btst    #PF_TRACESYS_BIT,%a2@(TASK_FLAGS+PF_TRACESYS_OFF)
+       movel   %sp@(PT_OFF_ORIG_D0),%d0
+
+       movel   %sp,%d1                 /* get thread_info pointer */
+       andl    #-THREAD_SIZE,%d1
+       movel   %d1,%a2
+       btst    #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
        jne     do_trace
        cmpl    #NR_syscalls,%d0
        jcc     badsys