aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu/kernel/entry.S')
-rw-r--r--arch/m68knommu/kernel/entry.S143
1 files changed, 143 insertions, 0 deletions
diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S
new file mode 100644
index 000000000000..8b1f47239b9a
--- /dev/null
+++ b/arch/m68knommu/kernel/entry.S
@@ -0,0 +1,143 @@
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/config.h>
28#include <linux/sys.h>
29#include <linux/linkage.h>
30#include <asm/thread_info.h>
31#include <asm/errno.h>
32#include <asm/setup.h>
33#include <asm/segment.h>
34#include <asm/asm-offsets.h>
35#include <asm/entry.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
47ENTRY(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
56ENTRY(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
68ENTRY(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
78ENTRY(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
86ENTRY(ret_from_fork)
87 movel %d1,%sp@-
88 jsr schedule_tail
89 addql #4,%sp
90 jra ret_from_exception
91
92ENTRY(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
100ENTRY(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
108ENTRY(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
116ENTRY(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
124ENTRY(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
132ENTRY(sys_sigreturn)
133 SAVE_SWITCH_STACK
134 jbsr do_sigreturn
135 RESTORE_SWITCH_STACK
136 rts
137
138ENTRY(sys_rt_sigreturn)
139 SAVE_SWITCH_STACK
140 jbsr do_rt_sigreturn
141 RESTORE_SWITCH_STACK
142 rts
143