aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/entry.S
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-25 08:46:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:00:56 -0400
commit92445eaaadc1f03f5a177ecc957bda76bf2ba8d5 (patch)
treee327dc2b95b3fe34183428314d6b6e0700e9e72b /arch/m68k/kernel/entry.S
parentf2325ecebc5b7988fd49968bd3a660fd1594dc84 (diff)
[PATCH] m68k: separate handler for auto and user vector interrupt
Use separate entry points for auto and user vector interrupts and cleanup naming a little. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68k/kernel/entry.S')
-rw-r--r--arch/m68k/kernel/entry.S84
1 files changed, 42 insertions, 42 deletions
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 522079f8c2ba..1fb88f3311de 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -45,7 +45,7 @@
45#include <asm/asm-offsets.h> 45#include <asm/asm-offsets.h>
46 46
47.globl system_call, buserr, trap, resume 47.globl system_call, buserr, trap, resume
48.globl inthandler, sys_call_table 48.globl sys_call_table
49.globl sys_fork, sys_clone, sys_vfork 49.globl sys_fork, sys_clone, sys_vfork
50.globl ret_from_interrupt, bad_interrupt 50.globl ret_from_interrupt, bad_interrupt
51 51
@@ -191,44 +191,15 @@ do_delayed_trace:
191 jbra resume_userspace 191 jbra resume_userspace
192 192
193 193
194#if 0 194/* This is the main interrupt handler for autovector interrupts */
195#ifdef CONFIG_AMIGA
196ami_inthandler:
197 addql #1,irq_stat+CPUSTAT_LOCAL_IRQ_COUNT
198 SAVE_ALL_INT
199 GET_CURRENT(%d0)
200
201 bfextu %sp@(PT_VECTOR){#4,#12},%d0
202 movel %d0,%a0
203 addql #1,%a0@(kstat+STAT_IRQ-VECOFF(VEC_SPUR))
204 movel %a0@(autoirq_list-VECOFF(VEC_SPUR)),%a0
205
206| amiga vector int handler get the req mask instead of irq vector
207 lea CUSTOMBASE,%a1
208 movew %a1@(C_INTREQR),%d0
209 andw %a1@(C_INTENAR),%d0
210
211| prepare stack (push frame pointer, dev_id & req mask)
212 pea %sp@
213 movel %a0@(IRQ_DEVID),%sp@-
214 movel %d0,%sp@-
215 pea %pc@(ret_from_interrupt:w)
216 jbra @(IRQ_HANDLER,%a0)@(0)
217
218ENTRY(nmi_handler)
219 rte
220#endif
221#endif
222 195
223/* 196ENTRY(auto_inthandler)
224** This is the main interrupt handler, responsible for calling process_int()
225*/
226inthandler:
227 SAVE_ALL_INT 197 SAVE_ALL_INT
228 GET_CURRENT(%d0) 198 GET_CURRENT(%d0)
229 addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) 199 addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
230 | put exception # in d0 200 | put exception # in d0
231 bfextu %sp@(PT_VECTOR){#4,#10},%d0 201 bfextu %sp@(PT_VECTOR){#4,#10},%d0
202 subw #VEC_SPUR,%d0
232 203
233 movel %sp,%sp@- 204 movel %sp,%sp@-
234 movel %d0,%sp@- | put vector # on stack 205 movel %d0,%sp@- | put vector # on stack
@@ -241,15 +212,16 @@ inthandler:
241 jbra 3f 212 jbra 3f
2421: 2131:
243#endif 214#endif
244 jbsr process_int | process the IRQ 215 jsr m68k_handle_int | process the IRQ
2453: addql #8,%sp | pop parameters off stack 2163: addql #8,%sp | pop parameters off stack
246 217
247ret_from_interrupt: 218ret_from_interrupt:
248 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) 219 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
249 jeq 1f 220 jeq ret_from_last_interrupt
2502: 2212: RESTORE_ALL
251 RESTORE_ALL 222
2521: 223 ALIGN
224ret_from_last_interrupt:
253 moveq #(~ALLOWINT>>8)&0xff,%d0 225 moveq #(~ALLOWINT>>8)&0xff,%d0
254 andb %sp@(PT_SR),%d0 226 andb %sp@(PT_SR),%d0
255 jne 2b 227 jne 2b
@@ -260,12 +232,40 @@ ret_from_interrupt:
260 pea ret_from_exception 232 pea ret_from_exception
261 jra do_softirq 233 jra do_softirq
262 234
235/* Handler for user defined interrupt vectors */
236
237ENTRY(mach_inthandler)
238 SAVE_ALL_INT
239 GET_CURRENT(%d0)
240 addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
241 | put exception # in d0
242 bfextu %sp@(PT_VECTOR){#4,#10},%d0
243
244 movel %sp,%sp@-
245 movel %d0,%sp@- | put vector # on stack
246 movel mach_process_int,%a0
247 jsr %a0@ | process the IRQ
248 addql #8,%sp | pop parameters off stack
249
250 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
251 jeq ret_from_last_interrupt
252 RESTORE_ALL
263 253
264/* Handler for uninitialized and spurious interrupts */ 254/* Handler for uninitialized and spurious interrupts */
265 255
266bad_interrupt: 256ENTRY(bad_inthandler)
267 addql #1,num_spurious 257 SAVE_ALL_INT
268 rte 258 GET_CURRENT(%d0)
259 addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
260
261 movel %sp,%sp@-
262 jsr handle_badint
263 addql #4,%sp
264
265 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
266 jeq ret_from_last_interrupt
267 RESTORE_ALL
268
269 269
270ENTRY(sys_fork) 270ENTRY(sys_fork)
271 SAVE_SWITCH_STACK 271 SAVE_SWITCH_STACK