Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / m68k / kernel / entry_no.S
blobd80cba45589f4b7c337f5c9a2cdff9b430bcd514
1 /*
2  *  linux/arch/m68knommu/kernel/entry.S
3  *
4  *  Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com)
5  *  Copyright (C) 1998  D. Jeff Dionne <jeff@lineo.ca>,
6  *                      Kenneth Albanowski <kjahds@kjahds.com>,
7  *  Copyright (C) 2000  Lineo Inc. (www.lineo.com) 
8  *
9  * Based on:
10  *
11  *  linux/arch/m68k/kernel/entry.S
12  *
13  *  Copyright (C) 1991, 1992  Linus Torvalds
14  *
15  * This file is subject to the terms and conditions of the GNU General Public
16  * License.  See the file README.legal in the main directory of this archive
17  * for more details.
18  *
19  * Linux/m68k support by Hamish Macdonald
20  *
21  * 68060 fixes by Jesper Skov
22  * ColdFire support by Greg Ungerer (gerg@snapgear.com)
23  * 5307 fixes by David W. Miller
24  * linux 2.4 support David McCullough <davidm@snapgear.com>
25  */
27 #include <linux/linkage.h>
28 #include <asm/errno.h>
29 #include <asm/setup.h>
30 #include <asm/segment.h>
31 #include <asm/asm-offsets.h>
32 #include <asm/entry.h>
33 #include <asm/unistd.h>
35 .text
37 .globl buserr
38 .globl trap
39 .globl ret_from_exception
40 .globl ret_from_signal
41 .globl sys_fork
42 .globl sys_clone
43 .globl sys_vfork
45 ENTRY(buserr)
46         SAVE_ALL_INT
47         GET_CURRENT(%d0)
48         movel   %sp,%sp@-               /* stack frame pointer argument */
49         jsr     buserr_c
50         addql   #4,%sp
51         jra     ret_from_exception
53 ENTRY(trap)
54         SAVE_ALL_INT
55         GET_CURRENT(%d0)
56         movel   %sp,%sp@-               /* stack frame pointer argument */
57         jsr     trap_c
58         addql   #4,%sp
59         jra     ret_from_exception
61 #ifdef TRAP_DBG_INTERRUPT
63 .globl dbginterrupt
64 ENTRY(dbginterrupt)
65         SAVE_ALL_INT
66         GET_CURRENT(%d0)
67         movel   %sp,%sp@-               /* stack frame pointer argument */
68         jsr     dbginterrupt_c
69         addql   #4,%sp
70         jra     ret_from_exception
71 #endif
73 ENTRY(reschedule)
74         /* save top of frame */
75         pea     %sp@
76         jbsr    set_esp0
77         addql   #4,%sp
78         pea     ret_from_exception
79         jmp     schedule
81 ENTRY(ret_from_fork)
82         movel   %d1,%sp@-
83         jsr     schedule_tail
84         addql   #4,%sp
85         jra     ret_from_exception
87 ENTRY(sys_fork)
88         SAVE_SWITCH_STACK
89         pea     %sp@(SWITCH_STACK_SIZE)
90         jbsr    m68k_fork
91         addql   #4,%sp
92         RESTORE_SWITCH_STACK
93         rts
95 ENTRY(sys_vfork)
96         SAVE_SWITCH_STACK
97         pea     %sp@(SWITCH_STACK_SIZE)
98         jbsr    m68k_vfork
99         addql   #4,%sp
100         RESTORE_SWITCH_STACK
101         rts
103 ENTRY(sys_clone)
104         SAVE_SWITCH_STACK
105         pea     %sp@(SWITCH_STACK_SIZE)
106         jbsr    m68k_clone
107         addql   #4,%sp
108         RESTORE_SWITCH_STACK
109         rts
111 ENTRY(sys_sigreturn)
112         SAVE_SWITCH_STACK
113         jbsr    do_sigreturn
114         RESTORE_SWITCH_STACK
115         rts
117 ENTRY(sys_rt_sigreturn)
118         SAVE_SWITCH_STACK
119         jbsr    do_rt_sigreturn
120         RESTORE_SWITCH_STACK
121         rts
123 ENTRY(ret_from_user_signal)
124         moveq #__NR_sigreturn,%d0
125         trap #0
127 ENTRY(ret_from_user_rt_signal)
128         movel #__NR_rt_sigreturn,%d0
129         trap #0