diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-06-21 23:50:44 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-10-18 00:22:25 -0400 |
commit | 61619b12078dc8b85a3d4cbfa16f650daa341bd1 (patch) | |
tree | e1971eca6707ddc7fad852a6c7e29a3ad8766aee /arch/m68k/platform | |
parent | 0a01b310fe6319d88690bd5a329c9e6a82ce7011 (diff) |
m68k: merge mmu and non-mmu include/asm/entry.h files
The changes in the mmu version of entry.h (entry_mm.h) and the non-mmu
version (entry_no.h) are not about the presence or use of an MMU at all.
The main changes are to support the ColdFire processors. The code for
trap entry and exit for all types of 68k processor outside coldfire is
the same.
So merge the files back to a single entry.h and share the common 68k
entry/exit code. Some changes are required for the non-mmu entry
handlers to adopt the differing macros for system call and interrupt
entry, but this is quite strait forward. The changes for the ColdFire
remove a couple of instructions for the separate a7 register case, and
are no worse for the older single a7 register case.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform')
-rw-r--r-- | arch/m68k/platform/68328/entry.S | 18 | ||||
-rw-r--r-- | arch/m68k/platform/68360/entry.S | 4 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/entry.S | 6 |
3 files changed, 13 insertions, 15 deletions
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 | ||
69 | ENTRY(system_call) | 69 | ENTRY(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 | */ |
131 | inthandler1: | 131 | inthandler1: |
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 | ||
142 | inthandler2: | 142 | inthandler2: |
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 | ||
153 | inthandler3: | 153 | inthandler3: |
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 | ||
164 | inthandler4: | 164 | inthandler4: |
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 | ||
175 | inthandler5: | 175 | inthandler5: |
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 | ||
186 | inthandler6: | 186 | inthandler6: |
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 | ||
197 | inthandler7: | 197 | inthandler7: |
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 | ||
208 | inthandler: | 208 | inthandler: |
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 | ||
65 | ENTRY(system_call) | 65 | ENTRY(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 | */ |
127 | inthandler: | 127 | inthandler: |
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 | ||
63 | ENTRY(system_call) | 63 | ENTRY(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 | */ |
167 | ENTRY(inthandler) | 167 | ENTRY(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 */ |