patch-2.1.73 linux/arch/mips/jazz/int-handler.S
Next file: linux/arch/mips/jazz/jazzdma.c
Previous file: linux/arch/mips/jazz/hw-access.c
Back to the patch index
Back to the overall index
- Lines: 222
- Date:
Wed Dec 10 10:31:09 1997
- Orig file:
v2.1.72/linux/arch/mips/jazz/int-handler.S
- Orig date:
Mon Aug 4 16:25:36 1997
diff -u --recursive --new-file v2.1.72/linux/arch/mips/jazz/int-handler.S linux/arch/mips/jazz/int-handler.S
@@ -9,6 +9,8 @@
* interrupts. These interrupts should use their own vectors.
* Squeeze the last cycles out of the handlers. Only a dead
* cycle is a good cycle.
+ *
+ * $Id: int-handler.S,v 1.3 1997/09/20 19:20:11 root Exp $
*/
#include <asm/asm.h>
#include <asm/mipsconfig.h>
@@ -110,12 +112,8 @@
/*
* Now call the real handler
*/
- la t3,IRQ_vectors
- sll t2,a0,PTRLOG
- addu t3,t2
- LONG_L t3,(t3)
- jalr t3
- nop # delay slot
+ jal do_IRQ
+ move a1,sp
/*
* Unblock first pic
*/
@@ -124,8 +122,8 @@
nor s1,zero,s1
and a0,s1
sb a0,%lo(cache_21)(s4)
- jr v0
- sb a0,%lo(JAZZ_PORT_BASE)+0x21(s0) # delay slot
+ j ret_from_irq
+ sb a0,%lo(JAZZ_PORT_BASE)+0x21(s0)
.align 5
ack_second: /*
@@ -144,13 +142,8 @@
/*
* Now call the real handler
*/
- la t3,IRQ_vectors
- addiu a0,8
- sll t2,a0,PTRLOG
- addu t3,t2
- LONG_L t3,(t3)
- jalr t3
- nop # delay slot
+ jal do_IRQ
+ move a1,sp
/*
* Unblock second pic
@@ -160,8 +153,8 @@
nor s1,zero,s1
and a0,s1
sb a0,%lo(cache_A1)(s4)
- jr v0
- sb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0) # delay slot
+ j ret_from_irq
+ sb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0)
/*
* Hmm... This is not just a plain PC clone so the question is
@@ -187,40 +180,35 @@
li a0,0
jal do_IRQ
- move a1,sp # delay slot
+ move a1,sp
mfc0 t0,CP0_STATUS # disable interrupts again
ori t0,1
xori t0,1
mtc0 t0,CP0_STATUS
- j ret_from_sys_call
- nop # delay slot
+ j ret_from_irq
+ nop
/*
* CPU count/compare IRQ (unused)
*/
ll_count: j return
- mtc0 zero,CP0_COMPARE
+ mtc0 zero,CP0_COMPARE
#if 0
/*
* Call the handler for the interrupt
* (Currently unused)
*/
-call_real: la t0,IRQ_vectors
-
- /*
+call_real: /*
* temporarily disable interrupt
*/
mfc0 t2,CP0_STATUS
and t2,s1
-
- addu t0,t3
- lw t0,(t0)
- mtc0 t2,CP0_STATUS # delay slot
- jalr t0
- nor s1,zero,s1 # delay slot
+ mtc0 t2,CP0_STATUS
+ nor s1,zero,s1
+ jal do_IRQ
/*
* reenable interrupt
@@ -228,9 +216,7 @@
mfc0 t2,CP0_STATUS
or t2,s1
mtc0 t2,CP0_STATUS
-
- jr v0
- nop # delay slot
+ j ret_from_irq
#endif
.data
@@ -247,6 +233,7 @@
* Interrupt handlers for local devices.
*/
.text
+ .set reorder
loc_no_irq: PANIC("Unimplemented loc_no_irq handler")
/*
* Parallel port IRQ, remapped to level 5
@@ -254,7 +241,6 @@
loc_parallel: li s1,~JAZZ_IE_PARALLEL
li a0,JAZZ_PARALLEL_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_PARALLEL_IRQ # delay slot
/*
* Floppy IRQ, remapped to level 6
@@ -262,7 +248,6 @@
loc_floppy: li s1,~JAZZ_IE_FLOPPY
li a0,JAZZ_FLOPPY_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_FLOPPY_IRQ # delay slot
/*
* Sound? What sound hardware (whistle) ???
@@ -276,12 +261,10 @@
loc_ethernet: li s1,~JAZZ_IE_ETHERNET
li a0,JAZZ_ETHERNET_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_ETHERNET_IRQ # delay slot
loc_scsi: li s1,~JAZZ_IE_SCSI
- li a0,12 # JAZZ_SCSI_IRQ */
+ li a0,12 # JAZZ_SCSI_IRQ
b loc_call
- li t3,PTRSIZE*12 # JAZZ_ETHERNET_IRQ # delay slot
/*
* Keyboard interrupt handler
@@ -289,7 +272,6 @@
loc_keyboard: li s1,~JAZZ_IE_KEYBOARD
li a0,JAZZ_KEYBOARD_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_KEYBOARD_IRQ # re-map to irq level 1
loc_mouse: PANIC("Unimplemented loc_mouse handler")
@@ -299,7 +281,6 @@
loc_serial1: li s1,~JAZZ_IE_SERIAL1
li a0,JAZZ_SERIAL1_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_SERIAL1_IRQ # delay slot
/*
* Serial port 2 IRQ, remapped to level 4
@@ -307,24 +288,20 @@
loc_serial2: li s1,~JAZZ_IE_SERIAL2
li a0,JAZZ_SERIAL2_IRQ
b loc_call
- li t3,PTRSIZE*JAZZ_SERIAL2_IRQ # delay slot
/*
* Call the interrupt handler for an interrupt generated by a
* local device.
*/
-loc_call: la t0,IRQ_vectors # delay slot
-
- /*
+loc_call: /*
* Temporarily disable interrupt source
*/
lhu t2,JAZZ_IO_IRQ_ENABLE
- addu t0,t3 # make ptr to IRQ handler
- lw t0,(t0)
- and t2,s1 # delay slot
+ and t2,s1
sh t2,JAZZ_IO_IRQ_ENABLE
- jalr t0 # call IRQ handler
- nor s1,zero,s1 # delay slot
+
+ nor s1,zero,s1
+ jal do_IRQ
/*
* Reenable interrupt
@@ -333,14 +310,12 @@
or t2,s1
sh t2,JAZZ_IO_IRQ_ENABLE
- jr v0
- nop # delay slot
+ j ret_from_irq
/*
* "Jump extender" to reach spurious_interrupt
*/
3: j spurious_interrupt
- nop # delay slot
/*
* Vectors for interrupts generated by local devices
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov