ioapic: apic_io_enable -> ioapic_enable
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 May 2011 13:21:41 +0000 (21:21 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 May 2011 13:28:34 +0000 (21:28 +0800)
23 files changed:
sys/bus/pci/i386/mptable_pci.c
sys/bus/pci/pci_pci.c
sys/bus/pci/x86_64/mptable_pci.c
sys/platform/pc32/acpica5/acpi_machdep.c
sys/platform/pc32/apic/ioapic_abi.c
sys/platform/pc32/apic/lapic.c
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/nexus.c
sys/platform/pc32/icu/icu.c
sys/platform/pc32/icu/icu_abi.c
sys/platform/pc32/include/smp.h
sys/platform/pc32/isa/clock.c
sys/platform/pc64/acpica5/acpi_machdep.c
sys/platform/pc64/apic/ioapic_abi.c
sys/platform/pc64/apic/lapic.c
sys/platform/pc64/icu/icu.c
sys/platform/pc64/icu/icu_abi.c
sys/platform/pc64/include/smp.h
sys/platform/pc64/isa/clock.c
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/nexus.c

index 7bae558..79e466a 100644 (file)
@@ -78,7 +78,7 @@ done:
 static int
 mptable_hostb_probe(device_t dev)
 {
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                return (ENXIO);
 
        if (pci_cfgregopen() == 0)
@@ -179,7 +179,7 @@ mptable_pcib_probe(device_t dev)
 {
        int bus;
 
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                return (ENXIO);
 
        if ((pci_get_class(dev) != PCIC_BRIDGE) ||
index 0cc07b9..bd21bad 100644 (file)
@@ -126,9 +126,9 @@ pcib_probe(device_t dev)
     if ((pci_get_class(dev) == PCIC_BRIDGE) &&
        (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) {
        device_set_desc(dev, "PCI-PCI bridge");
-#ifdef SMP /* APIC-IO */
+#ifdef SMP
        /* PCIBIOS PCI-PCI bridge is -2000 */
-       if (apic_io_enable)
+       if (ioapic_enable)
                return (-1000);
 #endif
        return (-10000);
index 7bae558..79e466a 100644 (file)
@@ -78,7 +78,7 @@ done:
 static int
 mptable_hostb_probe(device_t dev)
 {
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                return (ENXIO);
 
        if (pci_cfgregopen() == 0)
@@ -179,7 +179,7 @@ mptable_pcib_probe(device_t dev)
 {
        int bus;
 
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                return (ENXIO);
 
        if ((pci_get_class(dev) != PCIC_BRIDGE) ||
index 1a59c12..6ec85d8 100644 (file)
@@ -337,8 +337,8 @@ static int
 acpi_GetDefaultIntrModel(void)
 {
        if (intr_model == -1) {
-#ifdef SMP /* APIC-IO */
-               if (apic_io_enable)
+#ifdef SMP
+               if (ioapic_enable)
                        intr_model = ACPI_INTR_APIC;
                else
                        intr_model = ACPI_INTR_PIC;
index 2bf2c5f..8b62de2 100644 (file)
@@ -515,7 +515,7 @@ static void
 ioapic_finalize(void)
 {
        KKASSERT(MachIntrABI.type == MACHINTR_IOAPIC);
-       KKASSERT(apic_io_enable);
+       KKASSERT(ioapic_enable);
 
        /*
         * If an IMCR is present, program bit 0 to disconnect the 8259
index aa4a015..78df7bf 100644 (file)
@@ -144,7 +144,7 @@ lapic_init(boolean_t bsp)
                  APIC_LVT_POLARITY_MASK | APIC_LVT_DM_MASK);
        if (bsp) {
                temp |= APIC_LVT_DM_EXTINT;
-               if (apic_io_enable)
+               if (ioapic_enable)
                        temp |= APIC_LVT_MASKED;
        } else {
                temp |= APIC_LVT_DM_FIXED | APIC_LVT_MASKED;
@@ -164,7 +164,7 @@ lapic_init(boolean_t bsp)
        temp &= ~(APIC_LVT_MASKED | APIC_LVT_TRIG_MASK | 
                  APIC_LVT_POLARITY_MASK | APIC_LVT_DM_MASK);
        temp |= APIC_LVT_MASKED | APIC_LVT_DM_NMI;
-       if (bsp && apic_io_enable)
+       if (bsp && ioapic_enable)
                temp &= ~APIC_LVT_MASKED;
        lapic->lvt_lint1 = temp;
 
@@ -718,7 +718,7 @@ lapic_fixup_noioapic(void)
 
        /* Only allowed on BSP */
        KKASSERT(mycpuid == 0);
-       KKASSERT(!apic_io_enable);
+       KKASSERT(!ioapic_enable);
 
        temp = lapic->lvt_lint0;
        temp &= ~APIC_LVT_MASKED;
index fc308d4..babec30 100644 (file)
@@ -1876,9 +1876,9 @@ do_next:
 
 #ifdef SMP
 #ifdef APIC_IO
-int apic_io_enable = 1; /* Enabled by default for kernels compiled w/APIC_IO */
+int ioapic_enable = 1; /* Enabled by default for kernels compiled w/APIC_IO */
 #else
-int apic_io_enable = 0; /* Disabled by default for kernels compiled without */
+int ioapic_enable = 0; /* Disabled by default for kernels compiled without */
 #endif
 #endif
 
@@ -1945,7 +1945,7 @@ init386(int first)
         */
        MachIntrABI = MachIntrABI_ICU;
 #ifdef SMP
-       TUNABLE_INT_FETCH("hw.apic_io_enable", &apic_io_enable);
+       TUNABLE_INT_FETCH("hw.apic_io_enable", &ioapic_enable);
 #endif
 
        /*
index eba5087..acf0b47 100644 (file)
@@ -231,7 +231,7 @@ mp_announce(void)
        for (x = 1; x <= mp_naps; ++x)
                kprintf(" cpu%d (AP):  apic id: %2d\n", x, CPUID_TO_APICID(x));
 
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                kprintf(" Warning: APIC I/O disabled\n");
 }
 
@@ -321,8 +321,8 @@ mp_enable(u_int boot_addr)
 
        error = lapic_config();
        if (error) {
-               if (apic_io_enable) {
-                       apic_io_enable = 0;
+               if (ioapic_enable) {
+                       ioapic_enable = 0;
                        icu_reinit_noioapic();
                }
                cpu_simple_setup();
@@ -335,10 +335,10 @@ mp_enable(u_int boot_addr)
        /* start each Application Processor */
        start_all_aps(boot_addr);
 
-       if (apic_io_enable) {
+       if (ioapic_enable) {
                error = ioapic_config();
                if (error) {
-                       apic_io_enable = 0;
+                       ioapic_enable = 0;
                        icu_reinit_noioapic();
                        lapic_fixup_noioapic();
                }
index 7cf00df..02a6340 100644 (file)
@@ -162,8 +162,8 @@ nexus_probe(device_t dev)
        irq_rman.rm_type = RMAN_ARRAY;
        irq_rman.rm_descr = "Interrupt request lines";
 
-#if SMP /* APIC-IO */
-if (apic_io_enable) {
+#if SMP
+if (ioapic_enable) {
        irq_rman.rm_end = APIC_INTMAPSIZE - 1;
        if (rman_init(&irq_rman)
            || rman_manage_region(&irq_rman,
@@ -176,7 +176,7 @@ if (apic_io_enable) {
            || rman_manage_region(&irq_rman, irq_rman.rm_start, 1)
            || rman_manage_region(&irq_rman, 3, irq_rman.rm_end))
                panic("nexus_probe irq_rman");
-#if SMP /* APIC-IO */
+#if SMP
 }
 #endif
        /*
index a7c12f3..2fcb084 100644 (file)
@@ -70,7 +70,7 @@ icu_init(void)
 #endif
 
 #ifdef SMP
-       if (apic_io_enable)
+       if (ioapic_enable)
                auto_eoi = 2;           /* auto EOI, 8086 mode */
 #endif
 
@@ -190,7 +190,7 @@ icu_reinit_noioapic(void)
        u_long ef;
 
        KKASSERT(MachIntrABI.type == MACHINTR_ICU);
-       KKASSERT(apic_io_enable == 0);
+       KKASSERT(ioapic_enable == 0);
 
        crit_enter();
        ef = read_eflags();
index 33e0bd6..905cb25 100644 (file)
@@ -166,7 +166,7 @@ icu_finalize(void)
        KKASSERT(MachIntrABI.type == MACHINTR_ICU);
 
 #ifdef SMP
-       KKASSERT(!apic_io_enable);
+       KKASSERT(!ioapic_enable);
 
        /*
         * If an IMCR is present, programming bit 0 disconnects the 8259
index b9792c4..0ca4f55 100644 (file)
@@ -95,7 +95,7 @@ void  forward_signal          (struct proc *);
 int    mptable_pci_int_route(int, int, int, int);
 void   mptable_pci_int_dump(void);
 
-extern int apic_io_enable;
+extern int ioapic_enable;
 
 #if defined(READY)
 void   clr_io_apic_mask24      (int, u_int32_t);
index 54daae8..39dfd3d 100644 (file)
@@ -1062,8 +1062,8 @@ i8254_intr_initclock(struct cputimer_intr *cti, boolean_t selected)
        rtc_statusb = RTCSB_24HR;
 
        /* Finish initializing 8253 timer 0. */
-#ifdef SMP /* APIC-IO */
-       if (apic_io_enable) {
+#ifdef SMP
+       if (ioapic_enable) {
                irq = ioapic_abi_find_irq(0, INTR_TRIGGER_EDGE,
                        INTR_POLARITY_HIGH);
                if (irq < 0) {
@@ -1101,7 +1101,7 @@ mixed_mode_setup:
                     INTR_NOPOLL | INTR_MPSAFE |
                     INTR_NOENTROPY);
        machintr_intren(0);
-#ifdef SMP /* APIC-IO */
+#ifdef SMP
        }
 #endif
 
@@ -1109,8 +1109,8 @@ mixed_mode_setup:
        writertc(RTC_STATUSA, rtc_statusa);
        writertc(RTC_STATUSB, RTCSB_24HR);
 
-#ifdef SMP /* APIC-IO */
-       if (apic_io_enable) {
+#ifdef SMP
+       if (ioapic_enable) {
                error = i8254_ioapic_trial(irq, cti);
                if (error) {
                        if (mixed_mode) {
index 8c6e7ce..07bb9fd 100644 (file)
@@ -337,8 +337,8 @@ static int
 acpi_GetDefaultIntrModel(void)
 {
        if (intr_model == -1) {
-#ifdef SMP /* APIC-IO */
-               if (apic_io_enable)
+#ifdef SMP
+               if (ioapic_enable)
                        intr_model = ACPI_INTR_APIC;
                else
                        intr_model = ACPI_INTR_PIC;
index 16903b3..0032eb8 100644 (file)
@@ -515,7 +515,7 @@ static void
 ioapic_finalize(void)
 {
        KKASSERT(MachIntrABI.type == MACHINTR_IOAPIC);
-       KKASSERT(apic_io_enable);
+       KKASSERT(ioapic_enable);
 
        /*
         * If an IMCR is present, program bit 0 to disconnect the 8259
index 3b14084..dd4ae6e 100644 (file)
@@ -153,7 +153,7 @@ lapic_init(boolean_t bsp)
                  APIC_LVT_POLARITY_MASK | APIC_LVT_DM_MASK);
        if (bsp) {
                temp |= APIC_LVT_DM_EXTINT;
-               if (apic_io_enable)
+               if (ioapic_enable)
                        temp |= APIC_LVT_MASKED;
        } else {
                temp |= APIC_LVT_DM_FIXED | APIC_LVT_MASKED;
@@ -173,7 +173,7 @@ lapic_init(boolean_t bsp)
        temp &= ~(APIC_LVT_MASKED | APIC_LVT_TRIG_MASK | 
                  APIC_LVT_POLARITY_MASK | APIC_LVT_DM_MASK);
        temp |= APIC_LVT_MASKED | APIC_LVT_DM_NMI;
-       if (bsp && apic_io_enable)
+       if (bsp && ioapic_enable)
                temp &= ~APIC_LVT_MASKED;
        lapic->lvt_lint1 = temp;
 
@@ -785,7 +785,7 @@ lapic_fixup_noioapic(void)
 
        /* Only allowed on BSP */
        KKASSERT(mycpuid == 0);
-       KKASSERT(!apic_io_enable);
+       KKASSERT(!ioapic_enable);
 
        temp = lapic->lvt_lint0;
        temp &= ~APIC_LVT_MASKED;
index 8a69fdc..813b1a4 100644 (file)
@@ -70,7 +70,7 @@ icu_init(void)
 #endif
 
 #ifdef SMP
-       if (apic_io_enable)
+       if (ioapic_enable)
                auto_eoi = 2;           /* auto EOI, 8086 mode */
 #endif
 
@@ -190,7 +190,7 @@ icu_reinit_noioapic(void)
        register_t ef;
 
        KKASSERT(MachIntrABI.type == MACHINTR_ICU);
-       KKASSERT(apic_io_enable == 0);
+       KKASSERT(ioapic_enable == 0);
 
        crit_enter();
        ef = read_rflags();
index 50b3966..fe3f9d7 100644 (file)
@@ -166,7 +166,7 @@ icu_finalize(void)
        KKASSERT(MachIntrABI.type == MACHINTR_ICU);
 
 #ifdef SMP
-       KKASSERT(!apic_io_enable);
+       KKASSERT(!ioapic_enable);
 
        /*
         * If an IMCR is present, programming bit 0 disconnects the 8259
index 8afc0d9..8981124 100644 (file)
@@ -68,7 +68,7 @@ extern void (*cpustop_restartfunc) (void);
 
 /* global data in mp_machdep.c */
 extern int                     imcr_present;
-extern int                     apic_io_enable;
+extern int                     ioapic_enable;
 extern int                     mp_naps;
 
 #define APIC_INTMAPSIZE 192
index 5a9f1d7..e44737f 100644 (file)
@@ -1069,8 +1069,8 @@ i8254_intr_initclock(struct cputimer_intr *cti, boolean_t selected)
        rtc_statusb = RTCSB_24HR;
 
        /* Finish initializing 8254 timer 0. */
-#ifdef SMP /* APIC-IO */
-       if (apic_io_enable) {
+#ifdef SMP
+       if (ioapic_enable) {
                irq = ioapic_abi_find_irq(0, INTR_TRIGGER_EDGE,
                        INTR_POLARITY_HIGH);
                if (irq < 0) {
@@ -1116,8 +1116,8 @@ mixed_mode_setup:
        writertc(RTC_STATUSA, rtc_statusa);
        writertc(RTC_STATUSB, RTCSB_24HR);
 
-#ifdef SMP /* APIC-IO */
-       if (apic_io_enable) {
+#ifdef SMP
+       if (ioapic_enable) {
                error = i8254_ioapic_trial(irq, cti);
                if (error) {
                        if (mixed_mode) {
index 387501a..a90f461 100644 (file)
@@ -1675,9 +1675,9 @@ do_next:
 
 #ifdef SMP
 #ifdef APIC_IO
-int apic_io_enable = 1; /* Enabled by default for kernels compiled w/APIC_IO */
+int ioapic_enable = 1; /* Enabled by default for kernels compiled w/APIC_IO */
 #else
-int apic_io_enable = 0; /* Disabled by default for kernels compiled without */
+int ioapic_enable = 0; /* Disabled by default for kernels compiled without */
 #endif
 #endif
 
@@ -1768,7 +1768,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
         */
        MachIntrABI = MachIntrABI_ICU;
 #ifdef SMP
-       TUNABLE_INT_FETCH("hw.apic_io_enable", &apic_io_enable);
+       TUNABLE_INT_FETCH("hw.apic_io_enable", &ioapic_enable);
 #endif
 
        /*
index c4c8c53..588159b 100644 (file)
@@ -227,7 +227,7 @@ mp_announce(void)
        for (x = 1; x <= mp_naps; ++x)
                kprintf(" cpu%d (AP):  apic id: %2d\n", x, CPUID_TO_APICID(x));
 
-       if (!apic_io_enable)
+       if (!ioapic_enable)
                kprintf(" Warning: APIC I/O disabled\n");
 }
 
@@ -349,8 +349,8 @@ mp_enable(u_int boot_addr)
 
        error = lapic_config();
        if (error) {
-               if (apic_io_enable) {
-                       apic_io_enable = 0;
+               if (ioapic_enable) {
+                       ioapic_enable = 0;
                        icu_reinit_noioapic();
                }
                cpu_simple_setup();
@@ -363,10 +363,10 @@ mp_enable(u_int boot_addr)
        /* start each Application Processor */
        start_all_aps(boot_addr);
 
-       if (apic_io_enable) {
+       if (ioapic_enable) {
                error = ioapic_config();
                if (error) {
-                       apic_io_enable = 0;
+                       ioapic_enable = 0;
                        icu_reinit_noioapic();
                        lapic_fixup_noioapic();
                }
index 9314d64..bce6331 100644 (file)
@@ -157,8 +157,8 @@ nexus_probe(device_t dev)
        irq_rman.rm_start = 0;
        irq_rman.rm_type = RMAN_ARRAY;
        irq_rman.rm_descr = "Interrupt request lines";
-#ifdef SMP /* APIC-IO */
-if (apic_io_enable) {
+#ifdef SMP
+if (ioapic_enable) {
        irq_rman.rm_end = APIC_INTMAPSIZE - 1;
        if (rman_init(&irq_rman)
            || rman_manage_region(&irq_rman,
@@ -171,7 +171,7 @@ if (apic_io_enable) {
            || rman_manage_region(&irq_rman, irq_rman.rm_start, 1)
            || rman_manage_region(&irq_rman, 3, irq_rman.rm_end))
                panic("nexus_probe irq_rman");
-#ifdef SMP /* APIC-IO */
+#ifdef SMP
 }
 #endif