aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/entry.h255
-rw-r--r--arch/m68k/include/asm/entry_mm.h128
-rw-r--r--arch/m68k/include/asm/entry_no.h181
-rw-r--r--arch/m68k/kernel/entry_no.S6
-rw-r--r--arch/m68k/platform/68328/entry.S18
-rw-r--r--arch/m68k/platform/68360/entry.S4
-rw-r--r--arch/m68k/platform/coldfire/entry.S6
7 files changed, 268 insertions, 330 deletions
diff --git a/arch/m68k/include/asm/entry.h b/arch/m68k/include/asm/entry.h
index 876eec6f2b52..c3c5a8643e15 100644
--- a/arch/m68k/include/asm/entry.h
+++ b/arch/m68k/include/asm/entry.h
@@ -1,5 +1,254 @@
1#ifdef __uClinux__ 1#ifndef __M68K_ENTRY_H
2#include "entry_no.h" 2#define __M68K_ENTRY_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6#ifdef __ASSEMBLY__
7#include <asm/thread_info.h>
8#endif
9
10/*
11 * Stack layout in 'ret_from_exception':
12 *
13 * This allows access to the syscall arguments in registers d1-d5
14 *
15 * 0(sp) - d1
16 * 4(sp) - d2
17 * 8(sp) - d3
18 * C(sp) - d4
19 * 10(sp) - d5
20 * 14(sp) - a0
21 * 18(sp) - a1
22 * 1C(sp) - a2
23 * 20(sp) - d0
24 * 24(sp) - orig_d0
25 * 28(sp) - stack adjustment
26 * 2C(sp) - [ sr ] [ format & vector ]
27 * 2E(sp) - [ pc-hiword ] [ sr ]
28 * 30(sp) - [ pc-loword ] [ pc-hiword ]
29 * 32(sp) - [ format & vector ] [ pc-loword ]
30 * ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
31 * M68K COLDFIRE
32 */
33
34/* the following macro is used when enabling interrupts */
35#if defined(MACH_ATARI_ONLY)
36 /* block out HSYNC on the atari */
37#define ALLOWINT (~0x400)
38#define MAX_NOINT_IPL 3
3#else 39#else
4#include "entry_mm.h" 40 /* portable version */
41#define ALLOWINT (~0x700)
42#define MAX_NOINT_IPL 0
43#endif /* machine compilation types */
44
45#ifdef __ASSEMBLY__
46/*
47 * This defines the normal kernel pt-regs layout.
48 *
49 * regs a3-a6 and d6-d7 are preserved by C code
50 * the kernel doesn't mess with usp unless it needs to
51 */
52#define SWITCH_STACK_SIZE (6*4+4) /* includes return address */
53
54#ifdef CONFIG_COLDFIRE
55#ifdef CONFIG_COLDFIRE_SW_A7
56/*
57 * This is made a little more tricky on older ColdFires. There is no
58 * separate supervisor and user stack pointers. Need to artificially
59 * construct a usp in software... When doing this we need to disable
60 * interrupts, otherwise bad things will happen.
61 */
62.globl sw_usp
63.globl sw_ksp
64
65.macro SAVE_ALL_SYS
66 move #0x2700,%sr /* disable intrs */
67 btst #5,%sp@(2) /* from user? */
68 bnes 6f /* no, skip */
69 movel %sp,sw_usp /* save user sp */
70 addql #8,sw_usp /* remove exception */
71 movel sw_ksp,%sp /* kernel sp */
72 subql #8,%sp /* room for exception */
73 clrl %sp@- /* stkadj */
74 movel %d0,%sp@- /* orig d0 */
75 movel %d0,%sp@- /* d0 */
76 lea %sp@(-32),%sp /* space for 8 regs */
77 moveml %d1-%d5/%a0-%a2,%sp@
78 movel sw_usp,%a0 /* get usp */
79 movel %a0@-,%sp@(PT_OFF_PC) /* copy exception program counter */
80 movel %a0@-,%sp@(PT_OFF_FORMATVEC)/*copy exception format/vector/sr */
81 bra 7f
82 6:
83 clrl %sp@- /* stkadj */
84 movel %d0,%sp@- /* orig d0 */
85 movel %d0,%sp@- /* d0 */
86 lea %sp@(-32),%sp /* space for 8 regs */
87 moveml %d1-%d5/%a0-%a2,%sp@
88 7:
89.endm
90
91.macro SAVE_ALL_INT
92 SAVE_ALL_SYS
93 moveq #-1,%d0 /* not system call entry */
94 movel %d0,%sp@(PT_OFF_ORIG_D0)
95.endm
96
97.macro RESTORE_USER
98 move #0x2700,%sr /* disable intrs */
99 movel sw_usp,%a0 /* get usp */
100 movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */
101 movel %sp@(PT_OFF_FORMATVEC),%a0@-/*copy exception format/vector/sr */
102 moveml %sp@,%d1-%d5/%a0-%a2
103 lea %sp@(32),%sp /* space for 8 regs */
104 movel %sp@+,%d0
105 addql #4,%sp /* orig d0 */
106 addl %sp@+,%sp /* stkadj */
107 addql #8,%sp /* remove exception */
108 movel %sp,sw_ksp /* save ksp */
109 subql #8,sw_usp /* set exception */
110 movel sw_usp,%sp /* restore usp */
111 rte
112.endm
113
114.macro RDUSP
115 movel sw_usp,%a3
116.endm
117
118.macro WRUSP
119 movel %a3,sw_usp
120.endm
121
122#else /* !CONFIG_COLDFIRE_SW_A7 */
123/*
124 * Modern ColdFire parts have separate supervisor and user stack
125 * pointers. Simple load and restore macros for this case.
126 */
127.macro SAVE_ALL_SYS
128 move #0x2700,%sr /* disable intrs */
129 clrl %sp@- /* stkadj */
130 movel %d0,%sp@- /* orig d0 */
131 movel %d0,%sp@- /* d0 */
132 lea %sp@(-32),%sp /* space for 8 regs */
133 moveml %d1-%d5/%a0-%a2,%sp@
134.endm
135
136.macro SAVE_ALL_INT
137 move #0x2700,%sr /* disable intrs */
138 clrl %sp@- /* stkadj */
139 pea -1:w /* orig d0 */
140 movel %d0,%sp@- /* d0 */
141 lea %sp@(-32),%sp /* space for 8 regs */
142 moveml %d1-%d5/%a0-%a2,%sp@
143.endm
144
145.macro RESTORE_USER
146 moveml %sp@,%d1-%d5/%a0-%a2
147 lea %sp@(32),%sp /* space for 8 regs */
148 movel %sp@+,%d0
149 addql #4,%sp /* orig d0 */
150 addl %sp@+,%sp /* stkadj */
151 rte
152.endm
153
154.macro RDUSP
155 /*move %usp,%a3*/
156 .word 0x4e6b
157.endm
158
159.macro WRUSP
160 /*move %a3,%usp*/
161 .word 0x4e63
162.endm
163
164#endif /* !CONFIG_COLDFIRE_SW_A7 */
165
166.macro SAVE_SWITCH_STACK
167 lea %sp@(-24),%sp /* 6 regs */
168 moveml %a3-%a6/%d6-%d7,%sp@
169.endm
170
171.macro RESTORE_SWITCH_STACK
172 moveml %sp@,%a3-%a6/%d6-%d7
173 lea %sp@(24),%sp /* 6 regs */
174.endm
175
176#else /* !CONFIG_COLDFIRE */
177
178/*
179 * All other types of m68k parts (68000, 680x0, CPU32) have the same
180 * entry and exit code.
181 */
182
183/*
184 * a -1 in the orig_d0 field signifies
185 * that the stack frame is NOT for syscall
186 */
187.macro SAVE_ALL_INT
188 clrl %sp@- /* stk_adj */
189 pea -1:w /* orig d0 */
190 movel %d0,%sp@- /* d0 */
191 moveml %d1-%d5/%a0-%a2,%sp@-
192.endm
193
194.macro SAVE_ALL_SYS
195 clrl %sp@- /* stk_adj */
196 movel %d0,%sp@- /* orig d0 */
197 movel %d0,%sp@- /* d0 */
198 moveml %d1-%d5/%a0-%a2,%sp@-
199.endm
200
201.macro RESTORE_ALL
202 moveml %sp@+,%a0-%a2/%d1-%d5
203 movel %sp@+,%d0
204 addql #4,%sp /* orig d0 */
205 addl %sp@+,%sp /* stk adj */
206 rte
207.endm
208
209
210.macro SAVE_SWITCH_STACK
211 moveml %a3-%a6/%d6-%d7,%sp@-
212.endm
213
214.macro RESTORE_SWITCH_STACK
215 moveml %sp@+,%a3-%a6/%d6-%d7
216.endm
217
218#endif /* !CONFIG_COLDFIRE */
219
220/*
221 * Register %a2 is reserved and set to current task on MMU enabled systems.
222 * Non-MMU systems do not reserve %a2 in this way, and this definition is
223 * not used for them.
224 */
225#define curptr a2
226
227#define GET_CURRENT(tmp) get_current tmp
228.macro get_current reg=%d0
229 movel %sp,\reg
230 andw #-THREAD_SIZE,\reg
231 movel \reg,%curptr
232 movel %curptr@,%curptr
233.endm
234
235#else /* C source */
236
237#define STR(X) STR1(X)
238#define STR1(X) #X
239
240#define SAVE_ALL_INT \
241 "clrl %%sp@-;" /* stk_adj */ \
242 "pea -1:w;" /* orig d0 = -1 */ \
243 "movel %%d0,%%sp@-;" /* d0 */ \
244 "moveml %%d1-%%d5/%%a0-%%a2,%%sp@-"
245
246#define GET_CURRENT(tmp) \
247 "movel %%sp,"#tmp"\n\t" \
248 "andw #-"STR(THREAD_SIZE)","#tmp"\n\t" \
249 "movel "#tmp",%%a2\n\t" \
250 "movel %%a2@,%%a2"
251
5#endif 252#endif
253
254#endif /* __M68K_ENTRY_H */
diff --git a/arch/m68k/include/asm/entry_mm.h b/arch/m68k/include/asm/entry_mm.h
deleted file mode 100644
index 73b8c8fbed9c..000000000000
--- a/arch/m68k/include/asm/entry_mm.h
+++ /dev/null
@@ -1,128 +0,0 @@
1#ifndef __M68K_ENTRY_H
2#define __M68K_ENTRY_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6#ifdef __ASSEMBLY__
7#include <asm/thread_info.h>
8#endif
9
10/*
11 * Stack layout in 'ret_from_exception':
12 *
13 * This allows access to the syscall arguments in registers d1-d5
14 *
15 * 0(sp) - d1
16 * 4(sp) - d2
17 * 8(sp) - d3
18 * C(sp) - d4
19 * 10(sp) - d5
20 * 14(sp) - a0
21 * 18(sp) - a1
22 * 1C(sp) - a2
23 * 20(sp) - d0
24 * 24(sp) - orig_d0
25 * 28(sp) - stack adjustment
26 * 2C(sp) - sr
27 * 2E(sp) - pc
28 * 32(sp) - format & vector
29 */
30
31/*
32 * 97/05/14 Andreas: Register %a2 is now set to the current task throughout
33 * the whole kernel.
34 */
35
36/* the following macro is used when enabling interrupts */
37#if defined(MACH_ATARI_ONLY)
38 /* block out HSYNC on the atari */
39#define ALLOWINT (~0x400)
40#define MAX_NOINT_IPL 3
41#else
42 /* portable version */
43#define ALLOWINT (~0x700)
44#define MAX_NOINT_IPL 0
45#endif /* machine compilation types */
46
47#ifdef __ASSEMBLY__
48
49#define curptr a2
50
51LFLUSH_I_AND_D = 0x00000808
52
53#define SAVE_ALL_INT save_all_int
54#define SAVE_ALL_SYS save_all_sys
55#define RESTORE_ALL restore_all
56/*
57 * This defines the normal kernel pt-regs layout.
58 *
59 * regs a3-a6 and d6-d7 are preserved by C code
60 * the kernel doesn't mess with usp unless it needs to
61 */
62
63/*
64 * a -1 in the orig_d0 field signifies
65 * that the stack frame is NOT for syscall
66 */
67.macro save_all_int
68 clrl %sp@- | stk_adj
69 pea -1:w | orig d0
70 movel %d0,%sp@- | d0
71 moveml %d1-%d5/%a0-%a1/%curptr,%sp@-
72.endm
73
74.macro save_all_sys
75 clrl %sp@- | stk_adj
76 movel %d0,%sp@- | orig d0
77 movel %d0,%sp@- | d0
78 moveml %d1-%d5/%a0-%a1/%curptr,%sp@-
79.endm
80
81.macro restore_all
82 moveml %sp@+,%a0-%a1/%curptr/%d1-%d5
83 movel %sp@+,%d0
84 addql #4,%sp | orig d0
85 addl %sp@+,%sp | stk adj
86 rte
87.endm
88
89#define SWITCH_STACK_SIZE (6*4+4) /* includes return address */
90
91#define SAVE_SWITCH_STACK save_switch_stack
92#define RESTORE_SWITCH_STACK restore_switch_stack
93#define GET_CURRENT(tmp) get_current tmp
94
95.macro save_switch_stack
96 moveml %a3-%a6/%d6-%d7,%sp@-
97.endm
98
99.macro restore_switch_stack
100 moveml %sp@+,%a3-%a6/%d6-%d7
101.endm
102
103.macro get_current reg=%d0
104 movel %sp,\reg
105 andw #-THREAD_SIZE,\reg
106 movel \reg,%curptr
107 movel %curptr@,%curptr
108.endm
109
110#else /* C source */
111
112#define STR(X) STR1(X)
113#define STR1(X) #X
114
115#define SAVE_ALL_INT \
116 "clrl %%sp@-;" /* stk_adj */ \
117 "pea -1:w;" /* orig d0 = -1 */ \
118 "movel %%d0,%%sp@-;" /* d0 */ \
119 "moveml %%d1-%%d5/%%a0-%%a2,%%sp@-"
120#define GET_CURRENT(tmp) \
121 "movel %%sp,"#tmp"\n\t" \
122 "andw #-"STR(THREAD_SIZE)","#tmp"\n\t" \
123 "movel "#tmp",%%a2\n\t" \
124 "movel %%a2@,%%a2"
125
126#endif
127
128#endif /* __M68K_ENTRY_H */
diff --git a/arch/m68k/include/asm/entry_no.h b/arch/m68k/include/asm/entry_no.h
deleted file mode 100644
index 68611e3dbb1d..000000000000
--- a/arch/m68k/include/asm/entry_no.h
+++ /dev/null
@@ -1,181 +0,0 @@
1#ifndef __M68KNOMMU_ENTRY_H
2#define __M68KNOMMU_ENTRY_H
3
4#include <asm/setup.h>
5#include <asm/page.h>
6
7/*
8 * Stack layout in 'ret_from_exception':
9 *
10 * This allows access to the syscall arguments in registers d1-d5
11 *
12 * 0(sp) - d1
13 * 4(sp) - d2
14 * 8(sp) - d3
15 * C(sp) - d4
16 * 10(sp) - d5
17 * 14(sp) - a0
18 * 18(sp) - a1
19 * 1C(sp) - a2
20 * 20(sp) - d0
21 * 24(sp) - orig_d0
22 * 28(sp) - stack adjustment
23 * 2C(sp) - [ sr ] [ format & vector ]
24 * 2E(sp) - [ pc-hiword ] [ sr ]
25 * 30(sp) - [ pc-loword ] [ pc-hiword ]
26 * 32(sp) - [ format & vector ] [ pc-loword ]
27 * ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
28 * M68K COLDFIRE
29 */
30
31#define ALLOWINT (~0x700)
32
33#ifdef __ASSEMBLY__
34
35#define SWITCH_STACK_SIZE (6*4+4) /* Includes return address */
36
37/*
38 * This defines the normal kernel pt-regs layout.
39 *
40 * regs are a2-a6 and d6-d7 preserved by C code
41 * the kernel doesn't mess with usp unless it needs to
42 */
43
44#ifdef CONFIG_COLDFIRE
45#ifdef CONFIG_COLDFIRE_SW_A7
46/*
47 * This is made a little more tricky on older ColdFires. There is no
48 * separate supervisor and user stack pointers. Need to artificially
49 * construct a usp in software... When doing this we need to disable
50 * interrupts, otherwise bad things will happen.
51 */
52.globl sw_usp
53.globl sw_ksp
54
55.macro SAVE_ALL
56 move #0x2700,%sr /* disable intrs */
57 btst #5,%sp@(2) /* from user? */
58 bnes 6f /* no, skip */
59 movel %sp,sw_usp /* save user sp */
60 addql #8,sw_usp /* remove exception */
61 movel sw_ksp,%sp /* kernel sp */
62 subql #8,%sp /* room for exception */
63 clrl %sp@- /* stkadj */
64 movel %d0,%sp@- /* orig d0 */
65 movel %d0,%sp@- /* d0 */
66 lea %sp@(-32),%sp /* space for 8 regs */
67 moveml %d1-%d5/%a0-%a2,%sp@
68 movel sw_usp,%a0 /* get usp */
69 movel %a0@-,%sp@(PT_OFF_PC) /* copy exception program counter */
70 movel %a0@-,%sp@(PT_OFF_FORMATVEC)/*copy exception format/vector/sr */
71 bra 7f
72 6:
73 clrl %sp@- /* stkadj */
74 movel %d0,%sp@- /* orig d0 */
75 movel %d0,%sp@- /* d0 */
76 lea %sp@(-32),%sp /* space for 8 regs */
77 moveml %d1-%d5/%a0-%a2,%sp@
78 7:
79.endm
80
81.macro RESTORE_USER
82 move #0x2700,%sr /* disable intrs */
83 movel sw_usp,%a0 /* get usp */
84 movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */
85 movel %sp@(PT_OFF_FORMATVEC),%a0@-/*copy exception format/vector/sr */
86 moveml %sp@,%d1-%d5/%a0-%a2
87 lea %sp@(32),%sp /* space for 8 regs */
88 movel %sp@+,%d0
89 addql #4,%sp /* orig d0 */
90 addl %sp@+,%sp /* stkadj */
91 addql #8,%sp /* remove exception */
92 movel %sp,sw_ksp /* save ksp */
93 subql #8,sw_usp /* set exception */
94 movel sw_usp,%sp /* restore usp */
95 rte
96.endm
97
98.macro RDUSP
99 movel sw_usp,%a3
100.endm
101
102.macro WRUSP
103 movel %a3,sw_usp
104.endm
105
106#else /* !CONFIG_COLDFIRE_SW_A7 */
107/*
108 * Modern ColdFire parts have separate supervisor and user stack
109 * pointers. Simple load and restore macros for this case.
110 */
111.macro SAVE_ALL
112 move #0x2700,%sr /* disable intrs */
113 clrl %sp@- /* stkadj */
114 movel %d0,%sp@- /* orig d0 */
115 movel %d0,%sp@- /* d0 */
116 lea %sp@(-32),%sp /* space for 8 regs */
117 moveml %d1-%d5/%a0-%a2,%sp@
118.endm
119
120.macro RESTORE_USER
121 moveml %sp@,%d1-%d5/%a0-%a2
122 lea %sp@(32),%sp /* space for 8 regs */
123 movel %sp@+,%d0
124 addql #4,%sp /* orig d0 */
125 addl %sp@+,%sp /* stkadj */
126 rte
127.endm
128
129.macro RDUSP
130 /*move %usp,%a3*/
131 .word 0x4e6b
132.endm
133
134.macro WRUSP
135 /*move %a3,%usp*/
136 .word 0x4e63
137.endm
138
139#endif /* !CONFIG_COLDFIRE_SW_A7 */
140
141.macro SAVE_SWITCH_STACK
142 lea %sp@(-24),%sp /* 6 regs */
143 moveml %a3-%a6/%d6-%d7,%sp@
144.endm
145
146.macro RESTORE_SWITCH_STACK
147 moveml %sp@,%a3-%a6/%d6-%d7
148 lea %sp@(24),%sp /* 6 regs */
149.endm
150
151#else /* !CONFIG_COLDFIRE */
152
153/*
154 * Standard 68k interrupt entry and exit macros.
155 */
156.macro SAVE_ALL
157 clrl %sp@- /* stkadj */
158 movel %d0,%sp@- /* orig d0 */
159 movel %d0,%sp@- /* d0 */
160 moveml %d1-%d5/%a0-%a2,%sp@-
161.endm
162
163.macro RESTORE_ALL
164 moveml %sp@+,%a0-%a2/%d1-%d5
165 movel %sp@+,%d0
166 addql #4,%sp /* orig d0 */
167 addl %sp@+,%sp /* stkadj */
168 rte
169.endm
170
171.macro SAVE_SWITCH_STACK
172 moveml %a3-%a6/%d6-%d7,%sp@-
173.endm
174
175.macro RESTORE_SWITCH_STACK
176 moveml %sp@+,%a3-%a6/%d6-%d7
177.endm
178
179#endif /* !COLDFIRE_SW_A7 */
180#endif /* __ASSEMBLY__ */
181#endif /* __M68KNOMMU_ENTRY_H */
diff --git a/arch/m68k/kernel/entry_no.S b/arch/m68k/kernel/entry_no.S
index 5f0f6b598b5a..1b4289061a64 100644
--- a/arch/m68k/kernel/entry_no.S
+++ b/arch/m68k/kernel/entry_no.S
@@ -43,7 +43,7 @@
43.globl sys_vfork 43.globl sys_vfork
44 44
45ENTRY(buserr) 45ENTRY(buserr)
46 SAVE_ALL 46 SAVE_ALL_INT
47 moveq #-1,%d0 47 moveq #-1,%d0
48 movel %d0,%sp@(PT_OFF_ORIG_D0) 48 movel %d0,%sp@(PT_OFF_ORIG_D0)
49 movel %sp,%sp@- /* stack frame pointer argument */ 49 movel %sp,%sp@- /* stack frame pointer argument */
@@ -52,7 +52,7 @@ ENTRY(buserr)
52 jra ret_from_exception 52 jra ret_from_exception
53 53
54ENTRY(trap) 54ENTRY(trap)
55 SAVE_ALL 55 SAVE_ALL_INT
56 moveq #-1,%d0 56 moveq #-1,%d0
57 movel %d0,%sp@(PT_OFF_ORIG_D0) 57 movel %d0,%sp@(PT_OFF_ORIG_D0)
58 movel %sp,%sp@- /* stack frame pointer argument */ 58 movel %sp,%sp@- /* stack frame pointer argument */
@@ -64,7 +64,7 @@ ENTRY(trap)
64 64
65.globl dbginterrupt 65.globl dbginterrupt
66ENTRY(dbginterrupt) 66ENTRY(dbginterrupt)
67 SAVE_ALL 67 SAVE_ALL_INT
68 moveq #-1,%d0 68 moveq #-1,%d0
69 movel %d0,%sp@(PT_OFF_ORIG_D0) 69 movel %d0,%sp@(PT_OFF_ORIG_D0)
70 movel %sp,%sp@- /* stack frame pointer argument */ 70 movel %sp,%sp@- /* stack frame pointer argument */
diff --git a/arch/m68k/platform/68328/entry.S b/arch/m68k/platform/68328/entry.S
index 293e1eba9acc..5c39b80ed7de 100644
--- a/arch/m68k/platform/68328/entry.S
+++ b/arch/m68k/platform/68328/entry.S
@@ -67,7 +67,7 @@ ret_from_signal:
67 jra ret_from_exception 67 jra ret_from_exception
68 68
69ENTRY(system_call) 69ENTRY(system_call)
70 SAVE_ALL 70 SAVE_ALL_SYS
71 71
72 /* save top of frame*/ 72 /* save top of frame*/
73 pea %sp@ 73 pea %sp@
@@ -129,7 +129,7 @@ Lsignal_return:
129 * This is the main interrupt handler, responsible for calling process_int() 129 * This is the main interrupt handler, responsible for calling process_int()
130 */ 130 */
131inthandler1: 131inthandler1:
132 SAVE_ALL 132 SAVE_ALL_INT
133 movew %sp@(PT_OFF_FORMATVEC), %d0 133 movew %sp@(PT_OFF_FORMATVEC), %d0
134 and #0x3ff, %d0 134 and #0x3ff, %d0
135 135
@@ -140,7 +140,7 @@ inthandler1:
140 bra ret_from_interrupt 140 bra ret_from_interrupt
141 141
142inthandler2: 142inthandler2:
143 SAVE_ALL 143 SAVE_ALL_INT
144 movew %sp@(PT_OFF_FORMATVEC), %d0 144 movew %sp@(PT_OFF_FORMATVEC), %d0
145 and #0x3ff, %d0 145 and #0x3ff, %d0
146 146
@@ -151,7 +151,7 @@ inthandler2:
151 bra ret_from_interrupt 151 bra ret_from_interrupt
152 152
153inthandler3: 153inthandler3:
154 SAVE_ALL 154 SAVE_ALL_INT
155 movew %sp@(PT_OFF_FORMATVEC), %d0 155 movew %sp@(PT_OFF_FORMATVEC), %d0
156 and #0x3ff, %d0 156 and #0x3ff, %d0
157 157
@@ -162,7 +162,7 @@ inthandler3:
162 bra ret_from_interrupt 162 bra ret_from_interrupt
163 163
164inthandler4: 164inthandler4:
165 SAVE_ALL 165 SAVE_ALL_INT
166 movew %sp@(PT_OFF_FORMATVEC), %d0 166 movew %sp@(PT_OFF_FORMATVEC), %d0
167 and #0x3ff, %d0 167 and #0x3ff, %d0
168 168
@@ -173,7 +173,7 @@ inthandler4:
173 bra ret_from_interrupt 173 bra ret_from_interrupt
174 174
175inthandler5: 175inthandler5:
176 SAVE_ALL 176 SAVE_ALL_INT
177 movew %sp@(PT_OFF_FORMATVEC), %d0 177 movew %sp@(PT_OFF_FORMATVEC), %d0
178 and #0x3ff, %d0 178 and #0x3ff, %d0
179 179
@@ -184,7 +184,7 @@ inthandler5:
184 bra ret_from_interrupt 184 bra ret_from_interrupt
185 185
186inthandler6: 186inthandler6:
187 SAVE_ALL 187 SAVE_ALL_INT
188 movew %sp@(PT_OFF_FORMATVEC), %d0 188 movew %sp@(PT_OFF_FORMATVEC), %d0
189 and #0x3ff, %d0 189 and #0x3ff, %d0
190 190
@@ -195,7 +195,7 @@ inthandler6:
195 bra ret_from_interrupt 195 bra ret_from_interrupt
196 196
197inthandler7: 197inthandler7:
198 SAVE_ALL 198 SAVE_ALL_INT
199 movew %sp@(PT_OFF_FORMATVEC), %d0 199 movew %sp@(PT_OFF_FORMATVEC), %d0
200 and #0x3ff, %d0 200 and #0x3ff, %d0
201 201
@@ -206,7 +206,7 @@ inthandler7:
206 bra ret_from_interrupt 206 bra ret_from_interrupt
207 207
208inthandler: 208inthandler:
209 SAVE_ALL 209 SAVE_ALL_INT
210 movew %sp@(PT_OFF_FORMATVEC), %d0 210 movew %sp@(PT_OFF_FORMATVEC), %d0
211 and #0x3ff, %d0 211 and #0x3ff, %d0
212 212
diff --git a/arch/m68k/platform/68360/entry.S b/arch/m68k/platform/68360/entry.S
index abbb89672ea0..aa47d1d49929 100644
--- a/arch/m68k/platform/68360/entry.S
+++ b/arch/m68k/platform/68360/entry.S
@@ -63,7 +63,7 @@ ret_from_signal:
63 jra ret_from_exception 63 jra ret_from_exception
64 64
65ENTRY(system_call) 65ENTRY(system_call)
66 SAVE_ALL 66 SAVE_ALL_SYS
67 67
68 /* save top of frame*/ 68 /* save top of frame*/
69 pea %sp@ 69 pea %sp@
@@ -125,7 +125,7 @@ Lsignal_return:
125 * This is the main interrupt handler, responsible for calling do_IRQ() 125 * This is the main interrupt handler, responsible for calling do_IRQ()
126 */ 126 */
127inthandler: 127inthandler:
128 SAVE_ALL 128 SAVE_ALL_INT
129 movew %sp@(PT_OFF_FORMATVEC), %d0 129 movew %sp@(PT_OFF_FORMATVEC), %d0
130 and.l #0x3ff, %d0 130 and.l #0x3ff, %d0
131 lsr.l #0x02, %d0 131 lsr.l #0x02, %d0
diff --git a/arch/m68k/platform/coldfire/entry.S b/arch/m68k/platform/coldfire/entry.S
index bd27242c2f43..3157461a8d1d 100644
--- a/arch/m68k/platform/coldfire/entry.S
+++ b/arch/m68k/platform/coldfire/entry.S
@@ -61,7 +61,7 @@ enosys:
61 bra 1f 61 bra 1f
62 62
63ENTRY(system_call) 63ENTRY(system_call)
64 SAVE_ALL 64 SAVE_ALL_SYS
65 move #0x2000,%sr /* enable intrs again */ 65 move #0x2000,%sr /* enable intrs again */
66 66
67 cmpl #NR_syscalls,%d0 67 cmpl #NR_syscalls,%d0
@@ -165,9 +165,7 @@ Lsignal_return:
165 * sources). Calls up to high level code to do all the work. 165 * sources). Calls up to high level code to do all the work.
166 */ 166 */
167ENTRY(inthandler) 167ENTRY(inthandler)
168 SAVE_ALL 168 SAVE_ALL_INT
169 moveq #-1,%d0
170 movel %d0,%sp@(PT_OFF_ORIG_D0)
171 169
172 movew %sp@(PT_OFF_FORMATVEC),%d0 /* put exception # in d0 */ 170 movew %sp@(PT_OFF_FORMATVEC),%d0 /* put exception # in d0 */
173 andl #0x03fc,%d0 /* mask out vector only */ 171 andl #0x03fc,%d0 /* mask out vector only */