From f45bfca0c18909f9e1f83b17fd18bd302d47982a Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 22 May 2011 21:21:41 +0800 Subject: [PATCH] ioapic: apic_io_enable -> ioapic_enable --- sys/bus/pci/i386/mptable_pci.c | 4 ++-- sys/bus/pci/pci_pci.c | 4 ++-- sys/bus/pci/x86_64/mptable_pci.c | 4 ++-- sys/platform/pc32/acpica5/acpi_machdep.c | 4 ++-- sys/platform/pc32/apic/ioapic_abi.c | 2 +- sys/platform/pc32/apic/lapic.c | 6 +++--- sys/platform/pc32/i386/machdep.c | 6 +++--- sys/platform/pc32/i386/mp_machdep.c | 10 +++++----- sys/platform/pc32/i386/nexus.c | 6 +++--- sys/platform/pc32/icu/icu.c | 4 ++-- sys/platform/pc32/icu/icu_abi.c | 2 +- sys/platform/pc32/include/smp.h | 2 +- sys/platform/pc32/isa/clock.c | 10 +++++----- sys/platform/pc64/acpica5/acpi_machdep.c | 4 ++-- sys/platform/pc64/apic/ioapic_abi.c | 2 +- sys/platform/pc64/apic/lapic.c | 6 +++--- sys/platform/pc64/icu/icu.c | 4 ++-- sys/platform/pc64/icu/icu_abi.c | 2 +- sys/platform/pc64/include/smp.h | 2 +- sys/platform/pc64/isa/clock.c | 8 ++++---- sys/platform/pc64/x86_64/machdep.c | 6 +++--- sys/platform/pc64/x86_64/mp_machdep.c | 10 +++++----- sys/platform/pc64/x86_64/nexus.c | 6 +++--- 23 files changed, 57 insertions(+), 57 deletions(-) diff --git a/sys/bus/pci/i386/mptable_pci.c b/sys/bus/pci/i386/mptable_pci.c index 7bae558b52..79e466ae12 100644 --- a/sys/bus/pci/i386/mptable_pci.c +++ b/sys/bus/pci/i386/mptable_pci.c @@ -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) || diff --git a/sys/bus/pci/pci_pci.c b/sys/bus/pci/pci_pci.c index 0cc07b9098..bd21bad522 100644 --- a/sys/bus/pci/pci_pci.c +++ b/sys/bus/pci/pci_pci.c @@ -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); diff --git a/sys/bus/pci/x86_64/mptable_pci.c b/sys/bus/pci/x86_64/mptable_pci.c index 7bae558b52..79e466ae12 100644 --- a/sys/bus/pci/x86_64/mptable_pci.c +++ b/sys/bus/pci/x86_64/mptable_pci.c @@ -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) || diff --git a/sys/platform/pc32/acpica5/acpi_machdep.c b/sys/platform/pc32/acpica5/acpi_machdep.c index 1a59c1295c..6ec85d8857 100644 --- a/sys/platform/pc32/acpica5/acpi_machdep.c +++ b/sys/platform/pc32/acpica5/acpi_machdep.c @@ -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; diff --git a/sys/platform/pc32/apic/ioapic_abi.c b/sys/platform/pc32/apic/ioapic_abi.c index 2bf2c5f981..8b62de2cff 100644 --- a/sys/platform/pc32/apic/ioapic_abi.c +++ b/sys/platform/pc32/apic/ioapic_abi.c @@ -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 diff --git a/sys/platform/pc32/apic/lapic.c b/sys/platform/pc32/apic/lapic.c index aa4a015e1b..78df7bf581 100644 --- a/sys/platform/pc32/apic/lapic.c +++ b/sys/platform/pc32/apic/lapic.c @@ -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; diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index fc308d413f..babec301f9 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -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 /* diff --git a/sys/platform/pc32/i386/mp_machdep.c b/sys/platform/pc32/i386/mp_machdep.c index eba5087602..acf0b470f7 100644 --- a/sys/platform/pc32/i386/mp_machdep.c +++ b/sys/platform/pc32/i386/mp_machdep.c @@ -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(); } diff --git a/sys/platform/pc32/i386/nexus.c b/sys/platform/pc32/i386/nexus.c index 7cf00dff67..02a6340d7a 100644 --- a/sys/platform/pc32/i386/nexus.c +++ b/sys/platform/pc32/i386/nexus.c @@ -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 /* diff --git a/sys/platform/pc32/icu/icu.c b/sys/platform/pc32/icu/icu.c index a7c12f3c85..2fcb084d7b 100644 --- a/sys/platform/pc32/icu/icu.c +++ b/sys/platform/pc32/icu/icu.c @@ -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(); diff --git a/sys/platform/pc32/icu/icu_abi.c b/sys/platform/pc32/icu/icu_abi.c index 33e0bd628a..905cb25c79 100644 --- a/sys/platform/pc32/icu/icu_abi.c +++ b/sys/platform/pc32/icu/icu_abi.c @@ -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 diff --git a/sys/platform/pc32/include/smp.h b/sys/platform/pc32/include/smp.h index b9792c4dd6..0ca4f55897 100644 --- a/sys/platform/pc32/include/smp.h +++ b/sys/platform/pc32/include/smp.h @@ -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); diff --git a/sys/platform/pc32/isa/clock.c b/sys/platform/pc32/isa/clock.c index 54daae8870..39dfd3df9f 100644 --- a/sys/platform/pc32/isa/clock.c +++ b/sys/platform/pc32/isa/clock.c @@ -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) { diff --git a/sys/platform/pc64/acpica5/acpi_machdep.c b/sys/platform/pc64/acpica5/acpi_machdep.c index 8c6e7ce94c..07bb9fd5d0 100644 --- a/sys/platform/pc64/acpica5/acpi_machdep.c +++ b/sys/platform/pc64/acpica5/acpi_machdep.c @@ -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; diff --git a/sys/platform/pc64/apic/ioapic_abi.c b/sys/platform/pc64/apic/ioapic_abi.c index 16903b3870..0032eb8c63 100644 --- a/sys/platform/pc64/apic/ioapic_abi.c +++ b/sys/platform/pc64/apic/ioapic_abi.c @@ -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 diff --git a/sys/platform/pc64/apic/lapic.c b/sys/platform/pc64/apic/lapic.c index 3b140841a3..dd4ae6ec7f 100644 --- a/sys/platform/pc64/apic/lapic.c +++ b/sys/platform/pc64/apic/lapic.c @@ -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; diff --git a/sys/platform/pc64/icu/icu.c b/sys/platform/pc64/icu/icu.c index 8a69fdcfdb..813b1a4d6e 100644 --- a/sys/platform/pc64/icu/icu.c +++ b/sys/platform/pc64/icu/icu.c @@ -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(); diff --git a/sys/platform/pc64/icu/icu_abi.c b/sys/platform/pc64/icu/icu_abi.c index 50b39662e3..fe3f9d7551 100644 --- a/sys/platform/pc64/icu/icu_abi.c +++ b/sys/platform/pc64/icu/icu_abi.c @@ -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 diff --git a/sys/platform/pc64/include/smp.h b/sys/platform/pc64/include/smp.h index 8afc0d99a3..8981124666 100644 --- a/sys/platform/pc64/include/smp.h +++ b/sys/platform/pc64/include/smp.h @@ -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 diff --git a/sys/platform/pc64/isa/clock.c b/sys/platform/pc64/isa/clock.c index 5a9f1d7a66..e44737fcb5 100644 --- a/sys/platform/pc64/isa/clock.c +++ b/sys/platform/pc64/isa/clock.c @@ -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) { diff --git a/sys/platform/pc64/x86_64/machdep.c b/sys/platform/pc64/x86_64/machdep.c index 387501a16b..a90f4611b0 100644 --- a/sys/platform/pc64/x86_64/machdep.c +++ b/sys/platform/pc64/x86_64/machdep.c @@ -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 /* diff --git a/sys/platform/pc64/x86_64/mp_machdep.c b/sys/platform/pc64/x86_64/mp_machdep.c index c4c8c53378..588159b715 100644 --- a/sys/platform/pc64/x86_64/mp_machdep.c +++ b/sys/platform/pc64/x86_64/mp_machdep.c @@ -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(); } diff --git a/sys/platform/pc64/x86_64/nexus.c b/sys/platform/pc64/x86_64/nexus.c index 9314d64652..bce63313b2 100644 --- a/sys/platform/pc64/x86_64/nexus.c +++ b/sys/platform/pc64/x86_64/nexus.c @@ -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 -- 2.41.0