MachIntrABI: Field rename; no functional changes
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 14 Sep 2011 13:32:37 +0000 (21:32 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 14 Sep 2011 13:34:09 +0000 (21:34 +0800)
14 files changed:
sys/kern/kern_intr.c
sys/platform/pc32/apic/ioapic_abi.c
sys/platform/pc32/i386/genassym.c
sys/platform/pc32/icu/icu.c
sys/platform/pc32/icu/icu_abi.c
sys/platform/pc32/isa/clock.c
sys/platform/pc64/apic/ioapic_abi.c
sys/platform/pc64/icu/icu.c
sys/platform/pc64/icu/icu_abi.c
sys/platform/pc64/isa/clock.c
sys/platform/pc64/x86_64/genassym.c
sys/platform/vkernel/platform/machintr.c
sys/platform/vkernel64/platform/machintr.c
sys/sys/machintr.h

index 16550f9..5057bae 100644 (file)
@@ -847,7 +847,7 @@ ithread_handler(void *arg)
         * interrupt on close (the parallel bus being a good example).
         */
        if (intr < FIRST_SOFTINT && *list)
-           machintr_intren(intr);
+           machintr_intr_enable(intr);
 
        /*
         * Do a quick exit/enter to catch any higher-priority interrupt
index 828005a..a98341d 100644 (file)
@@ -476,29 +476,32 @@ extern void       IOAPIC_INTRDIS(int);
 
 extern int     imcr_present;
 
+static void    ioapic_abi_intr_enable(int);
+static void    ioapic_abi_intr_disable(int);
 static void    ioapic_abi_intr_setup(int, int);
 static void    ioapic_abi_intr_teardown(int);
+static void    ioapic_intr_config(int, enum intr_trigger, enum intr_polarity);
+
 static void    ioapic_finalize(void);
 static void    ioapic_cleanup(void);
 static void    ioapic_setdefault(void);
 static void    ioapic_stabilize(void);
 static void    ioapic_initmap(void);
-static void    ioapic_intr_config(int, enum intr_trigger, enum intr_polarity);
-static void    ioapic_abi_intren(int);
-static void    ioapic_abi_intrdis(int);
 
 struct machintr_abi MachIntrABI_IOAPIC = {
        MACHINTR_IOAPIC,
-       .intrdis        = ioapic_abi_intrdis,
-       .intren         = ioapic_abi_intren,
+
+       .intr_disable   = ioapic_abi_intr_disable,
+       .intr_enable    = ioapic_abi_intr_enable,
        .intr_setup     = ioapic_abi_intr_setup,
        .intr_teardown  = ioapic_abi_intr_teardown,
+       .intr_config    = ioapic_intr_config,
+
        .finalize       = ioapic_finalize,
        .cleanup        = ioapic_cleanup,
        .setdefault     = ioapic_setdefault,
        .stabilize      = ioapic_stabilize,
-       .initmap        = ioapic_initmap,
-       .intr_config    = ioapic_intr_config
+       .initmap        = ioapic_initmap
 };
 
 static int     ioapic_abi_extint_irq = -1;
@@ -506,20 +509,20 @@ static int        ioapic_abi_extint_irq = -1;
 struct ioapic_irqinfo  ioapic_irqs[IOAPIC_HWI_VECTORS];
 
 static void
-ioapic_abi_intren(int irq)
+ioapic_abi_intr_enable(int irq)
 {
        if (irq < 0 || irq >= IOAPIC_HWI_VECTORS) {
-               kprintf("ioapic_abi_intren invalid irq %d\n", irq);
+               kprintf("ioapic_abi_intr_enable invalid irq %d\n", irq);
                return;
        }
        IOAPIC_INTREN(irq);
 }
 
 static void
-ioapic_abi_intrdis(int irq)
+ioapic_abi_intr_disable(int irq)
 {
        if (irq < 0 || irq >= IOAPIC_HWI_VECTORS) {
-               kprintf("ioapic_abi_intrdis invalid irq %d\n", irq);
+               kprintf("ioapic_abi_intr_disable invalid irq %d\n", irq);
                return;
        }
        IOAPIC_INTRDIS(irq);
@@ -597,7 +600,7 @@ ioapic_abi_intr_setup(int intr, int flags)
 
        imen_unlock();
 
-       machintr_intren(intr);
+       machintr_intr_enable(intr);
 
        write_eflags(ef);
 }
@@ -620,7 +623,7 @@ ioapic_abi_intr_teardown(int intr)
         * Teardown an interrupt vector.  The vector should already be
         * installed in the cpu's IDT, but make sure.
         */
-       machintr_intrdis(intr);
+       machintr_intr_disable(intr);
 
        vector = IDT_OFFSET + intr;
        setidt(vector, ioapic_intr[intr], SDT_SYS386IGT, SEL_KPL,
index d62acc8..84e9f15 100644 (file)
@@ -92,7 +92,7 @@ ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
 ASSYM(TDF_RUNNING, TDF_RUNNING);
 ASSYM(TDF_USINGFP, TDF_USINGFP);
 ASSYM(TDF_KERNELFP, TDF_KERNELFP);
-ASSYM(MACHINTR_INTREN, offsetof(struct machintr_abi, intren));
+ASSYM(MACHINTR_INTREN, offsetof(struct machintr_abi, intr_enable));
 
 ASSYM(TD_SAVEFPU, offsetof(struct thread, td_mach) + offsetof(struct md_thread, mtd_savefpu));
 
index 9a9d0c3..c64082e 100644 (file)
@@ -136,7 +136,7 @@ icu_reinit(void)
        icu_init();
        for (i = 0; i < MAX_HARDINTS; ++i) {
                if (count_registered_ints(i))
-                       machintr_intren(i);
+                       machintr_intr_enable(i);
        }
 }
 
index 3d61dfb..c8e45ec 100644 (file)
@@ -107,16 +107,18 @@ static void       icu_intr_config(int, enum intr_trigger, enum intr_polarity);
 
 struct machintr_abi MachIntrABI_ICU = {
        MACHINTR_ICU,
-       .intrdis        = ICU_INTRDIS,
-       .intren         = ICU_INTREN,
+
+       .intr_disable   = ICU_INTRDIS,
+       .intr_enable    = ICU_INTREN,
        .intr_setup     = icu_abi_intr_setup,
        .intr_teardown  = icu_abi_intr_teardown,
+       .intr_config    = icu_intr_config,
+
        .finalize       = icu_finalize,
        .cleanup        = icu_cleanup,
        .setdefault     = icu_setdefault,
        .stabilize      = icu_stabilize,
-       .initmap        = icu_initmap,
-       .intr_config    = icu_intr_config
+       .initmap        = icu_initmap
 };
 
 /*
@@ -132,8 +134,8 @@ icu_stabilize(void)
        int intr;
 
        for (intr = 0; intr < ICU_HWI_VECTORS; ++intr)
-               machintr_intrdis(intr);
-       machintr_intren(ICU_IRQ_SLAVE);
+               machintr_intr_disable(intr);
+       machintr_intr_enable(ICU_IRQ_SLAVE);
 }
 
 /*
@@ -183,7 +185,7 @@ icu_abi_intr_setup(int intr, int flags __unused)
 
        setidt(IDT_OFFSET + intr, icu_intr[intr], SDT_SYS386IGT,
            SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-       machintr_intren(intr);
+       machintr_intr_enable(intr);
 
        write_eflags(ef);
 }
@@ -198,7 +200,7 @@ icu_abi_intr_teardown(int intr)
        ef = read_eflags();
        cpu_disable_intr();
 
-       machintr_intrdis(intr);
+       machintr_intr_disable(intr);
        setidt(IDT_OFFSET + intr, icu_intr[intr], SDT_SYS386IGT,
            SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
 
index a44c9d0..01d091a 100644 (file)
@@ -1085,13 +1085,13 @@ mixed_mode_setup:
                                       INTR_EXCL | INTR_CLOCK |
                                       INTR_NOPOLL | INTR_MPSAFE |
                                       INTR_NOENTROPY);
-               machintr_intren(irq);
+               machintr_intr_enable(irq);
        } else {
                register_int(0, clkintr, NULL, "clk", NULL,
                             INTR_EXCL | INTR_CLOCK |
                             INTR_NOPOLL | INTR_MPSAFE |
                             INTR_NOENTROPY);
-               machintr_intren(0);
+               machintr_intr_enable(0);
        }
 
        /* Initialize RTC. */
@@ -1114,7 +1114,7 @@ mixed_mode_setup:
                        } else {
                                kprintf("IOAPIC: warning 8254 is not connected "
                                        "to the correct pin, try mixed mode\n");
-                               machintr_intrdis(irq);
+                               machintr_intr_disable(irq);
                                unregister_int(clkdesc);
                                goto mixed_mode_setup;
                        }
index 286d3b9..b4dbb3a 100644 (file)
@@ -476,29 +476,31 @@ extern void       IOAPIC_INTRDIS(int);
 
 extern int     imcr_present;
 
+static void    ioapic_abi_intr_enable(int);
+static void    ioapic_abi_intr_disable(int);
 static void    ioapic_abi_intr_setup(int, int);
 static void    ioapic_abi_intr_teardown(int);
+static void    ioapic_intr_config(int, enum intr_trigger, enum intr_polarity);
+
 static void    ioapic_finalize(void);
 static void    ioapic_cleanup(void);
 static void    ioapic_setdefault(void);
 static void    ioapic_stabilize(void);
 static void    ioapic_initmap(void);
-static void    ioapic_intr_config(int, enum intr_trigger, enum intr_polarity);
-static void    ioapic_abi_intren(int);
-static void    ioapic_abi_intrdis(int);
 
 struct machintr_abi MachIntrABI_IOAPIC = {
        MACHINTR_IOAPIC,
-       .intrdis        = ioapic_abi_intrdis,
-       .intren         = ioapic_abi_intren,
+       .intr_disable   = ioapic_abi_intr_disable,
+       .intr_enable    = ioapic_abi_intr_enable,
        .intr_setup     = ioapic_abi_intr_setup,
        .intr_teardown  = ioapic_abi_intr_teardown,
+       .intr_config    = ioapic_intr_config,
+
        .finalize       = ioapic_finalize,
        .cleanup        = ioapic_cleanup,
        .setdefault     = ioapic_setdefault,
        .stabilize      = ioapic_stabilize,
-       .initmap        = ioapic_initmap,
-       .intr_config    = ioapic_intr_config
+       .initmap        = ioapic_initmap
 };
 
 static int     ioapic_abi_extint_irq = -1;
@@ -506,20 +508,20 @@ static int        ioapic_abi_extint_irq = -1;
 struct ioapic_irqinfo  ioapic_irqs[IOAPIC_HWI_VECTORS];
 
 static void
-ioapic_abi_intren(int irq)
+ioapic_abi_intr_enable(int irq)
 {
        if (irq < 0 || irq >= IOAPIC_HWI_VECTORS) {
-               kprintf("ioapic_abi_intren invalid irq %d\n", irq);
+               kprintf("ioapic_abi_intr_enable invalid irq %d\n", irq);
                return;
        }
        IOAPIC_INTREN(irq);
 }
 
 static void
-ioapic_abi_intrdis(int irq)
+ioapic_abi_intr_disable(int irq)
 {
        if (irq < 0 || irq >= IOAPIC_HWI_VECTORS) {
-               kprintf("ioapic_abi_intrdis invalid irq %d\n", irq);
+               kprintf("ioapic_abi_intr_disable invalid irq %d\n", irq);
                return;
        }
        IOAPIC_INTRDIS(irq);
@@ -596,7 +598,7 @@ ioapic_abi_intr_setup(int intr, int flags)
 
        imen_unlock();
 
-       machintr_intren(intr);
+       machintr_intr_enable(intr);
 
        write_rflags(ef);
 }
@@ -619,7 +621,7 @@ ioapic_abi_intr_teardown(int intr)
         * Teardown an interrupt vector.  The vector should already be
         * installed in the cpu's IDT, but make sure.
         */
-       machintr_intrdis(intr);
+       machintr_intr_disable(intr);
 
        vector = IDT_OFFSET + intr;
        setidt(vector, ioapic_intr[intr], SDT_SYSIGT, SEL_KPL, 0);
index 33a07f0..608e991 100644 (file)
@@ -136,7 +136,7 @@ icu_reinit(void)
        icu_init();
        for (i = 0; i < MAX_HARDINTS; ++i) {
                if (count_registered_ints(i))
-                       machintr_intren(i);
+                       machintr_intr_enable(i);
        }
 }
 
index dea7db6..768db48 100644 (file)
@@ -107,16 +107,17 @@ static void       icu_intr_config(int, enum intr_trigger, enum intr_polarity);
 
 struct machintr_abi MachIntrABI_ICU = {
        MACHINTR_ICU,
-       .intrdis        = ICU_INTRDIS,
-       .intren         = ICU_INTREN,
+       .intr_disable   = ICU_INTRDIS,
+       .intr_enable    = ICU_INTREN,
        .intr_setup     = icu_abi_intr_setup,
        .intr_teardown  = icu_abi_intr_teardown,
+       .intr_config    = icu_intr_config,
+
        .finalize       = icu_finalize,
        .cleanup        = icu_cleanup,
        .setdefault     = icu_setdefault,
        .stabilize      = icu_stabilize,
-       .initmap        = icu_initmap,
-       .intr_config    = icu_intr_config
+       .initmap        = icu_initmap
 };
 
 /*
@@ -132,8 +133,8 @@ icu_stabilize(void)
        int intr;
 
        for (intr = 0; intr < ICU_HWI_VECTORS; ++intr)
-               machintr_intrdis(intr);
-       machintr_intren(ICU_IRQ_SLAVE);
+               machintr_intr_disable(intr);
+       machintr_intr_enable(ICU_IRQ_SLAVE);
 }
 
 /*
@@ -182,7 +183,7 @@ icu_abi_intr_setup(int intr, int flags)
        cpu_disable_intr();
 
        setidt(IDT_OFFSET + intr, icu_intr[intr], SDT_SYSIGT, SEL_KPL, 0);
-       machintr_intren(intr);
+       machintr_intr_enable(intr);
 
        write_rflags(ef);
 }
@@ -197,7 +198,7 @@ icu_abi_intr_teardown(int intr)
        ef = read_rflags();
        cpu_disable_intr();
 
-       machintr_intrdis(intr);
+       machintr_intr_disable(intr);
        setidt(IDT_OFFSET + intr, icu_intr[intr], SDT_SYSIGT, SEL_KPL, 0);
 
        write_rflags(ef);
index 4403aa9..3614992 100644 (file)
@@ -1092,13 +1092,13 @@ mixed_mode_setup:
                                       INTR_EXCL | INTR_CLOCK |
                                       INTR_NOPOLL | INTR_MPSAFE |
                                       INTR_NOENTROPY);
-               machintr_intren(irq);
+               machintr_intr_enable(irq);
        } else {
                register_int(0, clkintr, NULL, "clk", NULL,
                             INTR_EXCL | INTR_CLOCK |
                             INTR_NOPOLL | INTR_MPSAFE |
                             INTR_NOENTROPY);
-               machintr_intren(0);
+               machintr_intr_enable(0);
        }
 
        /* Initialize RTC. */
@@ -1121,7 +1121,7 @@ mixed_mode_setup:
                        } else {
                                kprintf("IOAPIC: warning 8254 is not connected "
                                        "to the correct pin, try mixed mode\n");
-                               machintr_intrdis(irq);
+                               machintr_intr_disable(irq);
                                unregister_int(clkdesc);
                                goto mixed_mode_setup;
                        }
index 446361e..6eea763 100644 (file)
@@ -231,7 +231,7 @@ ASSYM(MSR_GSBASE, MSR_GSBASE);
 ASSYM(MSR_KGSBASE, MSR_KGSBASE);
 ASSYM(MSR_FSBASE, MSR_FSBASE);
 
-ASSYM(MACHINTR_INTREN, offsetof(struct machintr_abi, intren));
+ASSYM(MACHINTR_INTREN, offsetof(struct machintr_abi, intr_enable));
 
 ASSYM(TDPRI_INT_SUPPORT, TDPRI_INT_SUPPORT);
 #ifdef SMP
index 421c416..3f25432 100644 (file)
@@ -52,8 +52,8 @@
  * Interrupt Subsystem ABI
  */
 
-static void dummy_intrdis(int);
-static void dummy_intren(int);
+static void dummy_intr_disable(int);
+static void dummy_intr_enable(int);
 static void dummy_intr_setup(int, int);
 static void dummy_intr_teardown(int);
 static void dummy_finalize(void);
@@ -62,22 +62,23 @@ static void dummy_stabilize(void);
 
 struct machintr_abi MachIntrABI = {
        MACHINTR_GENERIC,
-       .intrdis =      dummy_intrdis,
-       .intren =       dummy_intren,
+       .intr_disable = dummy_intr_disable,
+       .intr_enable =  dummy_intr_enable,
        .intr_setup =   dummy_intr_setup,
        .intr_teardown = dummy_intr_teardown,
+
        .finalize =     dummy_finalize,
        .cleanup =      dummy_intrcleanup,
        .stabilize =    dummy_stabilize
 };
 
 static void
-dummy_intrdis(int intr)
+dummy_intr_disable(int intr)
 {
 }
 
 static void
-dummy_intren(int intr)
+dummy_intr_enable(int intr)
 {
 }
 
index b87e91c..7493e29 100644 (file)
@@ -52,8 +52,8 @@
  * Interrupt Subsystem ABI
  */
 
-static void dummy_intrdis(int);
-static void dummy_intren(int);
+static void dummy_intr_disable(int);
+static void dummy_intr_enable(int);
 static void dummy_intr_setup(int, int);
 static void dummy_intr_teardown(int);
 static void dummy_finalize(void);
@@ -62,22 +62,23 @@ static void dummy_stabilize(void);
 
 struct machintr_abi MachIntrABI = {
        MACHINTR_GENERIC,
-       .intrdis =      dummy_intrdis,
-       .intren =       dummy_intren,
+       .intr_disable = dummy_intr_disable,
+       .intr_enable =  dummy_intr_enable,
        .intr_setup =   dummy_intr_setup,
        .intr_teardown = dummy_intr_teardown,
+
        .finalize =     dummy_finalize,
        .cleanup =      dummy_intrcleanup,
        .stabilize =    dummy_stabilize
 };
 
 static void
-dummy_intrdis(int intr)
+dummy_intr_disable(int intr)
 {
 }
 
 static void
-dummy_intren(int intr)
+dummy_intr_enable(int intr)
 {
 }
 
index bae3e87..a927911 100644 (file)
@@ -57,21 +57,23 @@ enum machintr_type { MACHINTR_GENERIC, MACHINTR_ICU, MACHINTR_IOAPIC };
  */
 struct machintr_abi {
     enum machintr_type type;
-    void       (*intrdis)(int);                /* hardware disable irq */
-    void       (*intren)(int);                 /* hardware enable irq */
+
+    void       (*intr_disable)(int);           /* hardware disable intr */
+    void       (*intr_enable)(int);            /* hardware enable intr */
     void       (*intr_setup)(int, int);        /* setup intr */
     void       (*intr_teardown)(int);          /* tear down intr */
+    void       (*intr_config)                  /* config intr */
+               (int, enum intr_trigger, enum intr_polarity);
+
     void       (*finalize)(void);              /* final before ints enabled */
     void       (*cleanup)(void);               /* cleanup */
     void       (*setdefault)(void);            /* set default vectors */
     void       (*stabilize)(void);             /* stable before ints enabled */
     void       (*initmap)(void);               /* init irq mapping */
-    void       (*intr_config)                  /* config intr */
-               (int, enum intr_trigger, enum intr_polarity);
 };
 
-#define machintr_intren(intr)  MachIntrABI.intren(intr)
-#define machintr_intrdis(intr) MachIntrABI.intrdis(intr)
+#define machintr_intr_enable(intr)     MachIntrABI.intr_enable(intr)
+#define machintr_intr_disable(intr)    MachIntrABI.intr_disable(intr)
 #define machintr_intr_setup(intr, flags) \
            MachIntrABI.intr_setup((intr), (flags))
 #define machintr_intr_teardown(intr) \