]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/entry-common.S
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / entry-common.S
index b46728027195b15747b7b43f18a7e35e0a687623..718bd2356b34bf109a9608d0b6b7d20549dc310a 100644 (file)
@@ -1,9 +1,6 @@
-/* $Id: entry.S,v 1.37 2004/06/11 13:02:46 doyu Exp $
- *
- *  linux/arch/sh/entry.S
- *
+/* 
  *  Copyright (C) 1999, 2000, 2002  Niibe Yutaka
- *  Copyright (C) 2003  Paul Mundt
+ *  Copyright (C) 2003 - 2008  Paul Mundt
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -176,25 +173,6 @@ work_notifysig:
        jmp     @r1
         lds    r0, pr
 work_resched:
-#ifndef CONFIG_PREEMPT
-       ! gUSA handling
-       mov.l   @(OFF_SP,r15), r0       ! get user space stack pointer
-       mov     r0, r1
-       shll    r0
-       bf/s    1f
-        shll   r0
-       bf/s    1f
-        mov    #OFF_PC, r0
-       !                                 SP >= 0xc0000000 : gUSA mark
-       mov.l   @(r0,r15), r2           ! get user space PC (program counter)
-       mov.l   @(OFF_R0,r15), r3       ! end point
-       cmp/hs  r3, r2                  ! r2 >= r3? 
-       bt      1f
-       add     r3, r1                  ! rewind point #2
-       mov.l   r1, @(r0,r15)           ! reset PC to rewind point #2
-       !
-1:
-#endif
        mov.l   1f, r1
        jsr     @r1                             ! schedule
         nop
@@ -224,7 +202,7 @@ work_resched:
 syscall_exit_work:
        ! r0: current_thread_info->flags
        ! r8: current_thread_info
-       tst     #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP, r0
+       tst     #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | _TIF_SYSCALL_AUDIT, r0
        bt/s    work_pending
         tst    #_TIF_NEED_RESCHED, r0
 #ifdef CONFIG_TRACE_IRQFLAGS
@@ -234,6 +212,8 @@ syscall_exit_work:
 #endif
        sti
        ! XXX setup arguments...
+       mov     r15, r4
+       mov     #1, r5
        mov.l   4f, r0                  ! do_syscall_trace
        jsr     @r0
         nop
@@ -244,6 +224,8 @@ syscall_exit_work:
 syscall_trace_entry:
        !                       Yes it is traced.
        ! XXX setup arguments...
+       mov     r15, r4
+       mov     #0, r5
        mov.l   4f, r11         ! Call do_syscall_trace which notifies
        jsr     @r11            ! superior (will chomp R[0-7])
         nop
@@ -277,6 +259,7 @@ __restore_all:
 
        .align  2
 syscall_badsys:                        ! Bad syscall number
+       get_current_thread_info r8, r0
        mov     #-ENOSYS, r0
        bra     resume_userspace
         mov.l  r0, @(OFF_R0,r15)       ! Return value
@@ -296,7 +279,9 @@ debug_trap:
        mov.l   1f, r8
        add     r0, r8
        mov.l   @r8, r8
-       jmp     @r8
+       jsr     @r8
+        nop
+       bra     __restore_all
         nop
 
        .align  2
@@ -366,7 +351,7 @@ ENTRY(system_call)
        !
        get_current_thread_info r8, r10
        mov.l   @(TI_FLAGS,r8), r8
-       mov     #_TIF_SYSCALL_TRACE, r10
+       mov     #(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT), r10
        tst     r10, r8
        bf      syscall_trace_entry
        !