sh: Add ARCH_DEFCONFIG entries for sh and sh64.
[linux-2.6] / arch / m68knommu / kernel / entry.S
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  */
26
27 #include <linux/sys.h>
28 #include <linux/linkage.h>
29 #include <asm/thread_info.h>
30 #include <asm/errno.h>
31 #include <asm/setup.h>
32 #include <asm/segment.h>
33 #include <asm/asm-offsets.h>
34 #include <asm/entry.h>
35 #include <asm/unistd.h>
36
37 .text
38
39 .globl buserr
40 .globl trap
41 .globl ret_from_exception
42 .globl ret_from_signal
43 .globl sys_fork
44 .globl sys_clone
45 .globl sys_vfork
46
47 ENTRY(buserr)
48         SAVE_ALL
49         moveq   #-1,%d0
50         movel   %d0,%sp@(PT_ORIG_D0)
51         movel   %sp,%sp@-               /* stack frame pointer argument */
52         jsr     buserr_c
53         addql   #4,%sp
54         jra     ret_from_exception
55
56 ENTRY(trap)
57         SAVE_ALL
58         moveq   #-1,%d0
59         movel   %d0,%sp@(PT_ORIG_D0)
60         movel   %sp,%sp@-               /* stack frame pointer argument */
61         jsr     trap_c
62         addql   #4,%sp
63         jra     ret_from_exception
64
65 #ifdef TRAP_DBG_INTERRUPT
66
67 .globl dbginterrupt
68 ENTRY(dbginterrupt)
69         SAVE_ALL
70         moveq   #-1,%d0
71         movel   %d0,%sp@(PT_ORIG_D0)
72         movel   %sp,%sp@-               /* stack frame pointer argument */
73         jsr     dbginterrupt_c
74         addql   #4,%sp
75         jra     ret_from_exception
76 #endif
77
78 ENTRY(reschedule)
79         /* save top of frame */
80         pea     %sp@
81         jbsr    set_esp0
82         addql   #4,%sp
83         pea     ret_from_exception
84         jmp     schedule
85
86 ENTRY(ret_from_fork)
87         movel   %d1,%sp@-
88         jsr     schedule_tail
89         addql   #4,%sp
90         jra     ret_from_exception
91
92 ENTRY(sys_fork)
93         SAVE_SWITCH_STACK
94         pea     %sp@(SWITCH_STACK_SIZE)
95         jbsr    m68k_fork
96         addql   #4,%sp
97         RESTORE_SWITCH_STACK
98         rts
99
100 ENTRY(sys_vfork)
101         SAVE_SWITCH_STACK
102         pea     %sp@(SWITCH_STACK_SIZE)
103         jbsr    m68k_vfork
104         addql   #4,%sp
105         RESTORE_SWITCH_STACK
106         rts
107
108 ENTRY(sys_clone)
109         SAVE_SWITCH_STACK
110         pea     %sp@(SWITCH_STACK_SIZE)
111         jbsr    m68k_clone
112         addql   #4,%sp
113         RESTORE_SWITCH_STACK
114         rts
115
116 ENTRY(sys_sigsuspend)
117         SAVE_SWITCH_STACK
118         pea     %sp@(SWITCH_STACK_SIZE)
119         jbsr    do_sigsuspend
120         addql   #4,%sp
121         RESTORE_SWITCH_STACK
122         rts
123
124 ENTRY(sys_rt_sigsuspend)
125         SAVE_SWITCH_STACK
126         pea     %sp@(SWITCH_STACK_SIZE)
127         jbsr    do_rt_sigsuspend
128         addql   #4,%sp
129         RESTORE_SWITCH_STACK
130         rts
131
132 ENTRY(sys_sigreturn)
133         SAVE_SWITCH_STACK
134         jbsr    do_sigreturn
135         RESTORE_SWITCH_STACK
136         rts
137
138 ENTRY(sys_rt_sigreturn)
139         SAVE_SWITCH_STACK
140         jbsr    do_rt_sigreturn
141         RESTORE_SWITCH_STACK
142         rts
143
144 ENTRY(ret_from_user_signal)
145         moveq #__NR_sigreturn,%d0
146         trap #0
147
148 ENTRY(ret_from_user_rt_signal)
149         move #__NR_rt_sigreturn,%d0
150         trap #0
151