@@ -23,13 +23,6 @@
.globl ret_from_exception
.globl sys_call_table
.globl bad_interrupt
-.globl inthandler1
-.globl inthandler2
-.globl inthandler3
-.globl inthandler4
-.globl inthandler5
-.globl inthandler6
-.globl inthandler7
badsys:
movel #-ENOSYS,%sp@(PT_OFF_D0)
@@ -119,85 +112,32 @@ Lsignal_return:
addql #4,%sp
jra 1b
-/*
- * This is the main interrupt handler, responsible for calling process_int()
- */
-inthandler1:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #65,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler2:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #66,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler3:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #67,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler4:
+/* Create an interrupt vector sled */
+ .macro inthandler num func
+ .globl inthandler\num
+ inthandler\num:
SAVE_ALL_INT
movew %sp@(PT_OFF_FORMATVEC), %d0
and #0x3ff, %d0
movel %sp,%sp@-
- movel #68,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler5:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #69,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler6:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #70,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
- bra ret_from_exception
-
-inthandler7:
- SAVE_ALL_INT
- movew %sp@(PT_OFF_FORMATVEC), %d0
- and #0x3ff, %d0
-
- movel %sp,%sp@-
- movel #71,%sp@- /* put vector # on stack*/
- jbsr process_int /* process the IRQ*/
-3: addql #8,%sp /* pop parameters off stack*/
+ /* put vector # on stack*/
+ movel #\num,%sp@-
+ /* process the IRQ*/
+ jbsr \func
+ /* pop parameters off stack*/
+ addql #8,%sp
bra ret_from_exception
+ .endm
+
+/* Dragonball interrupts */
+inthandler 65 process_int
+inthandler 66 process_int
+inthandler 67 process_int
+inthandler 68 process_int
+inthandler 69 process_int
+inthandler 70 process_int
+inthandler 71 process_int
inthandler:
SAVE_ALL_INT
@@ -63,13 +63,13 @@ asmlinkage void trap46(void);
asmlinkage void trap47(void);
asmlinkage irqreturn_t bad_interrupt(int, void *);
asmlinkage irqreturn_t inthandler(void);
-asmlinkage irqreturn_t inthandler1(void);
-asmlinkage irqreturn_t inthandler2(void);
-asmlinkage irqreturn_t inthandler3(void);
-asmlinkage irqreturn_t inthandler4(void);
-asmlinkage irqreturn_t inthandler5(void);
-asmlinkage irqreturn_t inthandler6(void);
-asmlinkage irqreturn_t inthandler7(void);
+asmlinkage irqreturn_t inthandler65(void);
+asmlinkage irqreturn_t inthandler66(void);
+asmlinkage irqreturn_t inthandler67(void);
+asmlinkage irqreturn_t inthandler68(void);
+asmlinkage irqreturn_t inthandler69(void);
+asmlinkage irqreturn_t inthandler70(void);
+asmlinkage irqreturn_t inthandler71(void);
/* The 68k family did not have a good way to determine the source
* of interrupts until later in the family. The EC000 core does
@@ -163,13 +163,13 @@ void __init trap_init(void)
_ramvec[32] = system_call;
- _ramvec[65] = (e_vector) inthandler1;
- _ramvec[66] = (e_vector) inthandler2;
- _ramvec[67] = (e_vector) inthandler3;
- _ramvec[68] = (e_vector) inthandler4;
- _ramvec[69] = (e_vector) inthandler5;
- _ramvec[70] = (e_vector) inthandler6;
- _ramvec[71] = (e_vector) inthandler7;
+ _ramvec[65] = (e_vector) inthandler65;
+ _ramvec[66] = (e_vector) inthandler66;
+ _ramvec[67] = (e_vector) inthandler67;
+ _ramvec[68] = (e_vector) inthandler68;
+ _ramvec[69] = (e_vector) inthandler69;
+ _ramvec[70] = (e_vector) inthandler70;
+ _ramvec[71] = (e_vector) inthandler71;
}
void __init init_IRQ(void)