intr: Don't pass the vector name to INTR_HANDLER
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 6 Jan 2011 04:51:09 +0000 (12:51 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 9 Jan 2011 11:22:37 +0000 (19:22 +0800)
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/icu/icu_vector.s

index 031ab01..6f66126 100644 (file)
  * YYY can cache gd base opitner instead of using hidden %fs prefixes.
  */
 
-#define        INTR_HANDLER(irq_num, vec_name)                                 \
+#define        INTR_HANDLER(irq_num)                                           \
        .text ;                                                         \
        SUPERALIGN_TEXT ;                                               \
-IDTVEC(vec_name) ;                                                     \
+IDTVEC(apic_intr##irq_num) ;                                           \
        PUSH_FRAME ;                                                    \
        FAKE_MCOUNT(15*4(%esp)) ;                                       \
        MASK_LEVEL_IRQ(irq_num) ;                                       \
@@ -356,38 +356,38 @@ Xtimer:
 #ifdef SMP /* APIC-IO */
 
 MCOUNT_LABEL(bintr)
-       INTR_HANDLER(0, apic_intr0)
-       INTR_HANDLER(1, apic_intr1)
-       INTR_HANDLER(2, apic_intr2)
-       INTR_HANDLER(3, apic_intr3)
-       INTR_HANDLER(4, apic_intr4)
-       INTR_HANDLER(5, apic_intr5)
-       INTR_HANDLER(6, apic_intr6)
-       INTR_HANDLER(7, apic_intr7)
-       INTR_HANDLER(8, apic_intr8)
-       INTR_HANDLER(9, apic_intr9)
-       INTR_HANDLER(10, apic_intr10)
-       INTR_HANDLER(11, apic_intr11)
-       INTR_HANDLER(12, apic_intr12)
-       INTR_HANDLER(13, apic_intr13)
-       INTR_HANDLER(14, apic_intr14)
-       INTR_HANDLER(15, apic_intr15)
-       INTR_HANDLER(16, apic_intr16)
-       INTR_HANDLER(17, apic_intr17)
-       INTR_HANDLER(18, apic_intr18)
-       INTR_HANDLER(19, apic_intr19)
-       INTR_HANDLER(20, apic_intr20)
-       INTR_HANDLER(21, apic_intr21)
-       INTR_HANDLER(22, apic_intr22)
-       INTR_HANDLER(23, apic_intr23)
-       INTR_HANDLER(24, apic_intr24)
-       INTR_HANDLER(25, apic_intr25)
-       INTR_HANDLER(26, apic_intr26)
-       INTR_HANDLER(27, apic_intr27)
-       INTR_HANDLER(28, apic_intr28)
-       INTR_HANDLER(29, apic_intr29)
-       INTR_HANDLER(30, apic_intr30)
-       INTR_HANDLER(31, apic_intr31)
+       INTR_HANDLER(0)
+       INTR_HANDLER(1)
+       INTR_HANDLER(2)
+       INTR_HANDLER(3)
+       INTR_HANDLER(4)
+       INTR_HANDLER(5)
+       INTR_HANDLER(6)
+       INTR_HANDLER(7)
+       INTR_HANDLER(8)
+       INTR_HANDLER(9)
+       INTR_HANDLER(10)
+       INTR_HANDLER(11)
+       INTR_HANDLER(12)
+       INTR_HANDLER(13)
+       INTR_HANDLER(14)
+       INTR_HANDLER(15)
+       INTR_HANDLER(16)
+       INTR_HANDLER(17)
+       INTR_HANDLER(18)
+       INTR_HANDLER(19)
+       INTR_HANDLER(20)
+       INTR_HANDLER(21)
+       INTR_HANDLER(22)
+       INTR_HANDLER(23)
+       INTR_HANDLER(24)
+       INTR_HANDLER(25)
+       INTR_HANDLER(26)
+       INTR_HANDLER(27)
+       INTR_HANDLER(28)
+       INTR_HANDLER(29)
+       INTR_HANDLER(30)
+       INTR_HANDLER(31)
 MCOUNT_LABEL(eintr)
 
 #endif
index ae259aa..b193aa8 100644 (file)
  *     prefixes.
  */
 
-#define        INTR_HANDLER(irq_num, vec_name, icu, enable_icus)               \
+#define        INTR_HANDLER(irq_num, icu, enable_icus)                         \
        .text ;                                                         \
        SUPERALIGN_TEXT ;                                               \
-IDTVEC(vec_name) ;                                                     \
+IDTVEC(icu_intr##irq_num) ;                                            \
        PUSH_FRAME ;                                                    \
        FAKE_MCOUNT(15*4(%esp)) ;                                       \
        MASK_IRQ(icu, irq_num) ;                                        \
@@ -183,22 +183,22 @@ IDTVEC(vec_name) ;                                                        \
        ret ;                                                           \
 
 MCOUNT_LABEL(bintr)
-       INTR_HANDLER(0, icu_intr0, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(1, icu_intr1, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(2, icu_intr2, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(3, icu_intr3, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(4, icu_intr4, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(5, icu_intr5, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(6, icu_intr6, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(7, icu_intr7, IO_ICU1, ENABLE_ICU1)
-       INTR_HANDLER(8, icu_intr8, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(9, icu_intr9, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(10, icu_intr10, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(11, icu_intr11, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(12, icu_intr12, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(13, icu_intr13, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(14, icu_intr14, IO_ICU2, ENABLE_ICU1_AND_2)
-       INTR_HANDLER(15, icu_intr15, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(0, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(1, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(2, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(3, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(4, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(5, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(6, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(7, IO_ICU1, ENABLE_ICU1)
+       INTR_HANDLER(8, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(9, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(10, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(11, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(12, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(13, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(14, IO_ICU2, ENABLE_ICU1_AND_2)
+       INTR_HANDLER(15, IO_ICU2, ENABLE_ICU1_AND_2)
 MCOUNT_LABEL(eintr)
 
        .data